vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

Promote feature discovery of Source Action

Open CsCherrYY opened this issue 4 years ago • 5 comments

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 https://github.com/eclipse/eclipse.jdt.ls/pull/1405 did. In this way, I have created https://github.com/eclipse/eclipse.jdt.ls/pull/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

CsCherrYY avatar Aug 12 '21 06:08 CsCherrYY

@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 avatar Sep 09 '21 07:09 nickzhums

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

nickzhums avatar Nov 03 '21 02:11 nickzhums

@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.

CsCherrYY avatar Nov 03 '21 02:11 CsCherrYY

@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 avatar Nov 03 '21 02:11 nickzhums

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

nickzhums avatar Nov 19 '21 07:11 nickzhums

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 https://github.com/microsoft/vscode-java-pack/issues/1163

CsCherrYY avatar Mar 20 '23 05:03 CsCherrYY