Bug 270396 - [model] AJCompilationUnitStructureRequestor does not create annotations
Summary: [model] AJCompilationUnitStructureRequestor does not create annotations
Status: NEW
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-29 16:01 EDT by Andrew Eisenberg CLA
Modified: 2010-04-28 19:20 EDT (History)
0 users

See Also:


Attachments
partial implementation. (22.42 KB, patch)
2009-03-29 16:02 EDT, Andrew Eisenberg CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Eisenberg CLA 2009-03-29 16:01:29 EDT
I just found out that AJCompilationUnitStructureRequestor does not add annotations to the java model.  This means that the method AspectElement.getAnnotations() (and any IJavaElement created by AJCompilationUnitStructureRequestor) will always return an empty array, regardless of how many annotations are actually in the source.

It seems that the fix for this is a bit bigger than I had thought.  I am including a patch that is the start of the implementation for AJDT 1.6.5 (to make things more complicated, this class has been massively refactored for 1.7.

I'm not sure how big of an issue this is.  So far, no one has missed this behavior.  I only noticed this missing implementation because the new method AJCompilationUnit.getAllAspects was failing to return aspects with @AspectJ syntax.

If this missing implementation turns out to be important, I will revisit, but until then, I will probably not make any changes.
Comment 1 Andrew Eisenberg CLA 2009-03-29 16:02:45 EDT
Created attachment 130189 [details]
partial implementation.

This is very rough and doesn't even compile.  It is just a way to suggest how the final implementation might look.
Comment 2 Andrew Eisenberg CLA 2009-03-30 00:53:17 EDT
Just to make things clear, this lack of functionality is not affecting anything to my knowledge.

I am currently not requiring it because AJCompilationUnit.getAllAspects is implemented by asking the AJProjectModelFacade to see if a type is actually an aspect through annotation.  This works fine, but it is probably slower than creating the AJCompilationUnit correctly in the first place.
Comment 3 Andrew Eisenberg CLA 2009-09-30 14:37:25 EDT
Move to the 2.0.2 release.
Comment 4 Andrew Eisenberg CLA 2010-04-28 19:20:24 EDT
No longer slated for the next release.