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

Promote feature discovery of Source Action #2057

Closed
CsCherrYY opened this issue Aug 12, 2021 · 6 comments
Closed

Promote feature discovery of Source Action #2057

CsCherrYY opened this issue Aug 12, 2021 · 6 comments
Assignees

Comments

@CsCherrYY
Copy link
Contributor

CsCherrYY commented Aug 12, 2021

Currently, the available source actions are in the editor context menu -> Source Action..., which is a little bit hard to be found. Will investigate a proper way to promote the feature discovery of source actions.

A way to expose source actions is to add them to "Show fixes" (looks like a bulb), like eclipse-jdtls/eclipse.jdt.ls#1405 did. In this way, I have created eclipse-jdtls/eclipse.jdt.ls#1842 for hashCode() and equals().

Source Assists:

Source Action Type Declaration Field Declaration Import Declaration Method Declaration multiple selection
Generate Constructors ✔️ ✔️
Organize Imports ✔️
Generate Getters and Setters ✔️ ✔️
Generate Getters ✔️ ✔️
Generate Setters ✔️ ✔️
Override/Implement methods ✔️
Generate hashCode() and equals() ✔️
Generate toString() ✔️
Generate Javadoc
Change modifiers to final
Generate Tests ✔️ WIP
@nickzhums
Copy link
Contributor

@CsCherrYY for getters/setters, besides field declaration, let's add one for class-level too for batch generation. Eg. a class has 5 fields, click on lightbulb to generate setters/getters all at once

@nickzhums
Copy link
Contributor

@CsCherrYY per user feedback, we should consider adding constructors to class declaration as well

@CsCherrYY
Copy link
Contributor Author

@CsCherrYY per user feedback, we should consider adding constructors to class declaration as well

I have added it to the plan table. Please see the first row.

@nickzhums
Copy link
Contributor

@CsCherrYY per user feedback, we should consider adding constructors to class declaration as well

I have added it to the plan table. Please see the first row.

awesome!

@nickzhums
Copy link
Contributor

Per survey feedback, "Attach Source" is another action user has requested

@CsCherrYY
Copy link
Contributor Author

Per survey feedback, "Attach Source" is another action user has requested

@nickzhums this request seems related to Javadoc (linking existing source jar). let's track this in microsoft/vscode-java-pack#1163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants