mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 23:05:47 +02:00
[367357] system table-tree view not showing refresh action
This commit is contained in:
parent
0d59141d99
commit
a090799028
1 changed files with 41 additions and 29 deletions
|
@ -20,6 +20,7 @@
|
|||
* David McKnight (IBM) - [296877] Allow user to choose the attributes for remote search result
|
||||
* David McKnight (IBM) - [357587] Custom sorter is changed to SystemTableViewSorter
|
||||
* David McKnight (IBM) - [363392] system table views shows open view actions when they shouldn't
|
||||
* David McKnight (IBM) - [367357] system table-tree view not showing refresh action
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view;
|
||||
|
@ -966,7 +967,6 @@ public class SystemTableTreeView
|
|||
// REMOTE RESOURCE DELETED...
|
||||
// --------------------------
|
||||
case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED :
|
||||
{
|
||||
{
|
||||
Object dchild = remoteResource;
|
||||
|
||||
|
@ -1008,8 +1008,6 @@ public class SystemTableTreeView
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
// --------------------------
|
||||
|
@ -1361,6 +1359,16 @@ public class SystemTableTreeView
|
|||
scanSelections();
|
||||
return _selectionShowRenameAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decides whether to even show the refresh menu item.
|
||||
* Assumes scanSelections() has already been called
|
||||
*/
|
||||
protected boolean showRefresh() {
|
||||
if (!_selectionFlagsUpdated)
|
||||
scanSelections();
|
||||
return _selectionShowRefreshAction;
|
||||
}
|
||||
/**
|
||||
* Required method from ISystemRenameTarget
|
||||
* Decides whether to enable the rename menu item.
|
||||
|
@ -1580,6 +1588,9 @@ public class SystemTableTreeView
|
|||
SystemView.createStandardGroups(menu);
|
||||
|
||||
// ADD COMMON ACTIONS...
|
||||
if (showRefresh()) {
|
||||
menu.appendToGroup(ISystemContextMenuConstants.GROUP_BUILD, getRefreshAction());
|
||||
}
|
||||
|
||||
// COMMON RENAME ACTION...
|
||||
if (canRename())
|
||||
|
@ -1597,6 +1608,9 @@ public class SystemTableTreeView
|
|||
{
|
||||
Object element = elements.next();
|
||||
ISystemViewElementAdapter adapter = getViewAdapter(element);
|
||||
if (adapter == null){
|
||||
System.out.println("no adapter for "+element);
|
||||
}
|
||||
adapters.put(adapter, element); // want only unique adapters
|
||||
}
|
||||
Enumeration uniqueAdapters = adapters.keys();
|
||||
|
@ -1670,8 +1684,6 @@ public class SystemTableTreeView
|
|||
menu.appendToGroup(ISystemContextMenuConstants.GROUP_OPEN, showInTableAction);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue