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 (-2 / +9 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] _selectionFlagsUpdated reset after clear action performed
16
 ********************************************************************************/
17
 ********************************************************************************/
17
18
18
package org.eclipse.rse.internal.ui.view.scratchpad;
19
package org.eclipse.rse.internal.ui.view.scratchpad;
Lines 579-591 Link Here
579
	
580
	
580
	public void selectionChanged(SelectionChangedEvent event)
581
	public void selectionChanged(SelectionChangedEvent event)
581
	{
582
	{
582
583
			// Set _selectionFlagsUpdate to false, so the next time the context menu
584
			// is requested we rescan the selections to determine which actions
585
			// to show and enable/disable.
586
			// Setting this to false will force a rescan because in fillContextMenu()
587
			// if this is false it will call scanSelections();
588
			_selectionFlagsUpdated = false;
583
		    IStructuredSelection sel = (IStructuredSelection)event.getSelection();		
589
		    IStructuredSelection sel = (IStructuredSelection)event.getSelection();		
584
			Object firstSelection = sel.getFirstElement();
590
			Object firstSelection = sel.getFirstElement();
585
			if (firstSelection == null)
591
			if (firstSelection == null)
586
			  return;
592
			  return;
587
			
593
			
588
			_selectionFlagsUpdated = false;
589
			ISystemViewElementAdapter adapter = getViewAdapter(firstSelection);
594
			ISystemViewElementAdapter adapter = getViewAdapter(firstSelection);
590
			if (adapter != null)
595
			if (adapter != null)
591
			{
596
			{
Lines 1218-1223 Link Here
1218
     */
1223
     */
1219
    protected boolean showRefresh()
1224
    protected boolean showRefresh()
1220
    {
1225
    {
1226
    	if (!_selectionFlagsUpdated)
1227
			scanSelections();
1221
    	return _selectionShowRefreshAction;
1228
    	return _selectionShowRefreshAction;
1222
    }
1229
    }
1223
	
1230
	
(-)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