Bug 105666 - [extract interface] provide extract from usage [refactoring]
Summary: [extract interface] provide extract from usage [refactoring]
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-01 09:44 EDT by Adam Kiezun CLA
Modified: 2007-06-14 10:42 EDT (History)
1 user (show)

See Also:


Attachments

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