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