0

I'm using Eclipse Version: 2021-09 (4.21.0) Build id: 20210910-1417 Lombok: 1.18.12

But Eclipse complains in the "Problems" tab: "The method getTest() is undefined for the type RootResponse"

The problem class is:

@Getter
@Builder
@ToString
public class RootResponse extends Serializer {
    private String test;

    // for use in the cleanup routine
    @Override
    public String[] getDeletionIdentifiers() {
        throw new UnsupportedOperationException("Deletion not supported: "+ this.getClass().getName());
    }

}

I'm using Gradle, but am far from an expert at it. Nonetheless, I think this is relevant from the build.gradle file:

ext {
    groupId = project.property('groupId')
    version = project.property('version')

    lombok_version='1.18.12'
    functional_api_test_version='1.0-SNAPSHOT'
    redwoodCommonVersion='3.5-SNAPSHOT'
}

dependencies {
    compile group: 'com.tii', name: 'redwood-common', version: "${redwoodCommonVersion}"

    implementation "org.projectlombok:lombok:${lombok_version}"
    annotationProcessor "org.projectlombok:lombok:${lombok_version}"
    testAnnotationProcessor "org.projectlombok:lombok:${lombok_version}"

    implementation 'com.tii:java-functional-testlib:0.5-SNAPSHOT'
    implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.4.0-b180830.0359'
    testCompile 'junit:junit:4.12'
}

I also tried adding an external library to Eclipse: enter image description here

If I click on the @Getter annotation in Eclipse, it finds and opens the lombok.Getter annotation.

I'd like to fix this in Eclipse in a way that I don't need to check in and modify the source. How can I force Eclipse to do this?

Thx, Woodsman

Woodsman
  • 901
  • 21
  • 61
  • Why is your Eclipse out of date? Why is your Lombok out of date? Did you installed Lombok into your Eclipse or do you use it only as dependency? – howlger Mar 10 '22 at 19:30
  • You have to install lombok in eclipse https://stackoverflow.com/questions/22310414/how-to-configure-lombok-in-eclipse-luna – Ryuzaki L Mar 10 '22 at 19:32
  • Does this answer your question? [how to configure lombok in eclipse luna](https://stackoverflow.com/questions/22310414/how-to-configure-lombok-in-eclipse-luna) – Med Elgarnaoui Mar 10 '22 at 19:32
  • 1
    @howlger There are all sorts of reasons not to compulsively update the IDE, and I only updated to 4.22 when new updates were made by GRECLIPSE. Last fall is not terribly out of date. – chrylis -cautiouslyoptimistic- Mar 10 '22 at 19:40
  • @chrylis-cautiouslyoptimistic- It's up to you not to care about security and waste your time by not keeping your software up to date. But before you ask or report a bug, you should check if your issue is reproducible with the current versions to avoid wasting other people's time. If here Lombok was not missed being installed in Eclipse, the problem is most likely that Lombok 1.18.12 being even older than Eclipse 2021-09 will not work with Eclipse 2021-09 or/and with the Java version used to run Eclipse. – howlger Mar 10 '22 at 21:26
  • @Deadpool Yes, I did. I executed the jar provided by lombok and specified the Eclipse installation directory. Further, I also tried adding the jar explicitly, but it didn't care. It's not working. – Woodsman Mar 11 '22 at 02:17
  • 1
    Lombok version 1.18.12 is from early 2020. It doesn't recognize and support an Eclipse release from late 2021. Try a newer one as @ chrylis-cautiouslyoptimistic mentioned. – nitind Mar 11 '22 at 04:39
  • @nitind Exactly. Except that @ chrylis-cautiouslyoptimistic- is the guy telling the opposite here. – howlger Mar 11 '22 at 07:26
  • @howlger I tend to agree with @ chrylis-cautionslyoptimistic. It's generally not reasonable to upgrade Eclipse everyday, and this plugin had worked with Eclipse in the past. It's not like I was using Eclipse Luna. Nonetheless, I downloaded the 2021-12 version. But it could not open insisted I install webtools then wouldn't go any further. – Woodsman Mar 11 '22 at 18:03
  • 1
    Lombok uses internals from Eclipse (it shouldn't, but that's how it is). It is known that [Lombok 1.18.12, which was released on February 1, 2020](https://projectlombok.org/changelog), does not work properly in Eclipse 2021-09, which was released on September 15, 2021. In contrast, the current version of Lombok works in the current version of Eclipse running with the current version of Java (which could be part of your Eclipse and which is a different thing than the Java version you use in your project). _"compulsively update"_, _"upgrade everyday"_ - really guys?! – howlger Mar 11 '22 at 22:15

0 Answers0