Community
Participate
Working Groups
RC2 - two windows, one as browsing perspective - drill into a project in browsing perspective (down to members view) - close project. observe: the browsing perspective shows stale information.
RC2 candidate
Happens on RC1
Dani, can you please assess if we should do something for RC2. Was this a problem in 2.1.* ?
Not a regression - did not work in 2.x. either. JDT UI tests the delta for open/closed flags: if (elementType == IJavaElement.JAVA_PROJECT) { // handle open and closing of a project if ((flags & (IJavaElementDelta.F_CLOSED | IJavaElementDelta.F_OPENED)) != 0) { postRefresh(element); return; which is not sent. What's sent is: Java Model[*]: {CHILDREN | CONTENT} Test[-]: {} ResourceDelta(/Test)[*] where Test is the closed project. Note: the same problem arises if you only have on window and close the project from another view e.g. the Package Explorer
Note that the F_CLOSED and F_OPENED were not set in 2.0 either. Only in 1.0 were they set.
Pls investigate if actually our bug or lack of consistency in UI. What surprises me is that the package explorer seems happy.
Comment #5 seems to imply this is a UI bug.
Yes this is a UI bug, but UI would fix it easily if we had the F_CLOSED flag set.
Created attachment 11580 [details] Proposed patch Changed DeltaProcessor to create a CHANGED delta with F_CLOSED/F_OPENED flag set if the project is closed/opened. Changed TypeHierarchy delta processing to handle this flag.
Created attachment 11581 [details] Updated tests Changed JavaElementDeltaTests and JavaProjectTests to reflect this change.
Dani, even with this patch the Java Browsing perspective is still showing stale information. You can reproduce the problem if you delete the project instead of closing it.
Please file a separate bug if you can reproduce this. re comment 7: I cannot see how comment 5 would imply an UI bug - can you explain (UI has the code which deals with the open/close flags in-place hence it would work if Core sent the expected delta) Note: The reason why the Package Explorer works is pure luck: if there are more than 1 resource delta included in the JMDelta it refreshes the parent, in this case the Java Model itself. If this optimization gets changed in the future the Package Explorer would suffer the same problem.
See bug 65686. Looks like a UI bug :-)
Entered bug 65943 against JDT Core to fix the delta problem. Moving back to JDT UI as even with the fix for bug 65943, the original problem is still there. Note it looks like a dup of bug 65686, but according to Dani they are 2 different bugs.
Removing target milestone. Will add back in case J Core fixes the dependent bug.
Will be reopened once bug 65943 has been fixed.
.
verified that this bug is fixed.