eclipselombok

Cannot make Project Lombok work on Eclipse


I have followed the tutorial here http://projectlombok.org/

but after adding import and @Data nothing happens.

Does it work on eclipse helios ?


Solution

  • Did you add

    -vmargs
    ...
    -javaagent:lombok.jar
    -Xbootclasspath/a:lombok.jar
    
    # or use the full path of the jar
    -javaagent:C:\{sts_path}\spring-tool-suite-3.9.11\sts-bundle\sts-3.9.11.RELEASE\lombok.jar
    

    to your eclipse.ini?

    Because if you have (and if you have added the lombok.jar to the libraries used by your project), it works just fine with Eclipse Helios:

    alt text


    Ian Tegebo mentions in the comments that:

    a simple "restart" was not sufficient to pick up the changed vmargs:
    I needed to explicitly exit and then start again.


    chrisjleu mentions in the comments:

    If you happen to be running a customized Eclipse Helios (3.6+) distribution then you may have to use the full path to lombok.jar in both the vm arguments.
    See commit b47e87f for more details.

    boolean fullPathRequired = IdeFinder.getOS() == EclipseFinder.OS.UNIX || System.getProperty("lombok.installer.fullpath") != null;