Examples of ICommand


Examples of org.eclipse.core.resources.ICommand

        }
      }

      ArrayList<ICommand> arrayList = new ArrayList<ICommand>(Arrays
          .asList(buildSpec));
      ICommand newCommand = description.newCommand();
      newCommand.setBuilderName(BUILDER);
      arrayList.add(newCommand);
      description.setBuildSpec(arrayList.toArray(new ICommand[arrayList
          .size()]));
      javaGaeProject.getProject().setDescription(description,
          new NullProgressMonitor());
View Full Code Here

Examples of org.eclipse.core.resources.ICommand

      }
    }

    if (!found)
    {
      ICommand newCommand = description.newCommand();
      newCommand.setBuilderName(name);
      if (argumentKey != null && argumentValue != null)
      {
        @SuppressWarnings("rawtypes")
        Map arguments = new HashMap<String, String>();
        arguments.put(argumentKey, argumentValue);
        newCommand.setArguments(arguments);
      }

      buildCommands.add(newCommand);

    }
View Full Code Here

Examples of org.eclipse.core.resources.ICommand

      }
    }

    ICommand[] newCommands = new ICommand[commands.length + 1];
    System.arraycopy(commands, 0, newCommands, 0, commands.length);
    ICommand command = desc.newCommand();
    command.setBuilderName(DynamicPluginBuilder.BUILDER_ID);
    newCommands[newCommands.length - 1] = command;
    desc.setBuildSpec(newCommands);
    project.setDescription(desc, null);
  }
View Full Code Here

Examples of org.eclipse.core.resources.ICommand

      }
    }

    ICommand[] newCommands = new ICommand[commands.length + 1];
    System.arraycopy(commands, 0, newCommands, 0, commands.length);
    ICommand command = desc.newCommand();
    command.setBuilderName(DynamicWebBuilder.BUILDER_ID);
    newCommands[newCommands.length - 1] = command;
    desc.setBuildSpec(newCommands);
    project.setDescription(desc, null);
  }
View Full Code Here

Examples of org.eclipse.e4.xwt.input.ICommand

   * @see org.eclipse.e4.xwt.IXWTLoader#getCommand(java.lang.String)
   */
  public ICommand getCommand(String name) {
    for (int i = cores.size() - 1; i >= 0; i--) {
      Core core = cores.get(i);
      ICommand command = core.getCommand(name);
      if (command != null) {
        return command;
      }
    }
    return null;
View Full Code Here

Examples of org.eclipse.gmf.runtime.common.core.command.ICommand

  /**
   * @generated
   */
  protected ICommand getInsteadCommand(IEditCommandRequest req) {
    ICommand epCommand = (ICommand) req.getParameter(EDIT_POLICY_COMMAND);
    req.setParameter(EDIT_POLICY_COMMAND, null);
    ICommand ehCommand = super.getInsteadCommand(req);
    if (epCommand == null) {
      return ehCommand;
    }
    if (ehCommand == null) {
      return epCommand;
View Full Code Here

Examples of org.eclipse.gmf.runtime.common.core.command.ICommand

      elementType = null;
    }
    Command semanticCommand = getSemanticCommandSwitch(completedRequest);
    if (elementType != null) {
      if (semanticCommand != null) {
        ICommand command = semanticCommand instanceof ICommandProxy ? ((ICommandProxy) semanticCommand)
            .getICommand()
            : new CommandProxy(semanticCommand);
        completedRequest
            .setParameter(
                OntoUML.diagram.edit.helpers.OntoUMLBaseEditHelper.EDIT_POLICY_COMMAND,
                command);
      }
      ICommand command = elementType.getEditCommand(completedRequest);
      if (command != null) {
        if (!(command instanceof CompositeTransactionalCommand)) {
          TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
              .getEditingDomain();
          command = new CompositeTransactionalCommand(editingDomain,
              command.getLabel()).compose(command);
        }
        semanticCommand = new ICommandProxy(command);
      }
    }
    boolean shouldProceed = true;
View Full Code Here

Examples of org.eclipse.gmf.runtime.common.core.command.ICommand

   */
  public void deleteOtherElements(final IGraphicalEditPart diagramEditPart) {
    if (editingDomain == null)
      throw new RuntimeException("Cannot delete related elements; we do not have an editing domain.");
   
    ICommand command = new AbstractTransactionalCommand(editingDomain, "delete related elements", Collections.EMPTY_LIST) {

      @Override
      protected CommandResult doExecuteWithResult(
          IProgressMonitor monitor, IAdaptable info)
          throws ExecutionException {
       
        try {
          // we don't want to just delete related elements;
          // we want to delete _all_ elements
          for (GeneratedElement selected : selectedElements) {
            EcoreCreateElementsHelper helper = new EmfInferenceHandler(
                editingDomain,
                Collections.EMPTY_LIST,
                monitor,
                info,
                selected.eResource() );
           
            // get all elements to delete
            List<EObject> toDelete = new GeneratedElementDeleter(selected).getElementsToDelete();
           
            for (EObject d : toDelete) {
              deleteElement(helper, d, monitor, info, diagramEditPart);
            }
          }
         
          if (diagramEditPart != null)
            diagramEditPart.refresh();
        } catch (InferenceException e) {
          throw new ExecutionException(e.getMessage(), e);
        }
       
        return CommandResult.newOKCommandResult();
      }

    };
   
    try {
      command.execute(new NullProgressMonitor(), null);
    } catch (ExecutionException e) {
      throw new RuntimeException(e.getMessage(), e);
    }
   
  }
View Full Code Here

Examples of org.eclipse.ui.commands.ICommand

   * (non-Javadoc)
   *
   * @see org.eclipse.commands.ICommandListener#commandChanged(org.eclipse.commands.CommandEvent)
   */
  public final void commandChanged(final CommandEvent commandEvent) {
    final ICommand command = new CommandLegacyWrapper(commandEvent.getCommand(),
        bindingManager);
    final boolean definedChanged = commandEvent.isDefinedChanged();
    final boolean descriptionChanged = commandEvent.isDescriptionChanged();
    final boolean handledChanged = commandEvent.isHandledChanged();
    final boolean nameChanged = commandEvent.isNameChanged();
View Full Code Here

Examples of org.freerealm.executor.ICommand

        }
        int i = 0;
        while ((unit.getMovementPoints() > 0) && (i < path.getLength())) {
            Coordinate pathCoordinate = path.getStep(i);
            Tile tile = realm.getTile(pathCoordinate);
            ICommand command = null;
            if (tile.getNumberOfUnits() > 0) {
                Unit tileUnit = tile.getUnits().get(tile.getUnits().firstKey());
                if (!unit.getPlayer().equals(tileUnit.getPlayer())) {
                    command = new AttackTileCommand(unit, tile);
                } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.