Search in sources :

Example 1 with ProcessHandlerFactory

use of com.intellij.execution.process.ProcessHandlerFactory in project intellij-community by JetBrains.

the class JavaCommandLineStateUtil method startProcess.

@NotNull
public static OSProcessHandler startProcess(@NotNull GeneralCommandLine commandLine, boolean ansiColoring) throws ExecutionException {
    ProcessHandlerFactory factory = ProcessHandlerFactory.getInstance();
    OSProcessHandler processHandler = ansiColoring ? factory.createColoredProcessHandler(commandLine) : factory.createProcessHandler(commandLine);
    ProcessTerminatedListener.attach(processHandler);
    return processHandler;
}
Also used : ProcessHandlerFactory(com.intellij.execution.process.ProcessHandlerFactory) OSProcessHandler(com.intellij.execution.process.OSProcessHandler) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

OSProcessHandler (com.intellij.execution.process.OSProcessHandler)1 ProcessHandlerFactory (com.intellij.execution.process.ProcessHandlerFactory)1 NotNull (org.jetbrains.annotations.NotNull)1