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 |
|
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()andequals().Source Assists: