roneditor.ruleview.commands
Class CreateMappingCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by roneditor.ruleview.commands.CreateMappingCommand

public class CreateMappingCommand
extends org.eclipse.gef.commands.Command

Command class for a mappingcreation


Field Summary
protected  ronmodel.Codomain codomain
           
private static java.lang.String ConnectionCommand_Description
           
private static java.lang.String ConnectionCommand_Label
           
protected  DeleteMappingCommand deleteOldIncomingMappingCommand
           
protected  DeleteMappingCommand deleteOldOutgoingMappingCommand
           
protected  ronmodel.Mapping mapping
           
protected  ronmodel.Mapping oldIncomingMapping
           
protected  ronmodel.Mapping oldOutgoingMapping
           
protected  ronmodel.ONNode source
           
protected  ronmodel.ONNode target
           
 
Constructor Summary
CreateMappingCommand()
          Constructor.
 
Method Summary
 boolean canExecute()
           
 void execute()
          Entry point for the command execution.
 ronmodel.Codomain getCodomain()
           
 java.lang.String getLabel()
          Returns the command label.
 ronmodel.Mapping getMapping()
           
 ronmodel.ONNode getSource()
           
 ronmodel.ONNode getTarget()
           
 void redo()
          Redo command execution.
 void setCodomain(ronmodel.Codomain codomain)
           
 void setMapping(ronmodel.Mapping mapping)
           
 void setSource(ronmodel.ONNode source)
           
 void setTarget(ronmodel.ONNode target)
           
 void undo()
          Undo command execution.
 
Methods inherited from class org.eclipse.gef.commands.Command
canUndo, chain, dispose, getDebugLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ConnectionCommand_Label

private static final java.lang.String ConnectionCommand_Label
See Also:
Constant Field Values

ConnectionCommand_Description

private static final java.lang.String ConnectionCommand_Description
See Also:
Constant Field Values

oldOutgoingMapping

protected ronmodel.Mapping oldOutgoingMapping

oldIncomingMapping

protected ronmodel.Mapping oldIncomingMapping

source

protected ronmodel.ONNode source

target

protected ronmodel.ONNode target

mapping

protected ronmodel.Mapping mapping

codomain

protected ronmodel.Codomain codomain

deleteOldOutgoingMappingCommand

protected DeleteMappingCommand deleteOldOutgoingMappingCommand

deleteOldIncomingMappingCommand

protected DeleteMappingCommand deleteOldIncomingMappingCommand
Constructor Detail

CreateMappingCommand

public CreateMappingCommand()
Constructor.

Method Detail

canExecute

public boolean canExecute()
Overrides:
canExecute in class org.eclipse.gef.commands.Command
Returns:
true wenn source und target vom gleichen Typ sind und wenn keine Mapping zwischen source und target schon existiert. false sonst

execute

public void execute()
Entry point for the command execution. Mapping wird zwischen source und target erzeugt

Overrides:
execute in class org.eclipse.gef.commands.Command

getLabel

public java.lang.String getLabel()
Returns the command label.

Overrides:
getLabel in class org.eclipse.gef.commands.Command

redo

public void redo()
Redo command execution.

Overrides:
redo in class org.eclipse.gef.commands.Command

undo

public void undo()
Undo command execution.

Overrides:
undo in class org.eclipse.gef.commands.Command

getCodomain

public ronmodel.Codomain getCodomain()

setCodomain

public void setCodomain(ronmodel.Codomain codomain)

getMapping

public ronmodel.Mapping getMapping()

setMapping

public void setMapping(ronmodel.Mapping mapping)

getSource

public ronmodel.ONNode getSource()

setSource

public void setSource(ronmodel.ONNode source)

getTarget

public ronmodel.ONNode getTarget()

setTarget

public void setTarget(ronmodel.ONNode target)