Examples of addProcessListener()


Examples of com.intellij.execution.process.BaseOSProcessHandler.addProcessListener()

        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

Examples of com.intellij.execution.process.BaseOSProcessHandler.addProcessListener()

    } catch (ExecutionException e) {
      throw new ProjectBuildException("Failed to launch erlang compiler", e);
    }
    BaseOSProcessHandler handler = new BaseOSProcessHandler(process, commandLine.getCommandLineString(), Charset.defaultCharset());
    ProcessAdapter adapter = new ErlangCompilerProcessAdapter(context, NAME, "");
    handler.addProcessListener(adapter);
    handler.startNotify();
    handler.waitFor();
  }

  private static GeneralCommandLine getErlcCommandLine(ErlangTarget target,
View Full Code Here

Examples of com.intellij.execution.process.BaseOSProcessHandler.addProcessListener()

    } catch (ExecutionException e) {
      throw new ProjectBuildException("Failed to run rebar", e);
    }
    BaseOSProcessHandler handler = new BaseOSProcessHandler(process, commandLine.getCommandLineString(), Charset.defaultCharset());
    ProcessAdapter adapter = new ErlangCompilerProcessAdapter(context, NAME, commandLine.getWorkDirectory().getPath()); //TODO provide rebar messages handling
    handler.addProcessListener(adapter);
    handler.startNotify();
    handler.waitFor();
  }

  @Nullable
View Full Code Here

Examples of com.intellij.execution.process.BaseOSProcessHandler.addProcessListener()

    final SourceToOutputMapping sourceToOutputMap = context.getProjectDescriptor().dataManager.getSourceToOutputMap(chunk.representativeTarget());

    final HashSet<String> outputs = new HashSet<String>();

    handler.addProcessListener(new ProcessAdapter() {
      @Override
      public void onTextAvailable(ProcessEvent event, Key outputType) {
        if (outputType != ProcessOutputTypes.STDERR) return;
        String text = event.getText().trim();
        context.processMessage(new ProgressMessage(text));
View Full Code Here

Examples of com.intellij.execution.process.OSProcessHandler.addProcessListener()

        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

Examples of com.intellij.execution.process.OSProcessHandler.addProcessListener()

      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

Examples of com.intellij.execution.process.OSProcessHandler.addProcessListener()

    commandLine.addParameter(firstServedDir.getName());
    commandLine.addParameter("--port=" + String.valueOf(port));
    //commandLine.addParameter("--admin-port=" + String.valueOf(PubServerManager.findOneMoreAvailablePort(port))); // todo uncomment and use

    final OSProcessHandler processHandler = new OSProcessHandler(commandLine);
    processHandler.addProcessListener(new PubServeOutputListener(project));

    return processHandler;
  }

  @Override
View Full Code Here

Examples of com.intellij.execution.process.OSProcessHandler.addProcessListener()

    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

Examples of com.intellij.execution.process.OSProcessHandler.addProcessListener()

    OSProcessHandler handler = new OSProcessHandler(clientProcess, "") {
      public Charset getCharset() {
        return CharsetToolkit.getDefaultSystemCharset();
      }
    };
    handler.addProcessListener(new ProcessAdapter() {
      public void onTextAvailable(final ProcessEvent event, final Key outputType) {
        if (outputType == ProcessOutputTypes.STDOUT) {
          result.stdOut += event.getText();
        }
        else if (outputType == ProcessOutputTypes.STDERR) {
View Full Code Here

Examples of com.intellij.execution.process.OSProcessHandler.addProcessListener()

      ApplicationManager.getApplication().saveAll();

      final String commandLineString = commandLine.getCommandLineString();
      OSProcessHandler handler = new OSProcessHandler(commandLine.createProcess(), commandLineString);
      handler.addProcessListener(new ProcessAdapter() {
        @Override
        public void processTerminated(ProcessEvent event) {
          ApplicationManager.getApplication().invokeLater(new Runnable() {
            @Override
            public void run() {
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.