Examples of Command


Examples of org.kitesdk.morphline.api.Command

    Preconditions.checkNotNull(rootConfig);
    Preconditions.checkNotNull(configKey);
    Preconditions.checkNotNull(finalChild);
    List<? extends Config> commandConfigs = new Configs().getConfigList(rootConfig, configKey, Collections.<Config>emptyList());
    List<Command> commands = Lists.newArrayList();
    Command currentParent = this;
    Connector lastConnector = null;       
    for (int i = 0; i < commandConfigs.size(); i++) {
      boolean isLast = (i == commandConfigs.size() - 1);
      Connector connector = new Connector(ignoreNotifications && isLast);
      if (isLast) {
        connector.setChild(finalChild);
      }
      Config cmdConfig = commandConfigs.get(i);
      Command cmd = buildCommand(cmdConfig, currentParent, connector);
      commands.add(cmd);
      if (i > 0) {
        lastConnector.setChild(cmd);
      }
      connector.setParent(cmd);
View Full Code Here

Examples of org.latexlab.docs.client.commands.Command

  this.titleLabel.setText(title);
  this.message.setHTML(message);
  this.buttonPanel.clear();
  if (options.length > 0) {
    for (ActionDialogOption opt : options) {
      final Command cmd = opt.getAction();
        Button actionButton = new Button(opt.getLabel(), new ClickHandler(){
          public void onClick(ClickEvent event) {
            hide();
            if (cmd != null) {
              CommandEvent.fire(cmd);
View Full Code Here

Examples of org.lealone.command.Command

    public synchronized Command prepareCommand(String sql) {
        if (closed) {
            throw DbException.get(ErrorCode.CONNECTION_BROKEN_1, "session closed");
        }
        Command command;
        if (queryCacheSize > 0) {
            if (queryCache == null) {
                queryCache = SmallLRUCache.newInstance(queryCacheSize);
            } else {
                command = queryCache.get(sql);
                if (command != null && command.canReuse()) {
                    command.reuse();
                    return command;
                }
            }
        }
        Parser parser = createParser();
        command = parser.prepareCommand(sql);
        if (queryCache != null) {
            if (command.isCacheable()) {
                queryCache.put(sql, command);
            }
        }
        return command;
    }
View Full Code Here

Examples of org.leores.util.SysUtil.Command

   * @param code
   * @param flags
   * @return
   */
  public Command execute(Plot plot, String code, int flags, String tempDir) {
    Command rtn = null;
    if (compile(plot, code, sFTemp)) {
      String sCmd = sCommand(sFTemp, (flags & JG_Pause) > 0, tempDir);
      rtn = SysUtil.execCmd(sCmd, (flags & JG_Log) > 0, (flags & JG_InNewThread) > 0);
      if ((flags & JG_DeleteTempFile) > 0) {
        U.deleteFile(sFTemp);
View Full Code Here

Examples of org.locationtech.udig.project.command.Command

    private void go() {
      Coordinate newpos = parse(textArea.getText(),getContext().getCRS());
      if (Math.abs(newpos.x - position.x) > ACCURACY || Math.abs(newpos.y - position.y) > ACCURACY) {
        setPosition(newpos);
        Command c = new SetViewportCenterCommand(newpos);
        getContext().sendASyncCommand(c);
      }
    }
View Full Code Here

Examples of org.mage.test.clientside.base.Command

*/
public class BDDTests extends MageAPI {

    @Test
    public void testNonExistingCard() throws Exception {
        Expect.expect(CardNotFoundException.class, new Command() {
            @Override
            public void execute() throws Exception {
                Given.I.have.a.card("Super Puper Card");
                And.phase.is("Precombat Main", mine);
                When.I.play("Super Puper Card");
View Full Code Here

Examples of org.moparscape.msc.gs.phandler.local.Command

    Instance.dataStore().dispose();
    try (Scanner scan = new Scanner(System.in)) {
      CommandHandler handler = new CommandHandler();
      String command;
      while ((command = scan.nextLine()) != null) {
        handler.handle(new Command(command));
      }
    }
  }
View Full Code Here

Examples of org.moparscape.msc.ls.packethandler.local.Command

    }
    try (Scanner scan = new Scanner(System.in)) {
      CommandHandler handler = new CommandHandler();
      String command;
      while ((command = scan.nextLine()) != null) {
        handler.handle(new Command(command));
      }
    }
  }
View Full Code Here

Examples of org.naturalcli.Command

   * Test method for {@link org.naturalcli.Command#isHidden()}.
   * @throws InvalidSyntaxException
   */
  @Test
  public final void testIsHidden() throws InvalidSyntaxException {
    assertTrue(new Command("marian is the best", ". Hello world", new NullCommandExecutor()).isHidden());
    assertFalse(new Command("marian is the best", "Hello world", new NullCommandExecutor()).isHidden());
  }
View Full Code Here

Examples of org.netbeans.lib.cvsclient.command.Command

        final String command = args[commandIndex];

        // this is not login, but a 'real' cvs command, so construct it,
        // set the options, and then connect to the server and execute it

        Command c;
        try
        {
            c = CommandFactory.getDefault().createCommand( command, args, ++commandIndex, globalOptions, localPath );
        }
        catch ( IllegalArgumentException e )
        {
            if ( logger.isErrorEnabled() )
            {
                logger.error( "Illegal argument: " + e.getMessage() );
            }
            return false;
        }

        String password = null;

        if ( CVSRoot.METHOD_PSERVER.equals( root.getMethod() ) )
        {
            password = root.getPassword();
            if ( password != null )
            {
                password = StandardScrambler.getInstance().scramble( password );
            }
            else
            {
                password = lookupPassword( cvsRoot, logger );
                if ( password == null )
                {
                    password = StandardScrambler.getInstance().scramble( "" );
                    // an empty password
                }
            }
        }
        CvsConnection cvsCommand = new CvsConnection();
        cvsCommand.setGlobalOptions( globalOptions );
        cvsCommand.setRepository( root.getRepository() );
        // the local path is just the path where we executed the
        // command. This is the case for command-line CVS but not
        // usually for GUI front-ends
        cvsCommand.setLocalPath( localPath );

        cvsCommand.connect( root, password );
        cvsCommand.addListener( listener );
        if ( logger.isDebugEnabled() )
        {
            logger.debug( "Executing CVS command: " + c.getCVSCommand() );
        }
        boolean result = cvsCommand.executeCommand( c );
        cvsCommand.disconnect();
        return result;
    }
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.