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

Bug 324114

Summary: [refactoring] [plan] Move of aspect will not update import statements of referenced types inside aj-specific locations
Product: [Tools] AJDT Reporter: Andrew Eisenberg <andrew.eisenberg>
Component: CoreAssignee: AJDT-inbox <AJDT-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1.0   
Target Milestone: 2.1.2   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Andrew Eisenberg CLA 2010-08-31 13:38:40 EDT
example:

src/p/Aspect.aj:

package p;
aspect Aspect {
  declare parents : Foo extends Bar;
}

src/p/Foo.java:
package p;
public class Foo { }

src/p/Bar.java:
package p;
public class Bar { }

If Aspect.aj is moved to another package, import statements should be added for Foo and Bar, but they are not.

The solution here is a little tricky since the way that JDT calculates this is through an ImportRewrite, which is not something that we generally have access to.
Comment 1 Andrew Eisenberg CLA 2010-08-31 14:18:41 EDT
It looks like I need to augment the ReferenceFinderUtil class so that references found inside of a type also include references inside of aspect-specific locations.
Comment 2 Andrew Eisenberg CLA 2010-08-31 14:23:11 EDT
Hmmm...not going to be easy since we don't have bindings available in aspect-specific locations.

Attaching a mylyn context so that I can look at this later.
Comment 3 Andrew Eisenberg CLA 2010-08-31 14:26:58 EDT
Created attachment 177873 [details]
mylyn/context/zip

context