Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334401

Summary: AJCompilationUnitStructureRequestor does not create annotations
Product: [Tools] AJDT Reporter: Andrew Eisenberg <andrew.eisenberg>
Component: CoreAssignee: AJDT-inbox <AJDT-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mlippert
Version: 2.1.2   
Target Milestone: 2.1.3   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Andrew Eisenberg CLA 2011-01-14 12:36:17 EST
AJCompilationUnitStructureRequestor is the class that converts from an AJ compiler AST into a JDT IJavaElement model.  As much as possible, we try to fill in all of the pieces of the IJavaElement structure model, but so far annotations have been left out.  This is partially historical because the original implementation of the structure requestor goes back pre-Java 5.  It is also partially practical as there has not been any need for it yet.

Now, there is a requirement coming in from ROO tooling that needs to analyze annotations on ITDs.  

So now, we need to figure out a way to convert AJ compiler Annotations into org.eclipse.jdt.internal.core.IAnnotations.
Comment 1 Andrew Eisenberg CLA 2011-01-20 21:47:21 EST
Some progress here.  I have marker annotations working for methods and ITDs in aspects.  I have single member annotations working when the values are simple (ie- no arrays and no nested annotations).  Normal annotations are not yet working.

I have a good regression suite that I am working against and progress is still coming.
Comment 2 Andrew Eisenberg CLA 2011-01-21 10:29:58 EST
More progress.  I am ready to commit.  Now, nested annotations are working, normal annotations (ie- annotations with values that have explicit names), arrays are working, and finally, references to enum fields are working.  This should be enough for now.  I also have a reasonable test suite for this.

My only concern is working with broken code.  I tried to ensure that there are null checks throughout the AJCompilationUnitStructureRequestor, but I may have missed some.
Comment 3 Andrew Eisenberg CLA 2011-01-21 10:33:32 EST
Committed.  Will be available in next dev build.