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

Bug 235055

Summary: [type hierarchy] not refreshing when reopening a non-updated hierarchy
Product: [Eclipse Project] JDT Reporter: Maxime Daniel <maxime_daniel>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: martinae
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Maxime Daniel CLA 2008-06-02 03:11:53 EDT
I20080530-1730

Setup:
- project P1 with one class A;
- project P2 that has P1 on its classpath; class B in P2 that extends A in P1;
- build;
- close P2;
- build.

Steps:
- open A;
- press F4: get A and Object in the type hierarchy;
- open P2;
- build;
- from A's editor, press F4 again.
Expected: B extends A extends Object.
Get: A extends Object.

Steps:
- open B;
- press F4: get B extends A extends Object;
- open A;
- press F4: get B extends A extends Object.

Some cache seems not to be invalidated when P2 gets opened.
Comment 1 Martin Aeschlimann CLA 2008-06-02 06:21:39 EDT
I could not reproduce: After opening P2, the type hierarchy was refreshed and 'B' added.

Note that it doesn't (shouldn't) matter if 'A' or 'B' are open in the editor.
'Build' also should make any difference unless you disabled 'Auto build'

So here are my steps:

1. create Project P1 with

package p;
public class A {
}

2. create Project P2 with

package q;
public class B extends A {
}

3. use quick fix on 'A' to add P1 as required project of P2.
4. close project P2
5. Open type hierarchy on 'A': A and Object in the type hierarchy;
6. open project P2
7. Look at type hierarchy: 'B' is automatically added to TH
8. close project P2
9. Look at type hierarchy: 'B' is automatically removed from TH

The type hierarchy view listens to type hierarchy deltas.
Comment 2 Maxime Daniel CLA 2008-06-02 07:16:24 EDT
Reproduced again, but I must admit that using steps very close to mine do not exhibit the issue. Auto-build may have an impact? Anyway, the key seems to be to avoid opening the TH using the tab (use F4 as spec'd in my initial steps instead).
Please try the original steps and tell me whether you reproduce or not. Note that I am not using auto-build, which was kind of implicit (no opportunity to build explicitly when auto-build is off, except for a clean build, which I did not use).
Comment 3 Martin Aeschlimann CLA 2008-06-02 08:10:46 EDT
Ok, now I see. Autobuild is not an issue here, it can be on. Important is that the type hierarchy is hidden, and F4 is used to bring it to the front.


We call a hierarchy refresh, but are missing a UI refresh here.
Comment 4 Eclipse Genie CLA 2020-01-31 12:13:42 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.