microsoft / vscode-java-pack

VS Code extensions for Java developers.
Other
286 stars 130 forks source link

Expose getter / setter / toString / equals() generation in a more intuitive way #705

Open nickzhums opened 3 years ago

nickzhums commented 3 years ago

Right now our getter/setter generation is hidden in "Source Action" and it is not very visible. We have lots of feedback from developers that they ask for getter/setter generation but we already support them, so people might just not be able to find it easily

nickzhums commented 3 years ago

As discussed in the meeting, we can first investigate the operations in Source Action and expose them in more top-level fashion (for example, light bulb icon on class level / property level / method level)

nickzhums commented 3 years ago

cc @jdneo @Eskibear @testforstephen @CsCherrYY for awareness - since a lot of developer feedback is related to this, maybe we can take a look at this in August/early September timeframe?

Eskibear commented 3 years ago

The plan is to expose below code actions via the yellow lightbulb in proper place. E.g.

getter/setter

We do have quickfix for "private members". image

toString() / equals() are special cases of "Override/Implement methods" .

For class with unimplement methods, we do have quickfix for the entry. image

But for method overriding, we may provide an entry when cursor is on the signature.

nickzhums commented 3 years ago

is it possible to add a "generate getter / setter" light bulb on the class level to generate getter setter for all properties? (if we detect that some properties do not have getter / setter)

akaroml commented 3 years ago

@eskibear please assign this to the proper person.

Eskibear commented 3 years ago

related issue: https://github.com/redhat-developer/vscode-java/issues/2057