Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add ansi escape chars handling to process handler #154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@
******************************************************************************/
package com.redhat.devtools.intellij.common.utils;

import com.intellij.execution.process.KillableProcessHandler;
import com.intellij.execution.process.OSProcessHandler;
import com.intellij.execution.process.KillableColoredProcessHandler;
import com.intellij.util.io.BaseDataReader;
import com.intellij.util.io.BaseOutputReader;
import org.jetbrains.annotations.NotNull;

import java.io.Reader;
import java.nio.charset.Charset;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class ExecProcessHandler extends KillableProcessHandler {
public class ExecProcessHandler extends KillableColoredProcessHandler {

/**
*
* @param process process
* @param commandLine must not be empty (for correct thread attribution in the stacktrace)
* @param charset charset
*/
public ExecProcessHandler(@NotNull Process process, /*@NotNull*/ String commandLine, @Nullable Charset charset) {
public ExecProcessHandler(@NotNull Process process, /*@NotNull*/ String commandLine, @NotNull Charset charset) {
super(process, commandLine, charset);
}

Expand Down Expand Up @@ -67,4 +66,4 @@ protected Reader createProcessOutReader() {
protected Reader createProcessErrReader() {
return new ExecReader(myProcess.getErrorStream());
}
}
}