When using this plugin with a lombok-project the plugin determines many problems (e. g. for missing getters and setters) that disappear when the corresponding file is opened.
Unfortunately, I cannot submit the affected project.
The important bits are:
<!-- pom.xml -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
// License.java
@Data
public class License {
private String serial;
}
!SESSION 2018-03-06 07:59:11.945 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_102
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE
Command-line arguments: -data /Users/oliverherrmann/Library/Application Support/Code/User/workspaceStorage/d8ec444f7205bbe5fb9c8b70109bb494/redhat.java/jdt_ws
!ENTRY org.eclipse.jdt.ls.core 1 0 2018-03-06 07:59:14.658
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started
!ENTRY org.eclipse.jdt.ls.core 1 0 2018-03-06 07:59:14.992
!MESSAGE Main thread is waiting
{ ... }
!ENTRY org.eclipse.jdt.ls.core 4 0 2018-03-06 08:00:20.767
!MESSAGE Error occured while building workspace. Details:
message: The method getSerial() is undefined for the type License;code: 67108964
message: The method getExportChannels() is undefined for the type Project;code: 67108964
message: The method getEditions() is undefined for the type Project;code: 67108964
A Problem “The method getSerial() is undefined for the type License“ is listed in the problems view. When opening the corresponding file by clicking on the entry the problem disappears after a few seconds.
This behavior is reproducable when restarting vs code.
No problem “The method getSerial() is undefined for the type License“ is listed in the problems view.
I can't reproduce the issue.
I have used the attached project and the following settings:
"java.jdt.ls.vmargs": "-javaagent:/home/snjeza/.m2/repository/org/projectlombok/lombok/1.16.20/lombok-1.16.20.jar -Xbootclasspath/a:/home/snjeza/.m2/repository/org/projectlombok/lombok/1.16.20/lombok-1.16.20.jar -noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication",
This bug is still happening, please see: Problems list still show errors of undefined for getters or setters. The issue opener resolved it doing this: https://github.com/GabrielBB/vscode-lombok/issues/13#issuecomment-440981551 , but that workaround doesn't work for others
@GabrielBB could you attach a sample project?
Here's how I managed to solve the problem:
I tried @YongJieYongJie 's solution but the problems appeared again as soon as I compiled the project using maven.
Most helpful comment
This bug is still happening, please see: Problems list still show errors of undefined for getters or setters. The issue opener resolved it doing this: https://github.com/GabrielBB/vscode-lombok/issues/13#issuecomment-440981551 , but that workaround doesn't work for others