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

Bug 321065

Summary: [plan] [refactoring] Push in refactoring with generics in parameter
Product: [Tools] AJDT Reporter: Andrew Eisenberg <andrew.eisenberg>
Component: CoreAssignee: AJDT-inbox <AJDT-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1.0   
Target Milestone: 2.1.1   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Andrew Eisenberg CLA 2010-07-27 16:05:57 EDT
Example:

aspect Aspect {
  void Other<P>.x(String s) { 	}
}

class Other<T> { }

Select push in refactoring on Other.x() and the name is improperly mangled.  Here is the resuling Other class:

public class Other<T> { 
	
	void Other$P$$x(String s) {	}
}
Comment 1 Andrew Eisenberg CLA 2010-08-19 20:00:04 EDT
Committed a fix along with regression tests.

In order to get this working, I had to add a proper way to get the source location for the target type portion of an itd.  Now, I can correctly calculate the source location of the target type.  Eg-

void SomeClass<X>.foo() { }

Calling IntertypeElement.getTargetTypeSourceRange(), will return the source range for "SomeClass".  It will include package qualifications.