|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.common.ui.services.action.global.AbstractGlobalActionHandler
org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
de.cau.cs.kieler.core.model.gmf.handlers.AbstractCutCopyPasteHandler
public abstract class AbstractCutCopyPasteHandler
Abstract super class for all handlers concerning copy and paste on diagrams. It checks whether the selection can be handled by the given handler and creates the commands corresponding to the requests made by the UI.
Constructor Summary | |
---|---|
AbstractCutCopyPasteHandler()
Creates a new AbstractCutCopyPasteHandler. |
Method Summary | |
---|---|
boolean |
canHandle(IGlobalActionContext cntxt)
|
protected boolean |
canKsbaseCopy(IStructuredSelection sel)
Determine whether the current selection can be copied or cut by Ksbase. |
protected boolean |
canKsbasePaste(IStructuredSelection sel)
Determine whether the current selection can be used as a target for pasting by Ksbase. |
protected boolean |
canPaste(IGlobalActionContext cntxt)
|
protected org.eclipse.gmf.runtime.diagram.ui.requests.PasteViewRequest |
createPasteViewRequest()
|
ICommand |
getCommand(IGlobalActionContext cntxt)
|
protected abstract ICutCopyPasteCommandFactory |
getCommandFactory()
Getter for the factory producing the commands. |
protected ICommand |
getCopyCommand(IGlobalActionContext cntxt,
org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart diagramPart,
boolean isUndoable)
|
protected ICommand |
getCutCommand(IGlobalActionContext cntxt,
org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart diagramPart)
|
protected ICommand |
getKsBaseCopyCommand(IStructuredSelection sel,
org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart part)
Gets the KsBase copy command from the registered command factory. |
protected ICommand |
getKsBaseCutCommand(IStructuredSelection sel,
org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart part)
Gets the KsBase cut command from the registered command factory. |
protected ICommand |
getKsbasePasteCommand(IStructuredSelection sel,
org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart part)
Gets the KsBase paste command from the registered command factory. |
protected abstract boolean |
isValidSelection(IStructuredSelection selection)
Checks whether the selection contains only valid parts. |
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler |
---|
canCopy, canCut, canSave, getMapMode, getSelectedViews, selectAddedObject |
Methods inherited from class org.eclipse.gmf.runtime.common.ui.services.action.global.AbstractGlobalActionHandler |
---|
getLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractCutCopyPasteHandler()
Method Detail |
---|
protected abstract boolean isValidSelection(IStructuredSelection selection)
selection
- the selection
public boolean canHandle(IGlobalActionContext cntxt)
canHandle
in interface IGlobalActionHandler
canHandle
in class DiagramGlobalActionHandler
protected boolean canKsbaseCopy(IStructuredSelection sel)
sel
- the selection
protected boolean canKsbasePaste(IStructuredSelection sel)
sel
- the selection
protected boolean canPaste(IGlobalActionContext cntxt)
canPaste
in class DiagramGlobalActionHandler
protected ICommand getCopyCommand(IGlobalActionContext cntxt, org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart diagramPart, boolean isUndoable)
getCopyCommand
in class DiagramGlobalActionHandler
protected ICommand getCutCommand(IGlobalActionContext cntxt, org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart diagramPart)
getCutCommand
in class DiagramGlobalActionHandler
protected ICommand getKsBaseCutCommand(IStructuredSelection sel, org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart part)
sel
- the selectionpart
- the editor
protected ICommand getKsBaseCopyCommand(IStructuredSelection sel, org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart part)
sel
- the selectionpart
- the editor
protected ICommand getKsbasePasteCommand(IStructuredSelection sel, org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart part)
sel
- the selectionpart
- the editor
protected abstract ICutCopyPasteCommandFactory getCommandFactory()
public ICommand getCommand(IGlobalActionContext cntxt)
getCommand
in interface IGlobalActionHandler
getCommand
in class DiagramGlobalActionHandler
protected org.eclipse.gmf.runtime.diagram.ui.requests.PasteViewRequest createPasteViewRequest()
createPasteViewRequest
in class DiagramGlobalActionHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |