| Summary: | [CommonNavigator][Java] Deleting multiple projects does not remove them from project explorer | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Wolfgang Knauf <wolfgang.knauf> | ||||||||
| Component: | UI | Assignee: | Michael D. Elder <mdelder> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | major | ||||||||||
| Priority: | P3 | CC: | daniel_megert, Kevin_Haaland, markus.kell.r, martinae, Mike_Wilson, rfrost | ||||||||
| Version: | 3.2 | ||||||||||
| Target Milestone: | 3.2 RC4 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Wolfgang Knauf
Created attachment 40194 [details]
Project Explorer before/after deletion
I cannot always repro this (i.e. I've been able to delete multiple projects and sometimes all of the existing projects without hitting the issue), however, I have seen it (haven't tried enough scenarios to nail down exactly what is triggering it); when it happened I didn't see anything in the .log file, the navigator view did not show the projects and simply closing and reopening the project explorer view was sufficient to refresh the content (i.e. you don't need to shutdown and restart Eclipse). Wolfgang: does this match your experience? The key seems to be deleting an EAR and at least two dependent module projects (type doesn't appear to be relevant). When the Java extension refreshes the tree, it does so using IJavaModel, which is not the root of the viewer. The attached patch converts the IJavaModel to ViewerInput, if it is part of the set to be refreshed. Created attachment 40381 [details]
Converts IJavaModel to Viewer Input.
The fix here is simple, and it would be keen if this could make it into RC3. Can you explain what the fix does in more detail? doh. missed comment #4. +1. Michael, I tested the fix, but it does not work. When I set a breakpoint in postRefresh() and then delete 2 IJavaProjects in the Project Explorer, I see that getViewerInput() returns an IJavaModel as well, so the patch is a no-op. The two projects are deleted, but the Project Explorer is not refreshed and still shows them. The fix did work locally. I'll take a look. What does your env look like? Created attachment 40418 [details]
Remembers real viewer input
I would still like to see this for 3.2. McQ approved for 3.2RC3, could you verify approval for 3.2RC4 again? Also, Martin -- can you review and give feedback? The patch seems reasonable. If everyone is comfortable with it, and it has had serious testing, then +1. Martin or Kevin? Any feedback on this one? I reviewed and approve the patch. Markus, can you do the second review? Michael, we need the OK of 3 component leads. You have mine. Adding Dani for a second one. Patch looks good and works. I'll release when we have a third +1. Looked at the patch. Approving to fix for 3.2 RC4. One minor issue: the patch might fail in the future because it assumes that Iterator.remove() always works but in fact this is not true for all implementations of List. Should someone call postRefresh(List, boolean) in the future with a List that does not support remove() then the patch fails. Markus, I'll do the releasing. McQ, is your +1 also valid for RC4? We first have to post the bug to the mailing-list as others have the right to veto the change. Oh, McQ already approved for RC4 in comment 13. I'll then post the bug to the mailing list. patch released > 20060510 verifying for I20060512-0010 verified Verifieid in Eclipse 3.2 RC7 / WTP1.5 RC5. Thanks for fixing it. |