de.cau.cs.kieler.synccharts.diagram.custom.handlers
Class SyncchartsCutCopyPasteHandler

java.lang.Object
  extended by org.eclipse.gmf.runtime.common.ui.services.action.global.AbstractGlobalActionHandler
      extended by org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
          extended by de.cau.cs.kieler.core.model.gmf.handlers.AbstractCutCopyPasteHandler
              extended by de.cau.cs.kieler.synccharts.diagram.custom.handlers.SyncchartsCutCopyPasteHandler
All Implemented Interfaces:
IGlobalActionHandler

public class SyncchartsCutCopyPasteHandler
extends AbstractCutCopyPasteHandler

Synccharts specific handler for the copy and paste operations. Determines whether or not a selection is valid and creates a command factory.

Rating proposed yellow
(2010-06-14)

Constructor Summary
SyncchartsCutCopyPasteHandler()
          Creates a new SyncchartsCutCopyPasteHandler.
 
Method Summary
protected  ICutCopyPasteCommandFactory getCommandFactory()
          Getter for the factory producing the commands.
protected  boolean isValidSelection(IStructuredSelection selection)
          Checks whether the selection contains only valid parts.
 
Methods inherited from class de.cau.cs.kieler.core.model.gmf.handlers.AbstractCutCopyPasteHandler
canHandle, canKsbaseCopy, canKsbasePaste, canPaste, createPasteViewRequest, getCommand, getCopyCommand, getCutCommand, getKsBaseCopyCommand, getKsBaseCutCommand, getKsbasePasteCommand
 
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

SyncchartsCutCopyPasteHandler

public SyncchartsCutCopyPasteHandler()
Creates a new SyncchartsCutCopyPasteHandler.

Method Detail

isValidSelection

protected boolean isValidSelection(IStructuredSelection selection)
Checks whether the selection contains only valid parts.

Specified by:
isValidSelection in class AbstractCutCopyPasteHandler
Parameters:
selection - the selection
Returns:
true if only valid parts are in the selection

getCommandFactory

protected ICutCopyPasteCommandFactory getCommandFactory()
Getter for the factory producing the commands.

Specified by:
getCommandFactory in class AbstractCutCopyPasteHandler
Returns:
the factory