コード例 #1
0
 @Override
 public void redo() {
   module.removeModel(model);
   for (ConnectionDeleteCommand cmd : cmds) {
     cmd.redo();
   }
   //		isUndo = false;
 }
コード例 #2
0
 @Override
 public void undo() {
   module.addModel(model);
   for (ConnectionDeleteCommand cmd : cmds) {
     cmd.redo();
   }
   //		isUndo = true;
 }
コード例 #3
0
  @Override
  public void execute() {
    module = model.getModuleElement();

    module.getSite().addCommitListener(this);

    cmds = new ArrayList<ConnectionDeleteCommand>();
    for (Connection connection : model.getSourceConnections()) {
      cmds.add(new ConnectionDeleteCommand(connection));
    }
    for (Connection connection : model.getTargetConnections()) {
      cmds.add(new ConnectionDeleteCommand(connection));
    }

    module.removeModel(model);

    for (ConnectionDeleteCommand cmd : cmds) {
      cmd.execute();
    }
  }