Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321065 - [plan] [refactoring] Push in refactoring with generics in parameter
Summary: [plan] [refactoring] Push in refactoring with generics in parameter
Status: RESOLVED FIXED
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.1   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-27 16:05 EDT by Andrew Eisenberg CLA
Modified: 2010-08-19 20:00 EDT (History)
0 users

See Also:


Attachments

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