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

Bug 327148

Summary: [refactor] Move refactoring wizard fails when moving a constant into an aspect
Product: [Tools] AJDT Reporter: Andrew Eisenberg <andrew.eisenberg>
Component: CoreAssignee: AJDT-inbox <AJDT-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Andrew Eisenberg CLA 2010-10-06 13:44:29 EDT
The move refactoring wizard fails when moving a constant into an aspect.  Note that drag and drop works because it does not perform the same validation and it does not update references.

Example:

Movable.java

interface Movable {
	int MAX = 9;
}

aspect Aspect {
	public static final int MIN = Movable.MAX -8;
}

Drag and drop and the operation succeeds, but does not update the reference to MAX in Aspect.  Use the move wizard and there is an exception on the TextChange object.  I am certain that this is happening because the source code used for the move is not properly transformed.

Note that I would expect the result to be:

aspect Aspect {
	public static final int MIN = Aspect.MAX -8;
	public static final int MAX = 9;
}