Community
Participate
Working Groups
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.
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.
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.
Committed. Will be available in next dev build.