public interface RunnerAndConfigurationSettings
RunManager#createConfiguration(String, ConfigurationFactory)
Modifier and Type | Method and Description |
---|---|
default boolean |
canRunOn(ExecutionTarget target)
Deprecated.
|
default void |
checkSettings()
Checks whether the run configuration settings are valid.
|
void |
checkSettings(Executor executor)
Checks whether the run configuration settings are valid for execution with the specified executor.
|
Factory<RunnerAndConfigurationSettings> |
createFactory()
Returns a factory object which can be used to create a copy of this configuration.
|
RunConfiguration |
getConfiguration()
Returns the
RunConfiguration instance that will be used to execute this run configuration. |
ConfigurationPerRunnerSettings |
getConfigurationSettings(ProgramRunner runner)
Returns the configuration-managed settings for the specified runner.
|
ConfigurationFactory |
getFactory()
Returns the factory used to create the run configuration.
|
java.lang.String |
getFolderName()
Returns the name of the folder under which the configuration is displayed in the "Run/Debug Configurations" dialog.
|
java.lang.String |
getName()
Returns the name of the configuration.
|
java.lang.String |
getPathIfStoredInArbitraryFileInProject() |
<Settings extends RunnerSettings> |
getRunnerSettings(ProgramRunner<Settings> runner)
Returns the runner-managed settings for the specified runner.
|
ConfigurationType |
getType()
Returns the type of the run configuration.
|
java.lang.String |
getUniqueID() |
boolean |
isActivateToolWindowBeforeRun()
Returns the "Before launch: Activate tool window" flag (for activation tool window Run/Debug etc.)
|
boolean |
isEditBeforeRun()
Returns the "Before launch: Show this page" flag (for showing the run configuration settings before execution).
|
default boolean |
isShared()
Checks whether this run configuration is stored in a file (therefore, could be shared through VCS).
|
default boolean |
isSingleton()
Deprecated.
|
boolean |
isStoredInArbitraryFileInProject()
Checks if this run configuration is stored in a
.run.xml file within the project content. |
boolean |
isStoredInDotIdeaFolder()
Checks if this run configuration is stored as an
.xml file in .idea/runConfigurations folder (or project.ipr file). |
boolean |
isStoredInLocalWorkspace()
Checks if this run configuration is not shared through VCS, i.e.
|
boolean |
isTemplate()
Returns true if this configuration settings object represents a template used to create other configurations of the same type
(in other words, an item under the "Defaults" node of the Run/Debug Configurations dialog).
|
boolean |
isTemporary()
Returns true if this configuration is temporary and will be deleted when the temporary configurations limit is exceeded.
|
void |
setActivateToolWindowBeforeRun(boolean value)
Sets the "Before launch: Activate tool window" flag (for activation tool window Run/Debug etc.)
|
void |
setEditBeforeRun(boolean b)
Sets the "Before launch: Show this page" flag (for showing the run configuration settings before execution).
|
void |
setFolderName(java.lang.String folderName)
Sets the name of the folder under which the configuration is displayed in the "Run/Debug Configurations" dialog.
|
void |
setName(java.lang.String name)
Sets the name of the configuration.
|
default void |
setShared(boolean value)
Deprecated.
There are different ways of storing run configuration in a file,
use
storeInLocalWorkspace() , storeInDotIdeaFolder() or storeInArbitraryFileInProject(String) |
default void |
setSingleton(boolean value)
Deprecated.
|
void |
setTemporary(boolean temporary)
Marks the configuration as temporary or permanent.
|
void |
storeInArbitraryFileInProject(java.lang.String filePath)
Make this run configuration possible to share through VCS: store it in a
.run.xml file anywhere within the project content. |
void |
storeInDotIdeaFolder()
Make this run configuration possible to share through VCS: store it as an
.xml file in .idea/runConfigurations folder (or project.ipr file). |
void |
storeInLocalWorkspace()
Make this run configuration impossible to share through VCS, store it in
.idea/workspace.xml file. |
ConfigurationType getType()
ConfigurationFactory getFactory()
boolean isTemplate()
boolean isTemporary()
default boolean isShared()
.xml
file in .idea/runConfigurations
folder (or project.ipr
file)
and arbitrary .run.xml
file anywhere within the project content.
Effectively, this method is equivalent to isStoredInDotIdeaFolder() || isStoredInArbitraryFileInProject()
@Deprecated default void setShared(boolean value)
storeInLocalWorkspace()
, storeInDotIdeaFolder()
or storeInArbitraryFileInProject(String)
void storeInLocalWorkspace()
.idea/workspace.xml
file.boolean isStoredInLocalWorkspace()
.idea/workspace.xml
file.void storeInDotIdeaFolder()
.xml
file in .idea/runConfigurations
folder (or project.ipr
file).
Note that there are 2 different ways of storing run configuration in a file: .xml
file in .idea/runConfigurations
folder (or project.ipr
file)
and arbitrary .run.xml
file anywhere within the project content.boolean isStoredInDotIdeaFolder()
.xml
file in .idea/runConfigurations
folder (or project.ipr
file).
Note that there are 2 different ways of storing run configuration in a file: .xml
file in .idea/runConfigurations
folder (or project.ipr
file)
and arbitrary .run.xml
file anywhere within the project content.void storeInArbitraryFileInProject(java.lang.String filePath)
.run.xml
file anywhere within the project content.
It's possible to store more than one run configuration in one .run.xml
file.
Note that there are 2 different ways of storing run configuration in a file: .xml
file in .idea/runConfigurations
folder (or project.ipr
file)
and arbitrary .run.xml
file anywhere within the project content.filePath
- needs to be within the project content, otherwise the run configuration will be removed from the model.storeInDotIdeaFolder()
,
storeInLocalWorkspace()
boolean isStoredInArbitraryFileInProject()
.run.xml
file within the project content.
Note that there are 2 different ways of storing run configuration in a file: .xml
file in .idea/runConfigurations
folder (or project.ipr
file)
and arbitrary .run.xml
file anywhere within the project content.java.lang.String getPathIfStoredInArbitraryFileInProject()
isStoredInArbitraryFileInProject()
is true
, null
otherwise.void setTemporary(boolean temporary)
temporary
- true if the configuration is temporary, false if it's permanent.RunConfiguration getConfiguration()
RunConfiguration
instance that will be used to execute this run configuration.void setName(java.lang.String name)
name
- the name of the configurationjava.lang.String getName()
java.lang.String getUniqueID()
<Settings extends RunnerSettings> Settings getRunnerSettings(ProgramRunner<Settings> runner)
runner
- the runner for which the settings are requested.ConfigurationPerRunnerSettings getConfigurationSettings(ProgramRunner runner)
runner
- the runner for which the settings are requested.default void checkSettings() throws RuntimeConfigurationException
RuntimeConfigurationException
- if the configuration settings contain a non-fatal problem which the user should be warned about
but the execution should still be allowedRuntimeConfigurationError
- if the configuration settings contain a fatal problem which makes it impossible to execute the run
configuration.void checkSettings(Executor executor) throws RuntimeConfigurationException
executor
- the executor which will be used to run the configuration, or null if the check is not specific to an executor.RuntimeConfigurationException
- if the configuration settings contain a non-fatal problem which the user should be warned about
but the execution should still be allowedRuntimeConfigurationError
- if the configuration settings contain a fatal problem which makes it impossible to execute the run
configuration.@Deprecated default boolean canRunOn(ExecutionTarget target)
ExecutionTargetManager.canRun(RunnerAndConfigurationSettings, ExecutionTarget)
insteadFactory<RunnerAndConfigurationSettings> createFactory()
void setEditBeforeRun(boolean b)
b
- if true, the settings dialog will be displayed before launching this configuration.boolean isEditBeforeRun()
void setActivateToolWindowBeforeRun(boolean value)
value
- if true, the tool window will be activated before launching this configuration.boolean isActivateToolWindowBeforeRun()
@Deprecated default boolean isSingleton()
RunConfiguration.isAllowRunningInParallel()
@Deprecated default void setSingleton(boolean value)
RunConfiguration.setAllowRunningInParallel(boolean)
}void setFolderName(java.lang.String folderName)
folderName
- the folder name, or null if the configuration is displayed on the top level.java.lang.String getFolderName()