Skip to content
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

Enable advanced "Generate getters and setters..." source action #907

Conversation

testforstephen
Copy link
Collaborator

Signed-off-by: Jinbo Wang jinbwan@microsoft.com

Enable the advanced "Generate getters and setters..." source action if the class has more than one field. It will prompt a quick pick box to select the target fields for generating the accessor methods.
image

Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
@fbricon
Copy link
Collaborator

fbricon commented Apr 29, 2019

So if you have 2 fields without accessors, the quickfix to generate them has an ellipsis, yet no wizard is shown as you'd expect from the ellipsis.
Screen Shot 2019-04-29 at 7 05 30 PM

When multiple fields are available for the source action, they should all be selected by default

@testforstephen
Copy link
Collaborator Author

Create a bug #908 to track the issue for the quick fix. Would like to fix it in a new PR.

About the suggestion to select all fields by default, i may have a different opinion. I would prefer to leave it unselected by default, this is the same behavior as the Eclipse and Intellij. Because the quick pick widget will also list the static fields, which the user may not want to generate the accessors in most of cases.

@fbricon
Copy link
Collaborator

fbricon commented Apr 30, 2019

Merged as 6686996. I just prefixed the static keyword when needed, instead of enumerating it:
Screen Shot 2019-04-30 at 12 36 05 PM

@fbricon fbricon closed this Apr 30, 2019
@fbricon fbricon added this to the End April 2019 milestone Apr 30, 2019
@testforstephen testforstephen deleted the jinbo_advancedAccessors branch May 5, 2019 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants