### Eclipse Workspace Patch 1.0 #P org.eclipse.rse.ui Index: UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java,v retrieving revision 1.12 diff -u -r1.12 SystemScratchpadView.java --- UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java 29 Jun 2007 14:34:15 -0000 1.12 +++ UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java 4 Jul 2007 17:46:20 -0000 @@ -14,6 +14,7 @@ * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Kevin Doyle (IBM) - [192278] Removed handleKeyPressed + * Kevin Doyle (IBM) - [189150] _selectionFlagsUpdated reset after clear action performed ********************************************************************************/ package org.eclipse.rse.internal.ui.view.scratchpad; @@ -573,12 +574,17 @@ public void selectionChanged(SelectionChangedEvent event) { + // Set _selectionFlagsUpdate to false, so the next time the context menu + // is requested we rescan the selections to determine which actions + // to show and enable/disable. + // Setting this to false will force a rescan because in fillContextMenu() + // if this is false it will call scanSelections(); + _selectionFlagsUpdated = false; IStructuredSelection sel = (IStructuredSelection)event.getSelection(); Object firstSelection = sel.getFirstElement(); if (firstSelection == null) return; - _selectionFlagsUpdated = false; ISystemViewElementAdapter adapter = getViewAdapter(firstSelection); if (adapter != null) { @@ -1211,6 +1217,8 @@ */ protected boolean showRefresh() { + if (!_selectionFlagsUpdated) + scanSelections(); return _selectionShowRefreshAction; } Index: UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearSelectedAction.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearSelectedAction.java,v retrieving revision 1.4 diff -u -r1.4 ClearSelectedAction.java --- UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearSelectedAction.java 14 May 2007 13:04:58 -0000 1.4 +++ UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearSelectedAction.java 4 Jul 2007 17:46:20 -0000 @@ -13,6 +13,7 @@ * Contributors: * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry + * Kevin Doyle (IBM) - [189150] setSelection(null) added to clear() ********************************************************************************/ package org.eclipse.rse.internal.ui.view.scratchpad; @@ -78,6 +79,7 @@ _scratchPad.removeChild(iterator.next()); } RSECorePlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad)); + _view.setSelection(null); //_view.updateActionStates(); } } Index: UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearAction.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearAction.java,v retrieving revision 1.4 diff -u -r1.4 ClearAction.java --- UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearAction.java 14 May 2007 13:04:58 -0000 1.4 +++ UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearAction.java 4 Jul 2007 17:46:20 -0000 @@ -13,6 +13,7 @@ * Contributors: * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry + * Kevin Doyle (IBM) - [189150] setSelection(null) added to clear() ********************************************************************************/ @@ -54,6 +55,7 @@ { _scratchPad.clearChildren(); RSECorePlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad)); + _view.setSelection(null); //_view.updateActionStates(); } } \ No newline at end of file