Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323454 - When AJDT enabled, Annotation Processing is ignored.
Summary: When AJDT enabled, Annotation Processing is ignored.
Status: CLOSED DUPLICATE of bug 169857
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 2.1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-23 22:42 EDT by Son KwonNam CLA
Modified: 2010-08-25 00:36 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Son KwonNam CLA 2010-08-23 22:42:45 EDT
Build Identifier: 20100617-1415

In a project which is AJDT configured, and Annotation Processing is enabled, Annotation Processing does not work.

I used Eclipse 3.6 Helios, AJDT 2.1 (Version: 2.1.0.e36x-release-20100630-1500 AspectJ version: 1.6.9.20100629172100) and Hibernate Model Generator 1.0.0.Final.

If I turn of AJDT, Annotation Processing works fine.


Reproducible: Always

Steps to Reproduce:
1. Turn on AJDT
2. Enable Annotation Processing for the project for JPA2 Static Metamodel generation with Hibernate Model Generator.
3. Create a Entity Model Class with @Id and other fields.
4. Static Metamodel class is not generated.
Comment 1 Walter Harley CLA 2010-08-24 17:25:41 EDT
Possibly AJDT has a compilationParticipant that is not playing well with others?
Comment 2 Andrew Eisenberg CLA 2010-08-24 19:22:39 EDT
When you say "turn AJDT on", do you mean that you are enabling AspectJ support for a single project?  If so, does annotation processing work for non-aspectj projects?

AspectJ projects do not use the JDT builder, and so things behave slightly differently in some situations when in an AspectJ project vs a pure Java one.  I do not know how annotation processing is invoked and it may be that it is invoked by the Java builder and not the AJ builder.
Comment 3 Andrew Clement CLA 2010-08-24 21:06:57 EDT
Looks to be a dup of:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=169857
"Enabling AspectJ on project disables APT processing"

Comment 6 in that bug suggests a possible workaround of listing both the java builder and ajbuilder - I imagine that will trigger the apt stuff to run, but I can't guarantee the behaviour of the compilation that follows it.
Comment 4 Andrew Eisenberg CLA 2010-08-24 23:52:06 EDT
Thanks for catching that, Andy.  It is a duplicate.

*** This bug has been marked as a duplicate of bug 169857 ***
Comment 5 Walter Harley CLA 2010-08-25 00:36:07 EDT
Ah, that makes sense.  Yes, annotation processing (APT) is run from the Java builder, via an org.eclipse.jdt.core extension point called compilationParticipant, which is called during the Java compilation process.  If AJDT is not using the Java builder, then it is not going to get APT.