コード例 #1
0
 @Override
 public void undo() {
   this.assignment.setDiagram(null);
   BehavioralPattern diagram = ((BehavioralPattern) getBehavioralPatternEditPart().getModel());
   diagram.getFragments().remove(this.assignment);
   this.assignment.setLeftSide(null);
   this.assignment.setRightSide(null);
   this.assignment.setParentOperand(null);
   this.assignment.setLifeline(null);
   super.undo();
 }
コード例 #2
0
 public CreateBPAssignmentCommand(BPLifelineEditPart lifelineEditPart) {
   super("create assignment", (BehavioralPatternEditPart) lifelineEditPart.getParent());
   AbstractSequenceDiagramObject object = lifelineEditPart.getModel().getObject();
   if (object instanceof BPObject) {
     this.leftSide = (BPObject) object;
     BehavioralPattern behavioralPattern =
         (BehavioralPattern) this.getBehavioralPatternEditPart().getModel();
     this.parentOperand =
         (InteractionOperand) behavioralPattern.getRootFragment().getOperands().get(0);
   }
 }
コード例 #3
0
  public void createAssignment() {
    this.assignment = BehavioralpatternFactory.eINSTANCE.createBPAssignment();
    this.assignment.setLeftSide(this.leftSide);
    this.assignment.setRightSide(this.rightSide);
    BehavioralPattern diagram = ((BehavioralPattern) getBehavioralPatternEditPart().getModel());
    this.assignment.setDiagram(diagram);
    diagram.getFragments().add(this.assignment);
    this.assignment.setParentOperand(this.parentOperand);
    this.assignment.setLifeline(this.leftSide.getLifeline());

    getBehavioralPatternEditPart().relayout();
  }
コード例 #4
0
 public DeleteBehavioralPatternCommand(BehavioralPattern pattern) {
   super("delete pattern specification");
   this.catalog = pattern.getCatalog();
   this.pattern = pattern;
 }