Package com.intellij.execution.process

Examples of com.intellij.execution.process.ProcessAdapter


        new ProcessBuilder(commandLine).directory(workingDirectory).start(),
        null,
        Charset.defaultCharset()
      );

      handler.addProcessListener(new ProcessAdapter() {
        @Override
        public void onTextAvailable(ProcessEvent event, Key outputType) {
          String[] lines = event.getText().split("\\n");
          if (lines.length > 0) {
            if (lines[0].matches("Error: : unknown option `-python'.")) {
View Full Code Here


        ProcessBuilder builder = new ProcessBuilder(stopCommand);
        builder.directory(new File(executableVirtualFile.getParent().getPath()));
        boolean successfullyStopped = false;
        try {
            OSProcessHandler osph = new OSProcessHandler(builder.start(), StringUtil.join(stopCommand, " "));
            osph.addProcessListener(new ProcessAdapter() {
                @Override
                public void onTextAvailable(final ProcessEvent event, Key outputType) {
                    ConsoleViewContentType contentType = ConsoleViewContentType.SYSTEM_OUTPUT;
                    if (outputType == ProcessOutputTypes.STDERR) {
                        contentType = ConsoleViewContentType.ERROR_OUTPUT;
View Full Code Here

        if (showHttpLog) {

            final NginxLogTab httpLogTab = new NginxLogTab(getProject(), new File(httpLogPath));

            manager.addAdditionalTabComponent(httpLogTab, "errorlogtab");
            startedProcess.addProcessListener(new ProcessAdapter() {
                @Override
                public void startNotified(ProcessEvent event) {
                    httpLogTab.poke();
                }

                @Override
                public void processTerminated(ProcessEvent event) {
                    httpLogTab.poke();
                    startedProcess.removeProcessListener(this);
                }
            });

        }

        if (showErrorLog) {

            final NginxLogTab errorLogTab = new NginxLogTab(getProject(), new File(errorLogPath));

            manager.addAdditionalTabComponent(errorLogTab, "accesslogtab");
            startedProcess.addProcessListener(new ProcessAdapter() {
                @Override
                public void startNotified(ProcessEvent event) {
                    errorLogTab.poke();
                }
View Full Code Here

      RunContentDescriptor runContentDescriptor = createConsole(project, commandName);

      ((ConsoleViewImpl) runContentDescriptor.getExecutionConsole()).attachToProcess(processHandler);


      processHandler.addProcessListener(new ProcessAdapter() {
        @Override
        public void processTerminated(ProcessEvent event) {
          if (event.getExitCode() == 0) {
            ApplicationManager.getApplication().invokeLater(new Runnable() {
              @Override
View Full Code Here

    try {
      if (ourInProgress.compareAndSet(false, true)) {
        final OSProcessHandler processHandler = new OSProcessHandler(command);

        processHandler.addProcessListener(new ProcessAdapter() {
          @Override
          public void processTerminated(final ProcessEvent event) {
            ourInProgress.set(false);

            ApplicationManager.getApplication().invokeLater(new Runnable() {
View Full Code Here

    }

    info.rerunPubCommandAction.setProcessHandler(processHandler);
    info.stopProcessAction.setProcessHandler(processHandler);

    processHandler.addProcessListener(new ProcessAdapter() {
      @Override
      public void processTerminated(final ProcessEvent event) {
        console.print(IdeBundle.message("finished.with.exit.code.text.message", event.getExitCode()), ConsoleViewContentType.SYSTEM_OUTPUT);
      }
    });
View Full Code Here

    }, ModalityState.any());
  }

  public void onRunnerExecutionStarted(@NotNull final OSProcessHandler processHandler) {
    myActiveRunners.incrementAndGet();
    processHandler.addProcessListener(new ProcessAdapter() {
      @Override
      public void processTerminated(ProcessEvent event) {
        myActiveRunners.decrementAndGet();
        processHandler.removeProcessListener(this);
      }
View Full Code Here

    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();
      }
    });
View Full Code Here

      public void onTerminated(int exitCode) {
        rootFormatter.onServerProcessTerminated();
        printServerFinishedInfo(exitCode);
      }
    });
    myExecutionSession.getProcessHandler().addProcessListener(new ProcessAdapter() {
      @Override
      public void processTerminated(ProcessEvent event) {
        rootFormatter.onTestRunProcessTerminated();
      }
    });
View Full Code Here

  @Override
  public void attachToProcess(ProcessHandler processHandler) {
    super.attachToProcess(processHandler);
    if (processHandler instanceof NopProcessHandler) {
      processHandler.addProcessListener(new ProcessAdapter() {
        @Override
        public void processTerminated(ProcessEvent event) {
          if (myFormatter != null) {
            myFormatter.onTestRunProcessTerminated();
          }
View Full Code Here

TOP

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

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.