Package edu.isi.karma.controller.command

Examples of edu.isi.karma.controller.command.ICommand


  protected ICommand extractPreviousCommand(ExecutionController ctrl) {

    CommandHistory commandHistory = ctrl.getWorkspace().getCommandHistory();
    List<ICommand> commands = commandHistory._getHistory();
    for(int i = commands.size() -1 ; i>=0; i--) {
      ICommand command = commands.get(i);
      if(command instanceof SubmitPythonTransformationCommand) {
        SubmitPythonTransformationCommand pyCommand = (SubmitPythonTransformationCommand)command;
        if(pyCommand.worksheetId.equals(this.worksheetId)) {
          if(pyCommand.pythonNodeId.equals(this.pythonNodeId)) {
            return command;
View Full Code Here


      return Collections.emptyList();
    }
    List<ICommand> result = new LinkedList<ICommand>();
    boolean foundCommand = false;
    for (int i = commands.size() - 1; i >= 0; i--) {
      ICommand c = commands.get(i);
      if (c.getCommandType() == CommandType.undoable) {
        result.add(c);
      }
      if (c.getId().equals(commandId)) {
        foundCommand = true;
        break;
      }
    }
    if (foundCommand) {
View Full Code Here

        pw.println(prefix + ",");
      }
    }

    for(int i = redoStack.size()-1; i>=0; i--) {
      ICommand redoComm = redoStack.get(i).command;
      redoComm.generateJson(prefix, pw, vWorkspace,
          Command.HistoryType.redo);
      if(i != 0)
        pw.println(prefix + ",");
    }
  }
View Full Code Here

  public void removeCommands(Workspace workspace, String worksheetId) {
    List<ICommand> commandsToBeRemoved = new ArrayList<ICommand>();
    ListIterator<ICommand> commandItr = history.listIterator(history.size());
    while(commandItr.hasPrevious()) {
      ICommand command = commandItr.previous();
      if(command instanceof Command && command.isSavedInHistory() && (command.hasTag(CommandTag.Modeling)
          || command.hasTag(CommandTag.Transformation))) {
        JSONArray json = new JSONArray(command.getInputParameterJson());
        if (HistoryJsonUtil.getStringValue(HistoryArguments.worksheetId.name(), json).equals(worksheetId)) {
          commandsToBeRemoved.add(command);
          Command tmp = (Command)command;
          if (tmp.getCommandType() == CommandType.undoable) {
            try {
View Full Code Here

TOP

Related Classes of edu.isi.karma.controller.command.ICommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.