-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add generators to the quick fix / assists for the class #281
Comments
cc @jjohnstn |
Not sure about all of them. I think there's a precedent for Generate Getters and Setters because the Quick Fix for a field that doesn't already have a getter/setter offers to create one so it makes sense to offer this for the class. Of the remaining ones in your list, I could see Override/Implement Methods and possibly hashCode() and equals(), but I don't think the others are important enough and we don't want a cluttered list. @noopur2507 What do you think? |
I think the most important (for me) would be: Getter / Setter (per field is not super easy to use) The Override / implement Method wizard is rarely used by me, but adding it would most likely also helpful to others. Thanks @jjohnstn for considering this. IntelliJ has a popup and shortcut for these generations, would be nice to have this as quick fix in Eclipse. |
I have added: #285 to handle getters/setters |
- Propose getter/setter quick assist for types/records if they don't already exist - create a proposal that will start the AddGetterSetterAction - #281
Thanks @jjohnstn what about the hashCode/ equals and toString generators? |
Still to come. Otherwise, I would have closed the issue. |
- propose hashcode/equals methods for type if they don't already exist and the type has at least one non-static field - fix AssistQuickFixTest - eclipse-jdt#281
- propose hashcode/equals methods for type if they don't already exist and the type has at least one non-static field - fix AssistQuickFixTest - #281
- create new ToStringTypeProposal class that uses the GenerateToStringAction - add quick assist to AdvancedQuickAssistProcessor - fix messages for hashcode/equals assist to add () for methods - add new IProposalRelevance constants - eclipse-jdt#281
- create new ToStringTypeProposal class that uses the GenerateToStringAction - add quick assist to AdvancedQuickAssistProcessor - fix messages for hashcode/equals assist to add () for methods - add new IProposalRelevance constants - #281
@vogella I think this can be closed now unless you have any issues. I will leave the implement/override methods to be accessible via the Source menu. |
Thanks Jeff, looks great |
Verified for 4.26 M3 using I20221108 build. |
@jjohnstn Can you please add N&N entries for these new Quick assists. |
The assists pop-up on a Java class still contains only a few entries. What not adding the generate entries also the quick fixes?
The text was updated successfully, but these errors were encountered: