View | Details | Raw Unified | Return to bug 189150 | Differences between
and this patch

Collapse All | Expand All

(-)UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java (-1 / +9 lines)
Lines 14-19 Link Here
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
15
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
15
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
16
 * Kevin Doyle (IBM) - [192278] Removed handleKeyPressed
16
 * Kevin Doyle (IBM) - [192278] Removed handleKeyPressed
17
 * Kevin Doyle (IBM) - [189150] _selectionFlagsUpdated reset after clear action performed
17
 ********************************************************************************/
18
 ********************************************************************************/
18
19
19
package org.eclipse.rse.internal.ui.view.scratchpad;
20
package org.eclipse.rse.internal.ui.view.scratchpad;
Lines 573-584 Link Here
573
	public void selectionChanged(SelectionChangedEvent event)
574
	public void selectionChanged(SelectionChangedEvent event)
574
	{
575
	{
575
576
577
			// Set _selectionFlagsUpdate to false, so the next time the context menu
578
			// is requested we rescan the selections to determine which actions
579
			// to show and enable/disable.
580
			// Setting this to false will force a rescan because in fillContextMenu()
581
			// if this is false it will call scanSelections();
582
			_selectionFlagsUpdated = false;
576
		    IStructuredSelection sel = (IStructuredSelection)event.getSelection();		
583
		    IStructuredSelection sel = (IStructuredSelection)event.getSelection();		
577
			Object firstSelection = sel.getFirstElement();
584
			Object firstSelection = sel.getFirstElement();
578
			if (firstSelection == null)
585
			if (firstSelection == null)
579
			  return;
586
			  return;
580
			
587
			
581
			_selectionFlagsUpdated = false;
582
			ISystemViewElementAdapter adapter = getViewAdapter(firstSelection);
588
			ISystemViewElementAdapter adapter = getViewAdapter(firstSelection);
583
			if (adapter != null)
589
			if (adapter != null)
584
			{
590
			{
Lines 1211-1216 Link Here
1211
     */
1217
     */
1212
    protected boolean showRefresh()
1218
    protected boolean showRefresh()
1213
    {
1219
    {
1220
    	if (!_selectionFlagsUpdated)
1221
    		scanSelections();
1214
    	return _selectionShowRefreshAction;
1222
    	return _selectionShowRefreshAction;
1215
    }
1223
    }
1216
	
1224
	
(-)UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearSelectedAction.java (+2 lines)
Lines 13-18 Link Here
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
15
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
15
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
16
 * Kevin Doyle (IBM) - [189150] setSelection(null) added to clear()
16
 ********************************************************************************/
17
 ********************************************************************************/
17
18
18
package org.eclipse.rse.internal.ui.view.scratchpad;
19
package org.eclipse.rse.internal.ui.view.scratchpad;
Lines 78-83 Link Here
78
	            _scratchPad.removeChild(iterator.next());
79
	            _scratchPad.removeChild(iterator.next());
79
	        }
80
	        }
80
	        RSECorePlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad));
81
	        RSECorePlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad));
82
	        _view.setSelection(null);
81
	        //_view.updateActionStates();
83
	        //_view.updateActionStates();
82
	    }
84
	    }
83
	}
85
	}
(-)UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearAction.java (+2 lines)
Lines 13-18 Link Here
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
15
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
15
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
16
 * Kevin Doyle (IBM) - [189150] setSelection(null) added to clear()
16
 ********************************************************************************/
17
 ********************************************************************************/
17
18
18
19
Lines 54-59 Link Here
54
	{
55
	{
55
	    _scratchPad.clearChildren();
56
	    _scratchPad.clearChildren();
56
	    RSECorePlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad));
57
	    RSECorePlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad));
58
	    _view.setSelection(null);
57
	    //_view.updateActionStates();
59
	    //_view.updateActionStates();
58
	}
60
	}
59
}
61
}

Return to bug 189150