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 |
|