Examples of Command


Examples of org.bukkit.command.Command

    super(plugin, "commands", Permissions.COMMAND_COMMANDS, new String[]{"cmds"});
    for (int i = 0; i < moreCommands.length; i++){
      moreCommands[i] = moreCommands[i].replace("<command>", "ncp");
    }
    String all = TAG + "All commands info:\n";
    Command cmd = plugin.getCommand("nocheatplus");
    if (cmd != null){
      all += cmd.getUsage().replace("<command>", "ncp");
    }
    all += StringUtil.join(Arrays.asList(moreCommands), "\n");
    allCommands = all;
  }
View Full Code Here

Examples of org.codehaus.groovy.tools.shell.Command

    // Figure out the max command name and shortcut length dynamically
    int maxName = 0;
    int maxShortcut = 0;
    iterator = shell.getRegistry().commands().iterator();
    while (iterator.hasNext()) {
      Command command = iterator.next();
      if (command.getHidden()) {
        continue;
      }

      if (command.getName().length() > maxName) {
        maxName = command.getName().length();
      }
       
      if (command.getShortcut().length() > maxShortcut) {
        maxShortcut = command.getShortcut().length();
      }
    }

    printlnResource(Constants.RES_HELP_INFO);
    println();

    // List the commands we know about
    printlnResource(Constants.RES_HELP_AVAIL_COMMANDS);

    iterator = shell.getRegistry().commands().iterator();
    while (iterator.hasNext()) {
      Command command = iterator.next();
      if (command.getHidden()) {
        continue;
      }

      String paddedName = StringUtils.rightPad(command.getName(), maxName);
      String paddedShortcut = StringUtils.rightPad(command.getShortcut(), maxShortcut);

      String description = command.getDescription();

      StringBuilder sb = new StringBuilder();
      sb.append("  ")
         .append(MessageFormat.format(resource.getString(Constants
             .RES_HELP_CMD_DESCRIPTION), paddedName,
View Full Code Here

Examples of org.concordion.api.Command

  }

  private BreadcrumbCssRemovedConcordionBuilder withApprovedCommand(String namespaceURI, String commandName, Command command) {
    ThrowableCatchingDecorator throwableCatchingDecorator = new ThrowableCatchingDecorator(new LocalTextDecorator(command));
    throwableCatchingDecorator.addThrowableListener(throwableListenerPublisher);
    Command decoratedCommand = throwableCatchingDecorator;
    commandRegistry.register(namespaceURI, commandName, decoratedCommand);
    return this;
  }
View Full Code Here

Examples of org.cyclopsgroup.jmxterm.Command

            commandArguments.replaceFirst( "^\\s*", "" );
            if ( LOG.isDebugEnabled() )
            {
                LOG.debug( "Analyzing commmand arguments [" + commandArguments + "]" );
            }
            Command cmd = commandCenter.commandFactory.createCommand( commandName );
            cmd.setSession( commandCenter.session );
            CliCompletor commandCompletor = new CliCompletor( cmd, commandCenter.argTokenizer );
            return commandCompletor.complete( commandArguments, position - separatorPos, candidates ) + separatorPos
                + 1;
        }
        catch ( RuntimeException e )
View Full Code Here

Examples of org.drools.command.Command

   
    /**
     * build json query command and send it to drools
     */
    private QueryResults query(String queryName, Object[] args) {
        Command command = CommandFactory.newQuery("persons", queryName, args);
        String queryStr = template.requestBody("direct:marshall", command, String.class);

        String json = template.requestBody("direct:test-session", queryStr, String.class);
        ExecutionResults res = (ExecutionResults) template.requestBody("direct:unmarshall", json);
        return (QueryResults) res.getValue("persons");
View Full Code Here

Examples of org.drools.games.adventures.model.Command

                constructorParamTypes[i-1] = cmdList.get(i).getClass();
            }

            Object[] args = cmdList.subList(1, cmdList.size() ).toArray();

            Command cmd = (Command) cls.getDeclaredConstructors()[0].newInstance(args);
            cmd.setSession( session );
            ksession.insert( cmd );
            ksession.fireAllRules();
        } catch ( Exception e ) {
            e.printStackTrace();
            session.getChannels().get( "output" ).send( "Unable to Execute Command: " + cmdList );
View Full Code Here

Examples of org.drools.task.service.Command

  public void addPackage(Task task, AddTaskResponseHandler responseHandler) {
    List args = new ArrayList(2);
    args.add(task);
    args.add(null);
    Command cmd = new Command(counter.getAndIncrement(),
                CommandName.AddTaskRequest,
                args);

    handler.addResponseHandler(cmd.getId(), responseHandler);

    session.write(cmd);
  }
View Full Code Here

Examples of org.eclim.installer.step.command.Command

                parts[0].replace(".feature.group", ""), parts[1]);
            }
          }
        };
        if (sites.size() > 0){
          Command command = new ListCommand(
            handler, sites.toArray(new String[sites.size()]));
          try{
            command.start();
            command.join();
            if(command.getReturnCode() != 0){
              throw new RuntimeException(
                  "error: " + command.getErrorMessage() +
                  " out: " + command.getResult());
            }
          }finally{
            command.destroy();
          }
        }
        return availableFeatures;
      }
    });
View Full Code Here

Examples of org.eclipse.core.commands.Command

            public void widgetSelected(SelectionEvent e) {
                try {
                    ICommandService cService = (ICommandService) getSite().getService(ICommandService.class);
                    IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
                   
                    Command command = cService.getCommand("de.innovationgate.eclipse.ids.commands.OpenModuleInBrowser");
                   
                    IParameter paramTMLFile = command.getParameter("de.innovationgate.eclipse.ids.commands.OpenModuleInBrowser.paramTMLFilePath");
 
                    Parameterization parm = new Parameterization(paramTMLFile, getInputFile().getFullPath().toString());
      
                    ParameterizedCommand parmCommand = new ParameterizedCommand(command, new Parameterization[] { parm });
View Full Code Here

Examples of org.eclipse.emf.common.command.Command

                public void run() {
                  firePropertyChange(IEditorPart.PROP_DIRTY);

                  // Try to select the affected objects.
                  //
                  Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
                  if (mostRecentCommand != null) {
                    setSelectionToViewer(mostRecentCommand.getAffectedObjects());
                  }
                  if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) {
                    propertySheetPage.refresh();
                  }
                }
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.