Bug 99963 - [extract local] on generic 'this' needs type arguments
Summary: [extract local] on generic 'this' needs type arguments
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 80472
Blocks:
  Show dependency tree
 
Reported: 2005-06-14 10:17 EDT by Markus Keller CLA
Modified: 2006-06-16 06:15 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 Markus Keller CLA 2005-06-14 10:17:35 EDT
I20050610-1757 (3.1RC2)

Extract Local Variable, Extract Method and Introduce Parameter don't add type
arguments when extracting 'this' of a generic type:

Select 'this' in the class below => the type is always just MyArrayList.
Expected: MyArrayList<E>.

class MyArrayList<E> extends ArrayList<E> {
	void inspect() {
		for (Iterator<E> iter= this.iterator(); iter.hasNext();) {
			iter.next();
		}
	}
}
Comment 1 Dirk Baeumer CLA 2005-06-14 18:42:25 EDT
Very minor since normally clients will not extract this. Markus, JDT core
returns a generic type binding here (the problem we discussed). Right ?
Comment 2 Markus Keller CLA 2005-06-15 04:55:15 EDT
Correct, depends on bug 80472.
Comment 3 Markus Keller CLA 2006-06-16 06:15:45 EDT
The fix for bug 80472 has resolved this issue.
Added regression test for Extract Local Variable.