redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.07k stars 427 forks source link

Better support of lombok #2805

Closed hannah23280 closed 1 year ago

hannah23280 commented 1 year ago

vscode - v1.72.2 vscode-java - v1.12.0 Hi, I know that vscode-java support lombok, however, I do wish it can make the support even better.

Currently, 2 things requesting for enhancement

 ```
     Test.java

        @Getter
        @Setter
       class Test{
            private int a;
            private int b;
            private int c
      }
 ```
 ```
    Main.java
          var test = new Test();
         test.getC();
 ```

1) Jump to the field of the lombok-annotated class corresponding to the getter and setter method If we are to right click on the getC() method, and select "Go to Implementation", it will open the Test.java file and bring me to the top of the class, where the @Getter is. However, most of the time, we want to go directly to the field that is associated with getC() method, which unfortunately, vscode-java doesn't work in this manner. Intellij , however, does this perfectly well.

2) Refactor the field name should auto refactor all corresponding getter and setter of that field. If I am to change the field name, say c become xxxx, all the test.getC() should auto update to become test.getXXXX(), rather than expect developer to manually change all of them.
Again, Intellij does this well.

snjeza commented 1 year ago

@hannah23280 you can try https://github.com/snjeza/vscode-test/raw/master/java-1.13.2.vsix

zymotik commented 1 year ago

It would be great to support the SuperBuilder annotation 👍

https://github.com/microsoft/vscode-lombok/issues/62

snjeza commented 1 year ago

@zymotik Could you, please, provide a project example reproducing the error?

zymotik commented 1 year ago

I will ask my highly esteemed colleague @AndreySyagrovskiy 👍

Thank you for your speedy reply @snjeza

zymotik commented 1 year ago

Sorry for the delay, example code to demonstrate the annotation issue in Visual Studio Code. See the readme of the code repository: https://github.com/zymotik/redhat-developer-vscode-java-issue-2805

snjeza commented 1 year ago

@zymotik Could you, please, create a new issue?

zymotik commented 1 year ago

@snjeza, Issue https://github.com/redhat-developer/vscode-java/issues/2819 created. We appreciate your time, thank you.