Package com.intellij.execution.process

Examples of com.intellij.execution.process.ProcessHandler


    }

    private static HaskellConsoleProcessHandler findRunningHaskellConsole(Project project) {
        Collection<RunContentDescriptor> descriptors = ExecutionHelper.findRunningConsole(project, new HaskellConsoleMatcher());
        for (RunContentDescriptor descriptor : descriptors) {
            ProcessHandler handler = descriptor.getProcessHandler();
            if (handler instanceof HaskellConsoleProcessHandler) {
                return (HaskellConsoleProcessHandler) handler;
            }
        }
        return null;
View Full Code Here


                            RunProfile runProfile = environment.getRunProfile();
                            LocalHistory.getInstance().putSystemLabel(project, executor.getId() + " " + runProfile.getName());
                        }

                        ExecutionManager.getInstance(project).getContentManager().showRunContent(executor, descriptor);
                        ProcessHandler processHandler = descriptor.getProcessHandler();
                        if (processHandler != null) processHandler.startNotify();
                    } catch (ExecutionException e) {
                        e.printStackTrace();
                    }
                }
            }
View Full Code Here

                                                              server,
                                                              myNodeInterpreterPath,
                                                              myRunSettings,
                                                              myExecutionType);
    SMTRunnerConsoleView smtRunnerConsoleView = session.getSmtConsoleView();
    ProcessHandler processHandler = session.getProcessHandler();
    // TODO make smtRunnerConsoleView instance of LanguageConsoleView to make it more usage for debugging
    DefaultExecutionResult executionResult = new DefaultExecutionResult(smtRunnerConsoleView, processHandler);
    executionResult.setRestartActions(new ToggleAutoTestAction(myExecutionEnvironment));
    return executionResult;
  }
View Full Code Here

                                                         @NotNull ExecutionEnvironment env) {
    if (status != null && status.isKarmaCoveragePackageNeededToBeInstalled()) {
      server.getRestarter().requestRestart();
    }
    ExecutionConsole console = new KarmaCoverageConfigurationErrorConsole(env.getProject(), server, status);
    final ProcessHandler processHandler = new NopProcessHandler();
    processHandler.addProcessListener(new ProcessAdapter() {
      @Override
      public void startNotified(ProcessEvent event) {
        processHandler.destroyProcess();
      }
    });
    DefaultExecutionResult executionResult = new DefaultExecutionResult(console, processHandler);
    RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, env);
    return contentBuilder.showRunContent(env.getContentToReuse());
View Full Code Here

  @Override
  public RunProfileState getState(@NotNull Executor executor, @NotNull final ExecutionEnvironment env) throws ExecutionException {
    return new RunProfileState() {
      @Override
      public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
        final ProcessHandler processHandler = new MyProcessHandler();

        final ConsoleView console = createConsole(getProject(), processHandler, env, executor);
        console.addMessageFilter(new CfmlStackTraceFilterProvider(getProject()));
        // processHandler.startNotify();
        runTests(processHandler);
View Full Code Here

      JstdRunProfileState jstdState = new JstdRunProfileState(environment, runConfiguration.getRunSettings(), coverageFilePath);
      ExecutionResult executionResult = jstdState.executeWithServer(myServer);

      RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, environment);
      final RunContentDescriptor descriptor = contentBuilder.showRunContent(environment.getContentToReuse());
      ProcessHandler processHandler = executionResult.getProcessHandler();
      if (processHandler instanceof NopProcessHandler) {
        if (myServer != null) {
          myServer.addLifeCycleListener(new JstdServerLifeCycleAdapter() {
            @Override
            public void onBrowserCaptured(@NotNull JstdBrowserInfo info) {
View Full Code Here

      }

      @NotNull
      @Override
      public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
        final ProcessHandler processHandler = startProcess();
        final ConsoleView console = createConsole(executor, processHandler);
        return new DefaultExecutionResult(console, processHandler, createActions(console, processHandler, executor));
      }
    };
  }
View Full Code Here

  @NotNull
  public ExecutionResult executeWithServer(@Nullable JstdServer ideServer) throws ExecutionException {
    if (!myRunSettings.isExternalServerType() && ideServer == null) {
      throw new ExecutionException("[Internal error] Local JsTestDriver server running in IDE not found");
    }
    ProcessHandler processHandler = createProcessHandler(ideServer);
    ConsoleView consoleView = createSMTRunnerConsoleView(ideServer);
    consoleView.attachToProcess(processHandler);
    DefaultExecutionResult executionResult = new DefaultExecutionResult(consoleView, processHandler);
    executionResult.setRestartActions(new ToggleAutoTestAction(myEnvironment));
    return executionResult;
View Full Code Here

    myPythonCommandPort = port;
  }

  public void run() {
    try {
      final ProcessHandler process = createRunInMayaProcessHandler();

      new RunContentExecutor(myProject, process)
        .withTitle(getTitle())
        .withRerun(new Runnable() {
          @Override
          public void run() {
            SendToMayaCommand.this.run();
          }
        })
        .withStop(new Runnable() {
                    @Override
                    public void run() {
                      process.destroyProcess();
                    }
                  }, new Computable<Boolean>() {

                    @Override
                    public Boolean compute() {
                      return !process.isProcessTerminated();
                    }
                  }
        )
        .run();
    }
View Full Code Here

  }

  @Override
  @NotNull
  public ExecutionResult execute(final @NotNull Executor executor, final @NotNull ProgramRunner runner) throws ExecutionException {
    final ProcessHandler processHandler = startProcess();
    final ConsoleView consoleView = createConsole(getEnvironment());
    consoleView.attachToProcess(processHandler);

    final DefaultExecutionResult executionResult =
      new DefaultExecutionResult(consoleView, processHandler, createActions(consoleView, processHandler, executor));
View Full Code Here

TOP

Related Classes of com.intellij.execution.process.ProcessHandler

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.