oracle / javavscode

Java platform support for Visual Studio Code for full featured Java development (edit-compile-debug & test cycle)
Apache License 2.0
231 stars 31 forks source link

Generated methods not recognized #94

Closed rtbunkerlw closed 7 months ago

rtbunkerlw commented 11 months ago

We're using the jackson json annotations. Code is marked with an @JsonProperty annotation which causes getters and setters to be generated. However, the getter methods are elsewhere being marked as not found. This seems to be an issue in general with annotation generated code. For a repro, you can use this example project with lombok.

https://github.com/eugenp/tutorials/tree/master/lombok-modules/lombok

If you load the project in vscode you'll see for example the src/main/java/com/baeldung/lombok/builder/ClientBuilder.java file has an error calling the ImmutableClient constructor which is auto-generated.

Achal1607 commented 7 months ago

This extension is focused towards Java development and directly Java related issues, Lombok doesn't follow Java so closing this issue. But if you have face any Java related or extension related issue please feel free to open an issue.

rtbunkerlw commented 7 months ago

I don't understand the won't fix here? The issue i'm highlighting is that methods autogenerated by java annotations are not getting found. I'm using the lombok project as an example to demonstrate the issue, but it otherwise has nothing to do with lombok. it's a java annotations issue.

robaho commented 7 months ago

Usually you need to add the generated classes directory to the gradle/maven classpath.

pbodnar commented 7 months ago

@Achal1607, @rtbunkerlw, I don't quite understand the closing comment either. If anything, I believe this could be closed rather as a duplicate of #83 (as per my comment), where more in-depth conversation has been going on already.

rtbunkerlw commented 7 months ago

Thanks @pbodnar, agreed that it's a duplicate.