Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 374286

Summary: Provide refactorings that operate when selecting multiple fields/classes/methods/etc.
Product: [Eclipse Project] JDT Reporter: Glenview Jeff <junk>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: deepakazad
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Glenview Jeff CLA 2012-03-14 13:21:35 EDT
Build Identifier: 20110916-0149

I want to be able to multi-select methods or fields from the outline, package explorer, search views etc and perform refactorings on the multiple selections.  

At minimum this should be supported for visibility refactorings. For instance, I should be allowed to select a bunch of methods and fields and with one command, select "change visibility" and with one selection, choose "private".  Eclipse would then change the visibility of the selected group of methods and fields to private.


Reproducible: Always
Comment 1 Glenview Jeff CLA 2012-03-14 13:23:08 EDT
I omitted that this should also apply to including classes and interfaces in the selection.
Comment 2 Glenview Jeff CLA 2012-03-14 13:28:08 EDT
I'm not sure if this should be split into multiple tickets, but there should also be support for applying other refactorings like this to multiple selections.

Eclipse should figure out what's in common in the multiple selection and offer whatever refactorings make sense to apply in batch.

For instance, if I select several methods, I should get a change method signature refactoring in the context menu.  When I select it, I should be allowed to change the return type, add a field, etc. but not be allowed to change the method name because it doesn't make sense.  Many mp3 tagging programs operate like this.
Comment 3 Deepak Azad CLA 2012-04-10 01:03:29 EDT
Also see bug 28810 comment 1.

*** This bug has been marked as a duplicate of bug 24161 ***