-
Notifications
You must be signed in to change notification settings - Fork 419
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
Generate Getter and Setters from code completion #100
Comments
Is this a request to get code actions or code lenses for generating getters and setters ? Overrides are covered on #85 for completions |
the idea is like intellij or netbeans right click in a class give you de generate code.. getter and setters for selected variables or others like overrides if the class is extended |
Looking forward to this. |
For now, I put this code under java.json (File > Preferences > User Snippets > Java):
Write "getset" and VSCode offers the snippet, then use Tab to navigate on the placeholders. |
so with @yaohaizh's PR, the setters and getters will be available as code completion proposal, not as a global command initially (we can work on that latter) |
@yaohaizh this is looking great. Can we enable this as a code action too? |
And would be nice to have generators not only for getters and setters, but also for constructors, toString, hashCode, equals and overrides |
@phil294 and @augustocdias I think it'd be better if you open a new issue because this was closed a year ago and it's very likely the team is not paying attention to it one anymore. |
@gentunian for booleans, the convention is to have an |
@fbricon you're right! my bad :) |
There is a working extension which generates getters, setters, equals, and hashcode. Java Code Generator |
Starting in vscode-java 0.36.0, and thanks to @testforstephen's efforts, you'll be able to bulk generate accessors: |
super thanks!))) |
Be able to add automatic getter, setters on a class and also override methods if extending a class
The text was updated successfully, but these errors were encountered: