UML

org.topcased.modeler.uml.sequencediagram.policies
Class SequenceDeleteModelObjectEditPolicy

java.lang.Object
  extended by DeleteModelObjectEditPolicy
      extended by org.topcased.modeler.uml.sequencediagram.policies.SequenceDeleteModelObjectEditPolicy

public class SequenceDeleteModelObjectEditPolicy
extends DeleteModelObjectEditPolicy

Custom policy for handling the deletion of Message and BehavioExecutionSpecification instances.


Constructor Summary
SequenceDeleteModelObjectEditPolicy()
           
 
Method Summary
 org.eclipse.gef.commands.Command getCommand(org.eclipse.gef.Request request)
          Delegates the command creation to getCommandForMessage(MixedEditDomain, Diagrams, Message) when the host is a MessageEditPart and getCommandForBehaviorExecution(MixedEditDomain, Diagrams, BehaviorExecutionSpecification) when it is a BehaviorExecutionSpecificationEditPart.
 boolean understandsRequest(org.eclipse.gef.Request request)
          This policy understands delete requests for MessageEditPart and BehaviorExecutionSpecificationEditPart.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceDeleteModelObjectEditPolicy

public SequenceDeleteModelObjectEditPolicy()
Method Detail

understandsRequest

public boolean understandsRequest(org.eclipse.gef.Request request)
This policy understands delete requests for MessageEditPart and BehaviorExecutionSpecificationEditPart.

See Also:
org.topcased.modeler.edit.policies.DeleteModelObjectEditPolicy#understandsRequest(org.eclipse.gef.Request)

getCommand

public org.eclipse.gef.commands.Command getCommand(org.eclipse.gef.Request request)
Delegates the command creation to getCommandForMessage(MixedEditDomain, Diagrams, Message) when the host is a MessageEditPart and getCommandForBehaviorExecution(MixedEditDomain, Diagrams, BehaviorExecutionSpecification) when it is a BehaviorExecutionSpecificationEditPart. We need to pass the domain and diagrams objects to those methods since they're needed to create instances of DeleteModelCommand.

See Also:
org.topcased.modeler.edit.policies.DeleteModelObjectEditPolicy#getCommand(org.eclipse.gef.Request)

UML

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