public class ExecHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ExecHelper.ExecResult |
| Constructor and Description |
|---|
ExecHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
ensureTerminalWindowsIsOpened(com.intellij.openapi.project.Project project)
Ensure the terminal window tab is created.
|
static java.lang.String |
execute(java.lang.String executable,
boolean checkExitCode,
java.io.File workingDirectory,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... arguments)
This method combine out and err outputs in result string, if you need to have them separately
use @link
executeWithResult(String, boolean, File, Map, String...) |
static java.lang.String |
execute(java.lang.String executable,
boolean checkExitCode,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... arguments)
This method combine out and err outputs in result string, if you need to have them separately
use @link
executeWithResult(String, boolean, File, Map, String...) |
static java.lang.String |
execute(java.lang.String executable,
boolean checkExitCode,
java.lang.String... arguments)
This method combine out and err outputs in result string, if you need to have them separately
use @link
executeWithResult(String, boolean, File, Map, String...) |
static java.lang.String |
execute(java.lang.String executable,
java.io.File workingDirectory,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... arguments)
This method combine out and err outputs in result string, if you need to have them separately
use @link
executeWithResult(String, boolean, File, Map, String...) |
static java.lang.String |
execute(java.lang.String executable,
java.io.File workingDirectory,
java.lang.String... arguments)
This method combine out and err outputs in result string, if you need to have them separately
use @link
executeWithResult(String, boolean, File, Map, String...) |
static java.lang.String |
execute(java.lang.String executable,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... arguments)
This method combine out and err outputs in result string, if you need to have them separately
use @link
executeWithResult(String, boolean, File, Map, String...) |
static java.lang.String |
execute(java.lang.String executable,
java.lang.String... arguments)
This method combine out and err outputs in result string, if you need to have them separately
use @link
executeWithResult(String, boolean, File, Map, String...) |
static java.util.concurrent.ScheduledFuture<?> |
executeAfter(java.lang.Runnable runnable,
long delay,
java.util.concurrent.TimeUnit unit) |
static ExecHelper.ExecResult |
executeWithResult(java.lang.String executable,
boolean checkExitCode,
java.io.File workingDirectory,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... arguments) |
static ExecHelper.ExecResult |
executeWithResult(java.lang.String executable,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... arguments) |
static void |
executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
boolean waitForProcessToExit,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... command) |
static void |
executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
boolean waitForProcessToExit,
java.lang.String... command) |
static void |
executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
java.io.File workingDirectory,
boolean waitForProcessToExit,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... command) |
static void |
executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
java.io.File workingDirectory,
java.lang.String... command) |
static void |
executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... command) |
static void |
executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
java.lang.String... command) |
static void |
executeWithUI(java.util.Map<java.lang.String,java.lang.String> envs,
java.util.function.Consumer<java.lang.String> runnable,
java.lang.String... command) |
static void |
executeWithUI(java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.Runnable initRunnable,
java.util.function.Consumer<java.lang.String> runnable,
java.lang.String... command) |
static void |
linkProcessToTerminal(java.lang.Process p,
com.intellij.openapi.project.Project project,
java.lang.String title,
boolean waitForProcessExit) |
static void |
submit(java.lang.Runnable runnable) |
public static java.util.concurrent.ScheduledFuture<?> executeAfter(java.lang.Runnable runnable,
long delay,
java.util.concurrent.TimeUnit unit)
public static void submit(java.lang.Runnable runnable)
public static java.lang.String execute(java.lang.String executable,
boolean checkExitCode,
java.io.File workingDirectory,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... arguments)
throws java.io.IOException
executeWithResult(String, boolean, File, Map, String...)executable - the executablecheckExitCode - if exit code should be checkedworkingDirectory - the working directory for the processenvs - the map for the environment variablesarguments - the argumentsjava.io.IOException - if error during process executionpublic static java.lang.String execute(java.lang.String executable,
java.io.File workingDirectory,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... arguments)
throws java.io.IOException
executeWithResult(String, boolean, File, Map, String...)executable - the executableworkingDirectory - the working directory for the processenvs - the map for the environment variablesarguments - the argumentsjava.io.IOException - if error during process executionpublic static java.lang.String execute(java.lang.String executable,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... arguments)
throws java.io.IOException
executeWithResult(String, boolean, File, Map, String...)executable - the executableenvs - the map for the environment variablesarguments - the argumentsjava.io.IOException - if error during process executionpublic static java.lang.String execute(java.lang.String executable,
java.lang.String... arguments)
throws java.io.IOException
executeWithResult(String, boolean, File, Map, String...)executable - the executablearguments - the argumentsjava.io.IOException - if error during process executionpublic static java.lang.String execute(java.lang.String executable,
java.io.File workingDirectory,
java.lang.String... arguments)
throws java.io.IOException
executeWithResult(String, boolean, File, Map, String...)executable - the executableworkingDirectory - the working directory for the processarguments - the argumentsjava.io.IOException - if error during process executionpublic static java.lang.String execute(java.lang.String executable,
boolean checkExitCode,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... arguments)
throws java.io.IOException
executeWithResult(String, boolean, File, Map, String...)executable - the executablecheckExitCode - if exit code should be checkedenvs - the map for the environment variablesarguments - the argumentsjava.io.IOException - if error during process executionpublic static java.lang.String execute(java.lang.String executable,
boolean checkExitCode,
java.lang.String... arguments)
throws java.io.IOException
executeWithResult(String, boolean, File, Map, String...)executable - the executablecheckExitCode - if exit code should be checkedarguments - the argumentsjava.io.IOException - if error during process executionpublic static ExecHelper.ExecResult executeWithResult(java.lang.String executable, boolean checkExitCode, java.io.File workingDirectory, java.util.Map<java.lang.String,java.lang.String> envs, java.lang.String... arguments) throws java.io.IOException
java.io.IOExceptionpublic static ExecHelper.ExecResult executeWithResult(java.lang.String executable, java.util.Map<java.lang.String,java.lang.String> envs, java.lang.String... arguments) throws java.io.IOException
java.io.IOExceptionpublic static void ensureTerminalWindowsIsOpened(com.intellij.openapi.project.Project project)
linkProcessToTerminal(Process, Project, String, boolean)project - the IJ projectpublic static void linkProcessToTerminal(java.lang.Process p,
com.intellij.openapi.project.Project project,
java.lang.String title,
boolean waitForProcessExit)
throws java.io.IOException
java.io.IOExceptionpublic static void executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
java.io.File workingDirectory,
boolean waitForProcessToExit,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... command)
throws java.io.IOException
java.io.IOExceptionpublic static void executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
java.io.File workingDirectory,
java.lang.String... command)
throws java.io.IOException
java.io.IOExceptionpublic static void executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
boolean waitForProcessToExit,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... command)
throws java.io.IOException
java.io.IOExceptionpublic static void executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
boolean waitForProcessToExit,
java.lang.String... command)
throws java.io.IOException
java.io.IOExceptionpublic static void executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.String... command)
throws java.io.IOException
java.io.IOExceptionpublic static void executeWithTerminal(com.intellij.openapi.project.Project project,
java.lang.String title,
java.lang.String... command)
throws java.io.IOException
java.io.IOExceptionpublic static void executeWithUI(java.util.Map<java.lang.String,java.lang.String> envs,
java.lang.Runnable initRunnable,
java.util.function.Consumer<java.lang.String> runnable,
java.lang.String... command)
throws java.io.IOException
java.io.IOExceptionpublic static void executeWithUI(java.util.Map<java.lang.String,java.lang.String> envs,
java.util.function.Consumer<java.lang.String> runnable,
java.lang.String... command)
throws java.io.IOException
java.io.IOException