projectlombok / lombok

Very spicy additions to the Java programming language.
https://projectlombok.org/
Other
12.88k stars 2.39k forks source link

Lombok Installer not working with Eclipse Neon 2 on macOS Sierra #1310

Open james-dekker opened 7 years ago

james-dekker commented 7 years ago

Am using Eclipse Neon 2 on macOS Sierra and Lombok 1.16.14.

When I ran the Lombok Installer, it could not find any of my Eclipse or IntelliJ IDEA installations.

So, I had to manually "Specify Location" by pointing to the following file (no other directory or file would enable the "Install" button to become clickable):

eclipse-standard-neon2/Eclipse.app/Contents/Eclipse/eclipse.ini

After, installing, it said that "Installation was completed" and inside the eclipse.ini file, it had the following line inserted for the last line:

-javaagent:../Eclipse/lombok.jar

lombok.jar was also automatically placed inside the same directory as eclipse.ini:

eclipse-standard-neon2/Eclipse.app/Contents/Eclipse/

However, when I launch Eclipse Neon 2 and trying to use any of the Lombok annotations, its fails to recognize the library in its classpath, even if I declare package import explicitly.

Also, when I re-run the Lombok Installer (in order, to uninstall Lombok), it still can't find the previous Eclipse IDE that I had to manually specify from the previous install?

Has anyone run into this issue?

james-dekker commented 7 years ago

I have an updated (with a lot more details) description of the problem / issue at hand on Stack Overflow:

http://stackoverflow.com/questions/42380528/lombok-not-working-with-eclipse-neon-2-on-macos-sierra

rzwitserloot commented 7 years ago

Let's discuss this here and not on stackoverflow.

  1. Can you give us the complete path, from root, of your eclipse install? Starting with 1.16.14, the installer should still find eclipse even with the funky paths that the OOM installer comes up with. I have no idea why the installer isn't finding your eclipse automatically, here. I can't reproduce this on my mac.

  2. The lombok uninstaller has the same 'find eclipses' capability as the installer. Mac doesn't have a registry and we aren't going to dump a bunch of crud in your homedir just to keep track of where we installed your lombok; we like it that way: No cruft. So, that part (that the uninstaller can't find a custom-install location and requires you to again specify it) is not a bug.

  3. You still have to add lombok.jar to your project as a dependency same as any other third party dependency (something like guava, for example). It's not clear from your problem description if you actually did that.

james-dekker commented 7 years ago

Hi Reinier,

Thanks for writing back...

Answer(s):

  1. /Users/dev_user/DevTools/Java/eclipse/eclipse-standard-neon2

  2. You are correct I didn't add lombok.jar to my project as a dependency - I thought that was the reason that the Installer was needed.

jfrantzius commented 7 years ago

@james-dekker so does it work for you now?