History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-22662
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Dmitry Avdeev
Reporter: Taras Tielkes
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

'create property' QuickFix: usability enhancements

Created: 08 Oct 07 02:58   Updated: 17 Oct 07 12:23
Component/s: J2EE.Spring
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,330


 Description  « Hide
At the moment, the 'create new property' QuickFix (for unresolved properties) uses fairly simple logic to choose the type of the generated property:
  • for a property having a "value" attribute type "java.lang.String" is used
  • for a property having a "ref" attribute the type of the referenced bean is used

This can be improved in a number of ways:

  • Run a template for the method argument in the generated setter, allowing me to choose the type of the property (for both "value" as well as "ref" declarations):
  • When invoking the QuickFix from a "ref" declaration, populate the template with the class of the referenced bean, but also any interfaces. If referenced bean cannot be resolved, simply assume "java.lang.Object" type.
  • When invoking the QuickFix from a "value" declaration, populate the template with: primitives, String and Resource
  • When invoking the QuickFix from a "value" declaration, the value (if present) could be used to guess a candidate type. The guessed type should only be preselected in the template, so that the user can easily select a different type in case IDEA guessed wrong:
    • "true"/"false": boolean
    • <numeric value>: int
    • anything else: java.lang.String

After running template class references should be shortened: IDEADEV-15928



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.