Package melnorme.utilbox.process.ExternalProcessHelper

Examples of melnorme.utilbox.process.ExternalProcessHelper.ExternalProcessResult


  }
 
  /* ------------------------------ */
 
  protected String runDubDescribe(BundlePath workingDir) throws Exception {
    ExternalProcessResult processResult = startDubProcess(workingDir, "describe").strictAwaitTermination(2000);
   
    return processResult.getStdOutBytes().toString(StringUtil.UTF8);
  }
View Full Code Here


      pb = new ProcessBuilder(getDubPath(), "describe", "--nodeps");
    }
   
    pb.directory(bundlePath.path.toFile());
   
    ExternalProcessResult processResult;
    try {
      processResult = new ExternalProcessHelper(pb).strictAwaitTermination();
    } catch (TimeoutException e) {
      throw assertFail(); // Cannot happen because there is no cancel monitor
    }
View Full Code Here

    }
   
    String[] extraCommands = DeeCorePreferences.DUB_BUILD_OPTIONS.getParsedArguments(project);
    commands.addAll(CollectionUtil.createArrayList(extraCommands));
   
    ExternalProcessResult processResult;
    try {
      processResult = submitAndAwaitDubCommand(monitor, ArrayUtil.createFrom(commands, String.class));
    } catch (CoreException ce) {
      if(!monitor.isCanceled()) {
        DeeCore.logStatus(ce.getStatus());
View Full Code Here

//    getProcessManager().submitDubCommandAndWait(resolveProjectOperation.newDubProcessTask(
//      project, array(dubPath, "upgrade", "--missing-only"), pm));
   
    IRunProcessTask dubDescribeTask = resolveProjectOperation.newDubProcessTask(
      project, array(dubPath, "describe"), pm);
    ExternalProcessResult processHelper = getProcessManager().submitDubCommandAndWait(dubDescribeTask);
   
    int exitValue = processHelper.exitValue;
    if(exitValue != 0) {
      throw LangCore.createCoreException("dub returned non-zero status: " + exitValue, null);
    }
View Full Code Here

    arguments.add(filePath);
    arguments.add("c" + offset);
   
    ProcessBuilder pb = goEnvironment.createProcessBuilder(arguments);
   
    ExternalProcessResult processResult = runGocodeProcess(pb, bufferText);

    if(processResult.exitValue != 0) {
      throw new CommonException("Error, gocode returned non-zero status: " + processResult.exitValue);
    }
   
View Full Code Here

 
  @Override
  protected void performLongRunningComputation_do(IProgressMonitor pm) throws CoreException {
   
    IProject project = null;
    ExternalProcessResult processResult =
        GoToolManager.getDefault().runTool(project, pm, pb, editorText, true);
   
    outputText = processResult.getStdOutBytes().toString();
  }
View Full Code Here

      sourceRootDir = projectLocation;
    } else {
      sourceRootDir = projectLocation.resolve("src");
    }
   
    ExternalProcessResult buildAllResult =
      GoToolManager.getDefault().runBuildTool(goEnv, monitor, sourceRootDir, goBuildCmdLine);
   
    GoBuildOutputProcessor buildOutput = new GoBuildOutputProcessor() {
      @Override
      protected void handleParseError(CommonException ce) {
View Full Code Here

     
      // TODO: we should run this operation outside the UI thread.
      IProgressMonitor pm = new TimeoutProgressMonitor(5000, true);
      GocodeClient client = new GocodeClient(gocodePath.toOSString(), goEnvironment, pm);
     
      ExternalProcessResult processResult = client.execute(filePath, document.get(), offset);
      String stdout = processResult.getStdOutBytes().toString(StringUtil.UTF8);
      List<String> completions = new ArrayList2<>(GocodeClient.LINE_SPLITTER.split(stdout));
     
      CodeContext codeContext = codeContexts.get(filePath);
      if (codeContext == null) {
        try {
View Full Code Here

   
    try {
      GoOracleFindDefinitionOperation op = new GoOracleFindDefinitionOperation(goOraclePath);
      ProcessBuilder pb = op.createProcessBuilder(goEnv, inputPath, range.getOffset());
     
      ExternalProcessResult result = GoToolManager.getDefault().runEngineTool(pb, null, monitor);
     
      findResult = op.parseJsonResult(result);
    } catch (CommonException se) {
      throw LangCore.createCoreException(se.getMessage(), se.getCause());
    }
View Full Code Here

TOP

Related Classes of melnorme.utilbox.process.ExternalProcessHelper.ExternalProcessResult

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.