mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 23:55:26 +02:00
[159969] - Rename should be bound to the F2 key. The rename action has been set as a global action for Remote Systems view, table view and scratchpad view.
This commit is contained in:
parent
e4af8f54b7
commit
c605ff0a4e
4 changed files with 14 additions and 0 deletions
|
@ -66,6 +66,7 @@ public class SystemCommonRenameAction extends SystemBaseDialogAction
|
|||
{
|
||||
super(SystemResources.ACTION_RENAME_LABEL, SystemResources.ACTION_RENAME_TOOLTIP,
|
||||
RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_RENAME_ID), parent);
|
||||
setSelectionProvider(target);
|
||||
allowOnMultipleSelection(true);
|
||||
setProcessAllSelections(true);
|
||||
renameTarget = target;
|
||||
|
|
|
@ -64,6 +64,7 @@ import org.eclipse.rse.ui.SystemPropertyResources;
|
|||
import org.eclipse.rse.ui.SystemResources;
|
||||
import org.eclipse.rse.ui.SystemWidgetHelpers;
|
||||
import org.eclipse.rse.ui.actions.SystemCommonDeleteAction;
|
||||
import org.eclipse.rse.ui.actions.SystemCommonRenameAction;
|
||||
import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
|
||||
import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
|
||||
import org.eclipse.rse.ui.actions.SystemRefreshAction;
|
||||
|
@ -1069,6 +1070,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener,
|
|||
private SystemCopyToClipboardAction _copyAction;
|
||||
private SystemPasteFromClipboardAction _pasteAction;
|
||||
private SystemCommonDeleteAction _deleteAction;
|
||||
private SystemCommonRenameAction _renameAction;
|
||||
|
||||
private IMemento _memento = null;
|
||||
private IAdaptable _mementoInput = null;
|
||||
|
@ -1160,11 +1162,15 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener,
|
|||
_copyAction = new SystemCopyToClipboardAction(_viewer.getShell(), clipboard);
|
||||
_pasteAction = new SystemPasteFromClipboardAction(_viewer.getShell(), clipboard);
|
||||
_deleteAction = new SystemCommonDeleteAction(_viewer.getShell(), _viewer);
|
||||
_renameAction = new SystemCommonRenameAction(_viewer.getShell(), _viewer);
|
||||
|
||||
editorActionHandler.setCopyAction(_copyAction);
|
||||
editorActionHandler.setPasteAction(_pasteAction);
|
||||
editorActionHandler.setDeleteAction(_deleteAction);
|
||||
editorActionHandler.setSelectAllAction(new SelectAllAction());
|
||||
|
||||
// register rename action as a global handler
|
||||
getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.RENAME.getId(), _renameAction);
|
||||
|
||||
registry.addSystemResourceChangeListener(this);
|
||||
registry.addSystemRemoteChangeListener(this);
|
||||
|
|
|
@ -383,6 +383,7 @@ public class SystemViewPart
|
|||
// added by Phil in 3.0 ...
|
||||
//actionBars.setGlobalActionHandler(IWorkbenchActionConstants.PROPERTIES, systemView.getPropertyDialogAction(); hmm, different one for local vs remote objects
|
||||
actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), systemView.getRefreshAction());
|
||||
actionBars.setGlobalActionHandler(ActionFactory.RENAME.getId(), systemView.getRenameAction());
|
||||
|
||||
statusLine = actionBars.getStatusLineManager();
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
|||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.SystemWidgetHelpers;
|
||||
import org.eclipse.rse.ui.actions.SystemCommonDeleteAction;
|
||||
import org.eclipse.rse.ui.actions.SystemCommonRenameAction;
|
||||
import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
|
||||
import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
|
||||
import org.eclipse.rse.ui.actions.SystemRefreshAction;
|
||||
|
@ -71,6 +72,7 @@ public class SystemScratchpadViewPart extends ViewPart implements ISelectionList
|
|||
private SystemCopyToClipboardAction _copyAction;
|
||||
private SystemPasteFromClipboardAction _pasteAction;
|
||||
private SystemCommonDeleteAction _deleteAction;
|
||||
private SystemCommonRenameAction _renameAction;
|
||||
private ClearAction _clearAction;
|
||||
private ClearSelectedAction _clearSelectionAction;
|
||||
|
||||
|
@ -128,6 +130,10 @@ public class SystemScratchpadViewPart extends ViewPart implements ISelectionList
|
|||
_copyAction = new SystemCopyToClipboardAction(_viewer.getShell(), clipboard);
|
||||
_pasteAction = new SystemPasteFromClipboardAction(_viewer.getShell(), clipboard);
|
||||
_deleteAction = new SystemCommonDeleteAction(_viewer.getShell(), _viewer);
|
||||
_renameAction = new SystemCommonRenameAction(_viewer.getShell(), _viewer);
|
||||
|
||||
// register rename action as a global handler
|
||||
getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.RENAME.getId(), _renameAction);
|
||||
|
||||
editorActionHandler.setCopyAction(_copyAction);
|
||||
editorActionHandler.setPasteAction(_pasteAction);
|
||||
|
|
Loading…
Add table
Reference in a new issue