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

Bug 151484

Summary: [extract superclass] Extract Superclass" should allow multiple selected classes in package explorer
Product: [Eclipse Project] JDT Reporter: Michael Schneider <m_schnei>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: mauromol
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Michael Schneider CLA 2006-07-21 18:01:41 EDT
Currently, when I select _two_ classes in the package explorer, the "Extract Superclass" refactoring is not shown in the refactoring . I have to select one of the two classes, start the refactoring dialog, and then explicitly add the other class. This is inconvenient.
Comment 1 Mauro Molinari CLA 2017-09-21 05:38:51 EDT
I perfectly agree with this, especially because:
- the Eclipse Help seems to suggest this refactoring is available to be invoked on a "set of sibling types", while it is not: http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fref-menu-refactor.htm
- the dialog "Choose types where to extract the new superclass from" is quite uncomfortable to use (it does not have the ability to type the class name, for instance, with all the expected facilities given by similar contexts, like the "Open Type" dialog)

It was quite hard for me to discover that I had to invoke the "Extract Superclass" refactoring from a single class selection and then add types from within the dialog. Indeed, I discovered this only after I found this bug report by making an explicit query for "extract superclass" in this Bugzilla instance...

Another confusing fact is that when you select multiple types in the Project Explorer, the Refactor submenu does not show "Extract Superclass..." but does show "Extract Class..." (which however seems to operate just on one of the selected classes and does not perform what I need).
Comment 2 Eclipse Genie CLA 2020-01-03 09:53:48 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.