龙目岛和STS问题-方法未定义 [英] Lombok and STS issue - Method undefined

查看:125
本文介绍了龙目岛和STS问题-方法未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有基于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.

我执行了以下步骤:

  1. 下载并运行Lombok可运行jar,并给出我的STS路径.
  2. 我验证了vmargs的条目,但缺少了Xbootclasspath并将其添加为

  1. Download and run the Lombok runnable jar and gave the path of my STS.
  2. I verified the entries of vmargs, but was missing Xbootclasspath 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:

    1. 转到 Lombok页面,下载并双击jar,然后将其安装在IDE中.
    2. 之后,打开.ini文件,查看它是否具有 javaagent Xbootclasspath 变量.
    1. Go to the Lombok page and download and double-click the jar and install in your IDE.
    2. After that, open the .ini file and see if it has javaagent and Xbootclasspath variables.

    就我而言, Xbootclasspath 丢失了,当我添加它时,它起作用了.

    In my case, Xbootclasspath was missing and when I added that, it worked.

    -Xbootclasspath/a:PATH_To_lambok.jar
    

    这篇关于龙目岛和STS问题-方法未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆