mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Run configuration for Cucumber with steps written in JRuby & Java : ANSI coloring support
This commit is contained in:
+5
-1
@@ -39,7 +39,11 @@ public abstract class JavaCommandLineState extends CommandLineState implements J
|
||||
|
||||
@NotNull
|
||||
protected OSProcessHandler startProcess() throws ExecutionException {
|
||||
return JavaCommandLineStateUtil.startProcess(createCommandLine());
|
||||
return JavaCommandLineStateUtil.startProcess(createCommandLine(), ansiColoringEnabled());
|
||||
}
|
||||
|
||||
protected boolean ansiColoringEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected abstract JavaParameters createJavaParameters() throws ExecutionException;
|
||||
|
||||
+10
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.execution.configurations;
|
||||
|
||||
import com.intellij.execution.process.ColoredProcessHandler;
|
||||
import com.intellij.execution.process.DefaultJavaProcessHandler;
|
||||
import com.intellij.execution.process.OSProcessHandler;
|
||||
import com.intellij.execution.process.ProcessTerminatedListener;
|
||||
@@ -30,7 +31,15 @@ public class JavaCommandLineStateUtil {
|
||||
|
||||
@NotNull
|
||||
public static OSProcessHandler startProcess(@NotNull final GeneralCommandLine commandLine) throws ExecutionException {
|
||||
final DefaultJavaProcessHandler processHandler = new DefaultJavaProcessHandler(commandLine);
|
||||
return startProcess(commandLine, false);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static OSProcessHandler startProcess(@NotNull final GeneralCommandLine commandLine,
|
||||
final boolean ansiColoring) throws ExecutionException {
|
||||
|
||||
final OSProcessHandler processHandler = ansiColoring ? new ColoredProcessHandler(commandLine)
|
||||
: new DefaultJavaProcessHandler(commandLine);
|
||||
ProcessTerminatedListener.attach(processHandler);
|
||||
return processHandler;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user