Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324114 - [refactoring] [plan] Move of aspect will not update import statements of referenced types inside aj-specific locations
Summary: [refactoring] [plan] Move of aspect will not update import statements of refe...
Status: NEW
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 2.1.0   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 2.1.2   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 13:38 EDT by Andrew Eisenberg CLA
Modified: 2010-12-08 19:59 EST (History)
0 users

See Also:


Attachments
mylyn/context/zip (8.33 KB, application/octet-stream)
2010-08-31 14:26 EDT, Andrew Eisenberg CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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