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

Bug 148570

Summary: [hierarchy] Hierarchy view not updated after undoing rename class
Product: [Eclipse Project] JDT Reporter: Koen van Dijken <koen.van.dijken>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Koen van Dijken CLA 2006-06-25 14:42:34 EDT
The hierachy view does not refresh after undoing renaming of a class. In this snippet of code:

public class Test {
  class A {
  }

  class B extends A {
  }

  public static void main(String[] args) {
  }
}

When the hierarchy view on A is opened and showing its subtypes, B is visible.
Select B in the editor, alt-shift-R to rename it to C, the hierarchy view is updated and now shows C. This is good.

After undoing (ctrl-z) it (so renaming C back to B), the hierarchy view still shows C instead of B (the editor is not dirty now).

Eclipse SDK
Version: 3.2.0
Build id: I20060602-1317
Comment 1 Martin Aeschlimann CLA 2006-06-26 06:07:36 EDT
reproduced in I20060620-1010

In the debugger it seems that we get IElementChangedListener.elementChanged(ElementChangedEvent)
but no ITypeHierarchyChangedListener#typeHierarchyChanged.

Comment 2 Jerome Lanneluc CLA 2006-06-27 10:19:19 EDT
The hiearchy view should be updated on save only. Do you see it updated when the editor is dirty ?
Comment 3 Jerome Lanneluc CLA 2007-06-21 11:15:30 EDT
I can reproduce the oposite using 3.3RC4. When renaming, B to C using Alt+Shift+R, the hierarchy is not updated. Using Ctrl+Z and Ctrl+S, it is updated.

Note this can be reproduced only if using Alt+Shift+R. If you edit and save, the hierarchy is updated.
Comment 4 Jerome Lanneluc CLA 2008-05-07 10:22:40 EDT
(In reply to comment #3)
> I can reproduce the oposite using 3.3RC4. When renaming, B to C using
> Alt+Shift+R, the hierarchy is not updated. Using Ctrl+Z and Ctrl+S, it is
> updated.
I can no longer reproduce this behavior.

For the original problem from comment 0, I cannot verify if it is fixed because of bug 230897.
Comment 5 Jerome Lanneluc CLA 2008-05-07 10:45:50 EDT
Actually bug 230897 was a temporary glitch. 
I can still reproduce problem from comment 0 from time to time. Suspecting a timing issue.
Comment 6 Eclipse Genie CLA 2020-01-12 06:11:13 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.