Bug 159438

Summary: [extract method] Remove limitation of "extract method" refactoring to current file
Product: [Eclipse Project] JDT Reporter: Sergey Yevtushenko <sergey.yevtushenko>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Sergey Yevtushenko CLA 2006-10-02 06:09:50 EDT
In many cases it is necessary to perform simple "extract method" refactoring for many files in the project/workspace. At present it must be done for each file separately. It is OK for 1-5 files, but is too time consuming if number of files exceeds that range.
Comment 1 Martin Aeschlimann CLA 2006-10-05 09:22:58 EDT
You want 'extract method' to replace all other occurences of the extracted code?

Comment 2 Martin Aeschlimann CLA 2006-10-05 09:23:24 EDT
(in other files)
Comment 3 Sergey Yevtushenko CLA 2006-10-05 09:34:37 EDT
> You want 'extract method' to replace all other occurences of the extracted
> code?

Yes, it would be great.

To be more exact, I think it would be convenient to have (combobox?) choice for the scope of the action - file/project/workspace. Perhaps it might be also convenient to select the location for the extracted method - current file/common base class/static method in explicitly specified class. Last choice, of course, should be available only if there are no dependencies on instance variables.
Comment 4 Benjamin Muskalla CLA 2009-08-02 09:06:31 EDT
While this request is valid, your second thoughts about the destination are already covered by bug 225716