Bug 578669 - Add workspace preference for enabling annotation processors
Summary: Add workspace preference for enabling annotation processors
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.23   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2022-02-10 05:49 EST by Graeme Rocher CLA
Modified: 2022-02-10 06:57 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graeme Rocher CLA 2022-02-10 05:49:34 EST
See thread discussion on Twitter https://twitter.com/graemerocher/status/1491672482893516802?s=21

Currently other IDEs like IntelliJ and Netbeans allow you to enable annotation processors by default and simply open any Maven or Gradle project and it "Just Works"

The situation is more complicated for Eclipse where you need to have a special set of plugins installed including https://github.com/jbosstools/m2e-apt and BuildShip for Gradle.

And even if you have these plugins installed you need to enable annotation processing explicitly on a per project basis (the last time I checked). Also for Gradle you explicitly have to remember to run ./gradlew eclipse prior to opening the project otherwise annotation processors are not configured correctly.

All these issues make the experience of using annotation processors subpar compared to other IDEs and we have had to document the process for newcomers explicitly in the Micronaut project

https://docs.micronaut.io/latest/guide/#ideSetup

This issue is to request that APT support is integrated by default into the JDT without special plugins and that a command line command (gradle eclipse) doesn't need to be run for Gradle support to work thus improving the developer experience for Eclipse users.
Comment 1 Mickael Istria CLA 2022-02-10 05:52:12 EST
Can you please open separate tickets?
* BuildShip is included by default in packages (no ticket to open then)
* The m2e-apt story should be reported to m2e https://github.com/eclipse-m2e/m2e-core/issues
* So this ticket could be retitled to focus on the " allowing globally enabling annotation processor support" which belongs to JDT
Comment 2 Andrey Loskutov CLA 2022-02-10 05:56:09 EST
(In reply to Mickael Istria from comment #1)
> * So this ticket could be retitled to focus on the " allowing globally
> enabling annotation processor support" which belongs to JDT

Right. Right now I see the preference is always per project, and there is no workspace wide preferences UI.
Comment 3 Andrey Loskutov CLA 2022-02-10 05:57:05 EST
Whoever interested: feel free to contribute. https://wiki.eclipse.org/JDT_UI/How_to_Contribute
Comment 4 Graeme Rocher CLA 2022-02-10 06:57:43 EST
Here is the 5 year old ticket for the BuildShip usability issue https://github.com/eclipse/buildship/issues/329

Looks like you already created an issue in m2e-eclipse https://github.com/eclipse-m2e/m2e-core/issues/578