Ecore

org.topcased.modeler.ecore.ediagram.commands
Class DeleteInheritanceLinkCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.topcased.modeler.ecore.ediagram.commands.DeleteInheritanceLinkCommand

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

The command to delete an Inheritance Link Creation : 19 may 2006


Constructor Summary
DeleteInheritanceLinkCommand()
          The Constructor
 
Method Summary
 boolean canExecute()
          Check if the command can be executed
 void execute()
          Removes the connection
 GraphNode getSource()
          Get the sourceNode of the link
 void redo()
           
protected  void redoModel()
          Refresh the sourceModel Object attributes
 org.eclipse.gef.commands.Command setPartToBeDeleted(java.lang.Object model)
          Set the edit part that must be deleted
 void undo()
          Restores the connection
protected  void undoModel()
          Refresh the sourceModel Object attributes
 
Methods inherited from class org.eclipse.gef.commands.Command
canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteInheritanceLinkCommand

public DeleteInheritanceLinkCommand()
The Constructor

Method Detail

canExecute

public boolean canExecute()
Check if the command can be executed

Overrides:
canExecute in class org.eclipse.gef.commands.Command
See Also:
Command.canExecute()

redo

public void redo()
Overrides:
redo in class org.eclipse.gef.commands.Command
See Also:
Command.redo()

redoModel

protected void redoModel()
Refresh the sourceModel Object attributes


execute

public void execute()
Removes the connection

Overrides:
execute in class org.eclipse.gef.commands.Command
See Also:
Command.execute()

undo

public void undo()
Restores the connection

Overrides:
undo in class org.eclipse.gef.commands.Command
See Also:
Command.undo()

undoModel

protected void undoModel()
Refresh the sourceModel Object attributes


setPartToBeDeleted

public org.eclipse.gef.commands.Command setPartToBeDeleted(java.lang.Object model)
Set the edit part that must be deleted

Parameters:
model - the graph object to be deleted
Returns:
the delete command

getSource

public GraphNode getSource()
Get the sourceNode of the link

Returns:
the sourceNode

Ecore

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.