public abstract class CommandLineState extends java.lang.Object implements RunProfileState
RunProfileState
. Takes care of putting together a process and a console and wrapping them into an
ExecutionResult
. Does not contain any logic for actually starting the process.JavaCommandLineState
,
GeneralCommandLine
Modifier | Constructor and Description |
---|---|
protected |
CommandLineState(ExecutionEnvironment environment) |
Modifier and Type | Method and Description |
---|---|
void |
addConsoleFilters(Filter... filters) |
protected AnAction [] |
createActions(ConsoleView console,
ProcessHandler processHandler) |
protected AnAction [] |
createActions(ConsoleView console,
ProcessHandler processHandler,
Executor executor) |
protected ConsoleView |
createConsole(Executor executor) |
ExecutionResult |
execute(Executor executor,
ProgramRunner<?> runner)
Starts the process.
|
TextConsoleBuilder |
getConsoleBuilder() |
ExecutionEnvironment |
getEnvironment() |
ExecutionTarget |
getExecutionTarget() |
RunnerSettings |
getRunnerSettings() |
void |
setConsoleBuilder(TextConsoleBuilder consoleBuilder) |
protected abstract ProcessHandler |
startProcess()
Starts the process.
|
protected CommandLineState(ExecutionEnvironment environment)
public ExecutionEnvironment getEnvironment()
public RunnerSettings getRunnerSettings()
public ExecutionTarget getExecutionTarget()
public void addConsoleFilters(Filter... filters)
public ExecutionResult execute(Executor executor, ProgramRunner<?> runner) throws ExecutionException
RunProfileState
execute
in interface RunProfileState
executor
- the executor used to start up the process.runner
- the program runner used to start up the process.DefaultExecutionResult
), containing a process handler
and a console attached to it.ExecutionException
- if the execution has failed.protected ConsoleView createConsole(Executor executor) throws ExecutionException
ExecutionException
protected abstract ProcessHandler startProcess() throws ExecutionException
ExecutionException
- if the execution failed.GeneralCommandLine
,
OSProcessHandler
protected AnAction [] createActions(ConsoleView console, ProcessHandler processHandler)
protected AnAction [] createActions(ConsoleView console, ProcessHandler processHandler, Executor executor)
public TextConsoleBuilder getConsoleBuilder()
public void setConsoleBuilder(TextConsoleBuilder consoleBuilder)