public abstract class ProjectTaskRunner
extends java.lang.Object
ProjectTaskRunner
provides an extension point to run any IDE tasks using ProjectTaskManager
api.
Typical use case is delegation of common IDE activities(e.g. (re)build project) to external tools/plugins.
But it can be used for any other IDE activity which is described by some inheritor of ProjectTask
.ProjectTaskManager
Modifier and Type | Class and Description |
---|---|
static interface |
ProjectTaskRunner.Result
Describes
ProjectTaskRunner execution result. |
Modifier and Type | Field and Description |
---|---|
static ExtensionPointName<ProjectTaskRunner> |
EP_NAME |
Constructor and Description |
---|
ProjectTaskRunner() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRun(Project project,
ProjectTask projectTask) |
abstract boolean |
canRun(ProjectTask projectTask) |
ExecutionEnvironment |
createExecutionEnvironment(Project project,
ExecuteRunConfigurationTask task,
Executor executor)
This method can be used when execution of some "Run Configuration" should be delegated to another tool.
|
boolean |
isFileGeneratedEventsSupported()
The flag indicates if the
ProjectTaskRunner supports reporting an information about generated files during execution or not. |
Promise<ProjectTaskRunner.Result> |
run(Project project,
ProjectTaskContext context,
ProjectTask... tasks)
The implementation should provide execution of the specified
ProjectTask s by either means. |
void |
run(Project project,
ProjectTaskContext context,
ProjectTaskNotification callback,
java.util.Collection<? extends ProjectTask> tasks)
Deprecated.
|
void |
run(Project project,
ProjectTaskContext context,
ProjectTaskNotification callback,
ProjectTask... tasks)
Deprecated.
|
public static final ExtensionPointName<ProjectTaskRunner> EP_NAME
public Promise<ProjectTaskRunner.Result> run(Project project, ProjectTaskContext context, ProjectTask... tasks)
ProjectTask
s by either means.
Only tasks which this ProjectTaskRunner
canRun(com.intellij.task.ProjectTask)
will be passed.
It's expected that the ProjectTaskRunner
will supply the returning Promise
with the ProjectTaskRunner.Result
asynchronously when all tasks will be completed.canRun(com.intellij.task.ProjectTask)
public abstract boolean canRun(ProjectTask projectTask)
public boolean canRun(Project project, ProjectTask projectTask)
public ExecutionEnvironment createExecutionEnvironment(Project project, ExecuteRunConfigurationTask task, Executor executor)
public boolean isFileGeneratedEventsSupported()
ProjectTaskRunner
supports reporting an information about generated files during execution or not.
The fine-grained events per generated files allow greatly improve IDE performance for some activities like fast hotswap reload after incremental compilation.
The support means responsibility to send ProjectTaskContext.fileGenerated(java.lang.String, java.lang.String)
events per each generated file
or at least supply effective output roots containing generated files using the ProjectTaskContext.addDirtyOutputPathsProvider(java.util.function.Supplier<? extends java.util.Collection<java.lang.String>>)
method
if per-file events are not possible.ProjectTaskRunner
supports reporting an information about generated files during this runner tasks execution, false otherwise@Deprecated public void run(Project project, ProjectTaskContext context, ProjectTaskNotification callback, java.util.Collection<? extends ProjectTask> tasks)
run(Project, ProjectTaskContext, ProjectTask...)
@Deprecated public void run(Project project, ProjectTaskContext context, ProjectTaskNotification callback, ProjectTask... tasks)
run(Project, ProjectTaskContext, ProjectTask...)