[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jdt-core-dev] Apt processor handling
|
My list of problems with Eclipse built-in annotation processing support
is longer
* Due to a bug in annotation processing jsr, a class of annotation
processors cannot be supported by incremental build environment like
Eclipse. I have couple of ideas how to improve this, but didn't really
have time to work on them yet.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=447546
* Some annotation processors fail to report "originating" elements when
calling Filer #createNNN methods. This makes such processors
incompatible with incremental build.
* It is not possible to have multiple generated sources/resources
locations per project, which is required to support Maven and I assume
other modern build systems.
* Likewise, all all annotation processors work on all project sources,
which makes support for Maven main/test sources impossible.
* It is not possible to control which processors will be used for a
project, Eclipse unconditionally runs all processors it finds on
processor path.
>From my experience, these limitations make Eclipse's built-in annotation
processing support unusable for all but the most simple projects. We had
to develop alternative approach to integrate annotation processors in
Eclipse.
--
Regards,
Igor
On Thu, Sep 29, 2016, at 07:58 AM, Lars Vogel wrote:
> Dear JDT core developers,
>
> A fellow Java champion pointed out to me that the annotation
> processing setup in Eclipse is very complex compared to other IDEs.
> Here is what we wrote me (slightly reworked for readability):
>
> QUOTE_BEGIN
> ------------
> - NetBeans automatically finds APT JARs in the classpath. You can't
> turn it off. You can't tweak any settings.
> - IntelliJ allows to activate APT processing (per project) with a
> checkbox; this will find all available APT JARs in the classpath by
> default. You can also configure which JARs may be used.
> - Eclipse forces you to locate and define every APT JAR by hand, per
> project.
>
> This means NB is on one side of the spectrum (fully automatic) where
> Eclipse is at the opposite side (fully manual), while Intellij sits
> somewhere in between.
>
> Example instructions for all IDEs can be found at
> http://griffon-framework.org/tutorials/1_getting_started.html#_tutorial_1_4
> ------------
> QUOTE_END
>
> I have not used apt-processors myself in Eclipse but this setup sounds
> relatively complex compared to the other alternatives.
>
> Are there plans to improve this? Without knowing the technical details
> here, maybe a "Search in project classpath" option could be added?
>
> If I understood him correctly, several customers are selecting NB or
> IntelliJ because of that complex Eclipse setup and I promised him to
> to ping the JDT developers about this.
>
> Best regards, Lars
> --
> Eclipse Platform UI and e4 project co-lead
> CEO vogella GmbH
>
> Haindaalwisch 17a, 22395 Hamburg
> Amtsgericht Hamburg: HRB 127058
> Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
> USt-IdNr.: DE284122352
> Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web:
> http://www.vogella.com
> _______________________________________________
> jdt-core-dev mailing list
> jdt-core-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
> Email had 1 attachment:
> + annotation_processing.png
> 110k (image/png)