Project: Eclipse_Platform_UI
Bug 186344 [CommonNavigator] Project Explorer duplicates Working Set actions
Reported: 2007-05-10 08:19:23 | Status: resolved fixed

M7 The Project Explorer sometimes creates duplicate Working Set related view menu items. This seems to be triggered by "Link with Editor" on startup where two instances of WorkingSetActionProvider are created and initialized. The following is a stack trace at the point where the WorkingSetActionProvider adds its actions. Note the recursion starting in NavigatorActionService.getActionProviderInstance() Thread [main] (Suspended (breakpoint at line 277 in WorkingSetActionProvider)) owns: HashMap<K,V> (id=142) owns: RunnableLock (id=143) WorkingSetActionProvider.fillActionBars(IActionBars) line: 277 NavigatorActionService.initialize(String, CommonActionProvider) line: 353 NavigatorActionService.getActionProviderInstance(CommonActionProviderDescriptor) line: 332 NavigatorActionService.fillActionBars(IActionBars) line: 236 CommonNavigatorManager.selectionChanged(SelectionChangedEvent) line: 217 Viewer$2.run() line: 162 SafeRunner.run(ISafeRunnable) line: 37 Platform.run(ISafeRunnable) line: 850 JFaceUtil$1.run(ISafeRunnable) line: 46 SafeRunnable.run(ISafeRunnable) line: 193 CommonViewer(Viewer).fireSelectionChanged(SelectionChangedEvent) line: 160 CommonViewer(StructuredViewer).updateSelection(ISelection) line: 2039 CommonViewer(StructuredViewer).handleInvalidSelection(ISelection, ISelection) line: 1102 CommonViewer(StructuredViewer).preservingSelection(Runnable, boolean) line: 1376 CommonViewer(TreeViewer).preservingSelection(Runnable, boolean) line: 377 CommonViewer(StructuredViewer).preservingSelection(Runnable) line: 1325 CommonViewer(AbstractTreeViewer).inputChanged(Object, Object) line: 1417 CommonViewer(ContentViewer).setInput(Object) line: 251 CommonViewer(StructuredViewer).setInput(Object) line: 1601 WorkingSetActionProvider.restoreState(IMemento) line: 237 NavigatorActionService.initialize(String, CommonActionProvider) line: 350 NavigatorActionService.getActionProviderInstance(CommonActionProviderDescriptor) line: 332 NavigatorActionService.fillActionBars(IActionBars) line: 236 CommonNavigatorManager.selectionChanged(SelectionChangedEvent) line: 217 Viewer$2.run() line: 162 SafeRunner.run(ISafeRunnable) line: 37 Platform.run(ISafeRunnable) line: 850 JFaceUtil$1.run(ISafeRunnable) line: 46 SafeRunnable.run(ISafeRunnable) line: 193 CommonViewer(Viewer).fireSelectionChanged(SelectionChangedEvent) line: 160 CommonViewer(StructuredViewer).updateSelection(ISelection) line: 2039 CommonViewer(StructuredViewer).setSelection(ISelection, boolean) line: 1636 CommonViewer(TreeViewer).setSelection(ISelection, boolean) line: 1031 CommonViewer.setSelection(ISelection, boolean) line: 325 CommonNavigator.selectReveal(ISelection) line: 313 LinkEditorAction$2.runInUIThread(IProgressMonitor) line: 91 UIJob$1.run() line: 94 [...]

Files changed in fix:
bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/NavigatorActionService.java