Modelers

org.topcased.modeler.commands
Class DeleteModelCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.eclipse.gef.commands.CompoundCommand
          extended by org.topcased.modeler.commands.CompoundCommand
              extended by org.topcased.modeler.commands.DeleteModelCommand

public class DeleteModelCommand
extends CompoundCommand

A command that erase an object from the model and all the associated graphical objects.
Creation : 1 juin 2005
Updated : 4 feb 2008


Constructor Summary
DeleteModelCommand(MixedEditDomain domain, Diagrams diagrams, EObject model)
          Constructor
DeleteModelCommand(MixedEditDomain domain, Diagrams diagrams, EObject model, boolean deleteAllRef)
          Constructor
 
Method Summary
protected  org.eclipse.gef.commands.Command createRemoveCommand(java.util.List<java.lang.Object> deletedObjects)
          Create the CompoundCommand that remove model objects
protected  org.eclipse.gef.commands.Command createRemoveDiagramCommand(Diagram diagram)
          Create the remove command for a diagram
protected  org.eclipse.gef.commands.Command createRemoveGraphCommand(java.util.List<GraphElement> deletedGraphElts)
          Create the CompoundCommand that remove the GraphElement objects
protected  org.eclipse.gef.commands.CommandStack getTemporaryCommandStack()
          Get the temporary CommandStack
 
Methods inherited from class org.topcased.modeler.commands.CompoundCommand
add, addExecuted, canExecute, execute
 
Methods inherited from class org.eclipse.gef.commands.CompoundCommand
canUndo, dispose, getChildren, getCommands, getLabel, isEmpty, redo, size, undo, unwrap
 
Methods inherited from class org.eclipse.gef.commands.Command
chain, getDebugLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteModelCommand

public DeleteModelCommand(MixedEditDomain domain,
                          Diagrams diagrams,
                          EObject model)
Constructor

Parameters:
domain -
diagrams -
model -

DeleteModelCommand

public DeleteModelCommand(MixedEditDomain domain,
                          Diagrams diagrams,
                          EObject model,
                          boolean deleteAllRef)
Constructor

Parameters:
domain -
diagrams -
model -
deleteAllRef -
Method Detail

createRemoveDiagramCommand

protected org.eclipse.gef.commands.Command createRemoveDiagramCommand(Diagram diagram)
Create the remove command for a diagram

Parameters:
diagram - the diagram to remove
Returns:
the command or null if action cannot be performed

createRemoveCommand

protected org.eclipse.gef.commands.Command createRemoveCommand(java.util.List<java.lang.Object> deletedObjects)
Create the CompoundCommand that remove model objects

Parameters:
deletedObjects - the list that contain the model objects to remove
Returns:
the CompoundCommand

createRemoveGraphCommand

protected org.eclipse.gef.commands.Command createRemoveGraphCommand(java.util.List<GraphElement> deletedGraphElts)
Create the CompoundCommand that remove the GraphElement objects

Parameters:
deletedGraphElts - the list that contain the graphElements to remove
Returns:
the CompoundCommand

getTemporaryCommandStack

protected org.eclipse.gef.commands.CommandStack getTemporaryCommandStack()
Get the temporary CommandStack

Returns:
the temp CommandStack

Modelers

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