龙目岛和STS问题-方法未定义 [英] Lombok and STS issue - Method undefined
问题描述
我有基于Eclipse Luna 4.4.1的STS版本3.6.3SR1.
I have STS version 3.6.3.SR1 that's based on Eclipse Luna 4.4.1.
我执行了以下步骤:
- 下载并运行Lombok可运行jar,并给出我的STS路径.
-
我验证了
vmargs
的条目,但缺少了Xbootclasspath
并将其添加为
- Download and run the Lombok runnable jar and gave the path of my STS.
I verified the entries of
vmargs
, but was missingXbootclasspath
and added it resulting in
-vmargs -Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.browser.IEVersion=10001
-Xms512m
-Xmx1024m
-javaagent:C:\tools\Lombok\lombok.jar
-Xbootclasspath/a:C:\tools\Lombok\lombok.jar
我从快捷方式以及STS.exe
的绝对位置退出并打开了STS.
I exit and opened the STS both from shortcut as well as the absolute location of the STS.exe
.
即使进行了上述所有活动,仍然存在很多编译器问题,它们会在所有@Data
或@Getter
或@Setter
注释上抱怨未定义的方法getXXX()
和setXXX()
.
Even after all the above activities, there are lots of compiler issues that complains undefined method getXXX()
and setXXX()
on all @Data
or @Getter
or @Setter
annotations.
Maven构建成功运行,并且运行时行为良好,因为编译的类似乎具有getter和setter.
Maven build runs successfully and the runtime behavior is fine, as the complied class seems to have the getters and setters.
IntelliJ似乎没有问题,因为其他开发人员可以使用该库.
IntelliJ seems to have no porblem with this as other developers are able to use the library.
我的pom.xml
也具有以下条目:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.4</version>
</dependency>
我该如何解决?
P.S:我在STS上下载了Eclipse Kepler构建,以启用JBoss Fuse Tooling.
P.S : I downloaded Eclipse Kepler build on top of STS to enable JBoss Fuse Tooling.
推荐答案
@Karthik R,感谢您的帖子.以下内容帮助我解决了该问题:
@Karthik R, thanks for your post. The following helped me to solve the issue:
- 转到 Lombok页面,下载并双击jar,然后将其安装在IDE中.
- 之后,打开
.ini
文件,查看它是否具有javaagent
和Xbootclasspath
变量.
- Go to the Lombok page and download and double-click the jar and install in your IDE.
- After that, open the
.ini
file and see if it hasjavaagent
andXbootclasspath
variables.
就我而言, Xbootclasspath
丢失了,当我添加它时,它起作用了.
In my case, Xbootclasspath
was missing and when I added that, it worked.
-Xbootclasspath/a:PATH_To_lambok.jar
这篇关于龙目岛和STS问题-方法未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!