Interface StateMachineDiagramEditor

All Superinterfaces:
BasicDiagramEditor, BehaviorDiagramEditor, DiagramEditor

public interface StateMachineDiagramEditor extends BehaviorDiagramEditor
Interface to create presentations in Statemachine Diagram.
  • Method Details

    • createStatemachineDiagram

      IStateMachineDiagram createStatemachineDiagram(INamedElement owner, String name)
      Crate a statemachine diagram in a parent package. Diagram is set to DiagramEditor (DiagramEditor.setDiagram(IDiagram diagram)) if the diagram is created successfully.
      Parameters:
      owner - Parent Package
      name - Statemachine Diagram Name
      Returns:
      Statemachine Diagram
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_NAME_ERROR_KEY - if the name is empty.
              ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
              READ_ONLY_KEY - if a read-only element is edited.
              INVALID_OWNER_KEY - if the owner is invalid.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • createState

      INodePresentation createState(String name, INodePresentation parent, Point2D location)
      Create a state in a parent presentation.
      Parameters:
      name - State Name
      parent - Parent Presentation
      location - Location
      Returns:
      INodePresentation State
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_NAME_ERROR_KEY - if the name is empty.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • addRegion

      void addRegion(INodePresentation parent, boolean isHorizontal)
      Add a region in a parent presentation.
      Parameters:
      parent - Parent Presentation
      isHorizontal - is Horizontal.
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_NAME_ERROR_KEY - if the name is empty.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
      Since:
      6.6.4
    • deleteRegion

      void deleteRegion(INodePresentation parent, int index)
      Delete a region in a parent presentation.
      Parameters:
      parent - Parent Presentation
      index - region index
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_NAME_ERROR_KEY - if the name is empty.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
      Since:
      6.6.4
    • createInitialPseudostate

      INodePresentation createInitialPseudostate(INodePresentation parent, Point2D location)
      Create an initial pseudostate.
      Parameters:
      parent - Parent Presentation
      location - Location
      Returns:
      INodePresentation InitialPseudostate
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • createFinalState

      INodePresentation createFinalState(INodePresentation parent, Point2D location)
      Create a final state.
      Parameters:
      parent - Parent Presentation
      location - Location
      Returns:
      INodePresentation FinalState
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • createChoicePseudostate

      INodePresentation createChoicePseudostate(INodePresentation parent, Point2D location)
      Create a choice pseudostate.
      Parameters:
      parent - Parent Presentation
      location - Location
      Returns:
      INodePresentation ChoicePseudostate
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • createJunctionPseudostate

      INodePresentation createJunctionPseudostate(INodePresentation parent, Point2D location)
      Create a junction pseudostate.
      Parameters:
      parent - Parent Presentation
      location - Location
      Returns:
      INodePresentation
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • createForkPseudostate

      INodePresentation createForkPseudostate(INodePresentation parent, Point2D location, double width, double height)
      Create a fork pseudostate.
      Parameters:
      parent - parent Presentation
      location - location
      width - width
      height - height
      Returns:
      INodePresentation
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • createJoinPseudostate

      INodePresentation createJoinPseudostate(INodePresentation parent, Point2D location, double width, double height)
      Create a Join Pseudostate.
      Parameters:
      parent - Parent Presentation
      location - Location
      width - Width
      height - Height
      Returns:
      INodePresentation
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • createShallowHistoryPseudostate

      INodePresentation createShallowHistoryPseudostate(INodePresentation parent, Point2D location)
      Create a shallow history Pseudostate.
      Parameters:
      parent - Parent Presentation
      location - Location
      Returns:
      INodePresentation
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              DUPLICATED_HISTORY_KEY - if a history already exists in a diagram or a composite state.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • createDeepHistoryPseudostate

      INodePresentation createDeepHistoryPseudostate(INodePresentation parent, Point2D location)
      Create a deep history Pseudostate.
      Parameters:
      parent - Parent Presentation
      location - Location
      Returns:
      INodePresentation
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              DUPLICATED_HISTORY_KEY - if a history already exists in a diagram or a composite state.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • createSubmachineState

      INodePresentation createSubmachineState(INodePresentation parent, IStateMachineDiagram submachine, Point2D location)
      Create a submachine state.
      Parameters:
      parent - Parent Presentation
      submachine - Submachine
      Returns:
      INodePresentation
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              SAME_DIAGRAM_ERROR_KEY - if a SubmachineState is created in the same diagram.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              INVALID_PARENT_KEY - if the parent is invalid.
              READ_ONLY_KEY - if a read-only element is edited.
              OUT_OF_CONTAINER_KEY - if the location is specified out of container.
              LOCATION_ERROR_KEY - if a parent exists in the specified location.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • createTransition

      ILinkPresentation createTransition(INodePresentation source, INodePresentation target)
      Create a transition.
      Parameters:
      source - Source
      target - Target
      Returns:
      ILinkPresentation Transition
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              INVALID_DIAGRAM_ERROR_KEY - if a diagram of an element is not correct.
              READ_ONLY_KEY - if a read-only element is edited.
              INVALID_SOURCE_KEY - if a source of a relation is invalid.
              INVALID_TARGET_KEY - if a target of a relation is invalid.
              SELF_RELATION_KEY - if the self relationship is not allowed.
              DUPLICATED_OUTGOING_KEY - if duplicated outgoings are set.
              DUPLICATED_INCOMING_KEY - if duplicated incomings are set.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
    • changeParentOfState

      void changeParentOfState(INodePresentation child, INodePresentation parent)
      Change a parent of a state or a pseudostate.
      Parameters:
      child - Target presentation to change
      parent - Parent presentation, null for just in diagram
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              NO_TARGET_DIAGRAM_KEY - if target Diagram is not set.
              ILLEGAL_DIAGRAM_TYPE_KEY - if the diagram type is illegal.
              READ_ONLY_KEY - if a read-only element is edited.
              INVALID_PARENT_KEY - if the parent is invalid.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
      Values:
              Error messages for exceptions.
      Since:
      6.7