Community
Participate
Working Groups
I20100520-1744 Steps - New Workspace - New Java project - In 'Project Explorer' right click on the java project -> Build Path -> Configure Build Path - 'Libraries' tab -> 'Add Library' -> add JUnit 3 and click Ok to close the dialog => The newly added library does not show up in Project Explorer - Manually refresh the project (F5) => Library added in last step shows up Auto refresh also does not happen when the library is removed.
Isn't this JDT? Or its an issue with Common Navigator?
(In reply to comment #1) > Isn't this JDT? Or its an issue with Common Navigator? I guess this could be more of JDT rather than common navigator. Moving to JDT for comments
Worked fine up to 3.6M6, broken in 3.6M7.
Debugged change down into org.eclipse.ui.internal.navigator.NavigatorPipelineService.interceptRefresh(PipelinedViewerUpdate): In M6, contentService.findOverrideableContentExtensionsForPossibleChild(refreshable) returned a: Content[org.eclipse.ui.navigator.resourceContent(5) , "Resources"] Instance , but in M7, it finds nothing for an IJavaProject.
(In reply to comment #4) > Debugged change down into > org.eclipse.ui.internal.navigator.NavigatorPipelineService.interceptRefresh(PipelinedViewerUpdate): > > In M6, > contentService.findOverrideableContentExtensionsForPossibleChild(refreshable) > returned a: > Content[org.eclipse.ui.navigator.resourceContent(5) , "Resources"] Instance > , but in M7, it finds nothing for an IJavaProject. I will have a look.
When I revert bug 285353, this works again. Hint: Change was in /org.eclipse.ui.navigator.resources/plugin.xml 1.44.
Created attachment 170833 [details] Fix If I understood that correctly, we're not getting a refresh from the resource contribution for free any more, since bug 285353 stopped adapting the element to IProject (and the resource contribution does not know about IJavaProject). This patch implements the necessary mapping from IJavaProject to IProject in JavaNavigatorContentProvider#postRefresh(List, boolean, Collection). In #postAdd(..) and in all the intercept*(..) methods, we already do the same.
(In reply to comment #7) > Created an attachment (id=170833) [details] > Fix > > If I understood that correctly, we're not getting a refresh from the resource > contribution for free any more, since bug 285353 stopped adapting the element > to IProject (and the resource contribution does not know about IJavaProject). > > This patch implements the necessary mapping from IJavaProject to IProject in > JavaNavigatorContentProvider#postRefresh(List, boolean, Collection). In > #postAdd(..) and in all the intercept*(..) methods, we already do the same. +1 this looks good to me. Thanks for tracking this down.
The patch looks safe. Markus, please check whether the navigator change causes other JDT functionality in the Project Explorer to be broken. If that's not the case then +1 to fix for RC4.
(In reply to comment #9) I didn't find other problems that could have been caused by bug 285353 and that would not be fixed with the proposed fix. We should fix this for RC4. This bug is visible as soon as you try to apply any classpath changes. E.g. when you change the JRE System Library, the Project Explorer is also not refreshed. This will surely cause great confusion if we don't fix it. The fix is small, safe, and only targets the Project Explorer. Boris, could you please review the fix and give your +1?
Waiting for a new patch. There should be two loops, one to do the mapping, and a second one to detect the workspace root case.
Created attachment 170866 [details] Fix 2 The previous patch had a theoretical problem: If 'toRefresh' contains an IJavaModel and an IJavaProject after the model, then the IJavaProject will not be converted because of the early return statement inside the loop. This cannot happen in practice, and if it happens, it's not a problem, since the IJavaModel refresh also refreshes the project. But since we're in RC4, we will play super-safe and use 2 loops.
Looks good! +1 for RC4.
+1 from me as well.
Thanks everybody. Fix 2 released to HEAD for I20100603-0100.
Verified in I20100603-0100.