Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Eclipse plugin not working but manually adding javaagent to eclipse.ini works #3621

Open
hohwille opened this issue Mar 7, 2024 · 3 comments

Comments

@hohwille
Copy link

hohwille commented Mar 7, 2024

Describe the bug
I exactly followed the eclipse plugin installation instructions.
Also I restarted eclipse, cleaned my project, etc. however lombok is not working this way.
I verified using About Eclipse IDE > Installation Details that it is installed:

  Lombok	1.18.30	org.projectlombok.feature.feature.group	null

Also when I go to Configuration tab and filter for lombok, I see:

*** Plug-in Registry:
org.projectlombok.agent (1.18.30) "Lombok Agent" [Resolved]

*** User Preferences:
...

*** Current Install Configuration:

Id: org.projectlombok.agent, Version: 1.18.30, Location: reference:file:../../plugins/eclipse/plugins/org.projectlombok.agent_1.18.30/

But having a simple class like this cannot compile:

@Data
public class LombokTest {

  private String name;

  public LombokTest() {
    setName("foo");
  }
}

So IMHO the eclipse plugin is broken and it is not a bug of Lombok itself.

However, all works fine when I manually add lombok to eclipse.ini via -javaagent:«path-to-lombok.

To Reproduce
See above:

Expected behavior
Lombok should become active and hook into the Java compiler to generate getters/setters/logger/...

Version info (please complete the following information):

  • Lombok version 1.18.30
  • Platform eclipse (Version: 2023-12 (4.30.0), Build id: 20231201-2043)
  • Java version: 17.0.10, vendor: Eclipse Adoptium
  • OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Additional context
To underline why I see it important to make it work in Eclipse without changing the eclipse.ini file:

I am using (and maintaining) devonfw-ide and its successor IDEasy that fully automates the installation and configuration of the tools for arbitrary development projects. We create a software repository of pristine tool installations to be shared by multiple projects on the same computer (multi-tenancy) and therefore "hacking" eclipse.ini is not a preferable option. We can install plugins automatically and those are installed separate from the actual Eclipse (or IntelliJ or VSCode) installation and could easily ship lombok for projects that want to use it out-of-the-box on the silver plate if the lombok plugin would actually work.

So currently as a workaround I am modifying my eclipse.ini file to make it work but as soon as I change the eclipse version and reinstall all plugins automatically the changes to eclipse.ini are gone and have to be redone. Also I am using the same eclipse on my disc for other projects that do not want to use lombok. Surely the lombok support does not hurt there but imagine two projects on my machine both use the same Eclipse version but two different lombok versions - that would break and therefore I would prefer the plugin approach.

@rspilker
Copy link
Collaborator

The easiest way to confirm it's properly installed is to open the Help About Eclipse IDE dialog. In the white rectangular area, just above the bar with all the logo's (you may need to resize or scroll), the last line should be a text like:

Lombok v1.18.30 "Envious Ferret" is installed. https://projectlombok.org/

@Ernio3
Copy link

Ernio3 commented Mar 19, 2024

Similar issue: #3632 but only with 'onX' feature.
Possibly problems with eclipse itself?

@nlisker
Copy link

nlisker commented Apr 4, 2024

I encountered the same issue with Eclipse 03-2024 and Lombok 1.18.32. Installing via the update site didn't solve the errors that happen after updating eclipse. Manually downloading the jar and installing through it did work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants