Bug 105666

Summary: [extract interface] provide extract from usage [refactoring]
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: bmiller
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Adam Kiezun CLA 2005-08-01 09:44:27 EDT
3.1
i was doing a demo of extract interface and an obvious improvement struck me.
Example:
 consider a class MyVector extends Vector in your code (has lost of members)
and a client that uses only 2 of those members.

Now, it would be great to open the refactoring in the client and do:
extract interface from MyVector and put in that interface only those members
that this client uses (+required)

It would greatly simplify the workflow. Currectly, I have to hunt those 2
members in the long list.
Comment 1 Tobias Widmer CLA 2005-08-10 04:36:57 EDT
We could enable Extract Interface on type occurrences (instead of type 
declarations) and determine the methods to extract from the context, eg. if a 
field declaration of type MyVector is selected, we would search for all 
methods declared in MyVector which are called on the field.

Is that what you have in mind?
Comment 2 Adam Kiezun CLA 2005-08-10 10:33:38 EDT
precisely