Package org.formic.util

Examples of org.formic.util.CommandExecutor


    }

    public Status validate()
    {
      try{
        CommandExecutor command =
          CommandExecutor.execute(new String[]{"vim", "--version"}, 2000);
        if (command.getReturnCode() != 0){
          logger.error(
              "Error checking vim version: {}", command.getErrorMessage());
          return new Status(
              WARN, Installer.getString("vim.validation.failed"));
        }
        String result = command.getResult();
        Matcher matcher = VERSION.matcher(result);
        if(!matcher.find()){
          logger.error("Error finding vim version in output: {}", result);
          return new Status(
              WARN, Installer.getString("vim.validation.failed"));
View Full Code Here


            break;
          }
        }
      }else{
        String vim = Os.isFamily(Os.FAMILY_MAC) ? "mvim" : "gvim";
        CommandExecutor executor =
          CommandExecutor.execute(new String[]{"which", vim}, 1000);
        if(executor.getReturnCode() == 0){
          String result = executor.getResult().trim();
          logger.info("which " + vim + ": " + result);
          Installer.getProject().setProperty("eclim.gvim", result);
        }else{
          logger.info("which " + vim + ':' +
              " out=" + executor.getResult() +
              " err=" + executor.getErrorMessage());
        }
      }
    }catch(Exception e){
      e.printStackTrace();
    }
View Full Code Here

        "-u", "NONE", "-U", "NONE",
        "--cmd", command,
      };
      for (int ii = 0; ii < vims.length; ii++){
        args[0] = vims[ii];
        CommandExecutor executor = CommandExecutor.execute(args, 5000);
        if(executor.getReturnCode() == 0){
          return parseVimRuntimePathResults(tempFile);
        }
        if (executor.isShutdown()){
          return null;
        }
        executor.destroy();
      }
    }catch(Exception e){
      GuiDialogs.showError("Error determining your vim runtime path.", e);
    }
View Full Code Here

TOP

Related Classes of org.formic.util.CommandExecutor

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.