
|
If you were logged in you would be able to see more operations.
|
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
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
|
|
Description
|
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 |
Show » |
| There are no comments yet on this issue.
|
|