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 / +4 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
			_selectionFlagsUpdated = false;
583
		    IStructuredSelection sel = (IStructuredSelection)event.getSelection();		
584
		    IStructuredSelection sel = (IStructuredSelection)event.getSelection();		
584
			Object firstSelection = sel.getFirstElement();
585
			Object firstSelection = sel.getFirstElement();
585
			if (firstSelection == null)
586
			if (firstSelection == null)
586
			  return;
587
			  return;
587
			
588
			
588
			_selectionFlagsUpdated = false;
589
			ISystemViewElementAdapter adapter = getViewAdapter(firstSelection);
589
			ISystemViewElementAdapter adapter = getViewAdapter(firstSelection);
590
			if (adapter != null)
590
			if (adapter != null)
591
			{
591
			{
Lines 1218-1223 Link Here
1218
     */
1218
     */
1219
    protected boolean showRefresh()
1219
    protected boolean showRefresh()
1220
    {
1220
    {
1221
    	if (!_selectionFlagsUpdated)
1222
			scanSelections();
1221
    	return _selectionShowRefreshAction;
1223
    	return _selectionShowRefreshAction;
1222
    }
1224
    }
1223
	
1225
	
(-)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