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

Bug 134050

Summary: [extract superclass] incorrect type hierarchy update [refactoring]
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: jerome_lanneluc
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Martin Aeschlimann CLA 2006-03-30 05:58:52 EST
20060330-0010

- create to classes 'A' and 'B' extending 'C'. Add a member foo() to 'A'
- type hierarchy on 'C'
- on 'A' in type hierarchy invoke 'Extract Superclass'
- Enter name 'X' and press 'Add..' to also include 'B' to update to the new superclass
- press OK

- check if the hierarchy view still shows the correct result
- invoke 'Undo' and 'Redo' and observe the hierarchy.

I get various errors at different stages. At some point only 'A' is changed to 'X', sometimes the hierarchy looses all types

I verified that the type hierchy calles typeHierarchy.refresh() each time and that the viewer is also completly refreshed.
Comment 1 Jerome Lanneluc CLA 2006-04-04 13:27:49 EDT
The refactoring is not batched. As a consequence, type hierarchy refresh notifications are triggered before the refactoring has completed. Thus the type hierarchy is refreshed and show the state in the middle of the refactoring.

Moving to JDT UI to batch the refactoring (using JavaCore.run(IWorkspaceRunnable) for example)
Comment 2 Tobias Widmer CLA 2006-04-13 05:42:36 EDT
The actual application of the change is batched. What Extract Superclass does is to create a working copy layer with a private workingcopy owner. We do not change primary workingcopies.
Comment 3 Martin Aeschlimann CLA 2008-05-18 05:05:30 EDT
not for 3.4
Comment 4 Eclipse Genie CLA 2020-01-27 01:44:05 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.