public class ProcessOutputType extends Key<java.lang.Object>
ProcessOutputTypes.STDOUT, ProcessOutputTypes.STDERR and
ProcessOutputTypes.SYSTEM.name constructor parameter, and base stream output type (stdout/stderr) - streamType parameter.
Use ConsoleViewContentType.getConsoleViewType(com.intellij.openapi.util.Key) to get TextAttributes for an instance
of this class.
| Modifier and Type | Field and Description |
|---|---|
static ProcessOutputType |
STDERR
Base type for data from process standard error stream.
|
static ProcessOutputType |
STDOUT
Base type for data from process standard output stream.
|
static ProcessOutputType |
SYSTEM |
| Constructor and Description |
|---|
ProcessOutputType(java.lang.String name,
ProcessOutputType streamType) |
| Modifier and Type | Method and Description |
|---|---|
ProcessOutputType |
getBaseOutputType() |
static java.lang.String |
getKeyNameForLogging(Key<?> key) |
boolean |
isStderr() |
static boolean |
isStderr(Key<?> key) |
boolean |
isStdout() |
static boolean |
isStdout(Key<?> key) |
static ProcessOutputType |
tryCast(Key<?> key) |
create, equals, findKeyByName, get, get, get, getKeyByIndex, getRequired, hashCode, isIn, set, set, toStringpublic static final ProcessOutputType SYSTEM
public static final ProcessOutputType STDOUT
Colored texts from stdout are represented by different instances of ProcessOutputType having
ProcessOutputType.STDOUT base type:
coloredStdoutType.getBaseOutputType() == ProcessOutputType.STDOUT
Thus to check whether a process output type is from stdout:
ProcessOutputType.isStdout(key)
instead of
ProcessOutputType.STDOUT.equals(key) or ProcessOutputType.STDOUT == keypublic static final ProcessOutputType STDERR
Colored texts from stderr are represented by different instances of ProcessOutputType having
ProcessOutputType.STDERR base type:
coloredStderrType.getBaseOutputType() == ProcessOutputType.STDERR
Thus to check whether a process output type is from stderr:
ProcessOutputType.isStderr(key)
instead of
ProcessOutputType.STDERR.equals(key) or ProcessOutputType.STDERR == keypublic ProcessOutputType(java.lang.String name,
ProcessOutputType streamType)
public ProcessOutputType getBaseOutputType()
public boolean isStdout()
public boolean isStderr()
public static boolean isStderr(Key<?> key)
public static boolean isStdout(Key<?> key)
public static java.lang.String getKeyNameForLogging(Key<?> key)
public static ProcessOutputType tryCast(Key<?> key)