public abstract class RunConfigurationExtensionBase<T extends RunConfigurationBase<?>>
extends java.lang.Object
Constructor and Description |
---|
RunConfigurationExtensionBase() |
Modifier and Type | Method and Description |
---|---|
protected void |
attachToProcess(T configuration,
ProcessHandler handler,
RunnerSettings runnerSettings)
Attaches the extension to a process that has been started.
|
protected <P extends T> |
createEditor(P configuration)
Creates an editor for the settings of this extension.
|
protected void |
extendCreatedConfiguration(T configuration,
Location location)
Setup extension settings for a run configuration that has been created from context.
|
protected void |
extendTemplateConfiguration(T configuration) |
protected java.lang.String |
getEditorTitle()
Returns the title of the tab in which the settings editor is displayed.
|
protected java.lang.String |
getSerializationId()
Returns the ID used to serialize the settings.
|
abstract boolean |
isApplicableFor(T configuration) |
abstract boolean |
isEnabledFor(T applicableConfiguration,
RunnerSettings runnerSettings) |
protected abstract void |
patchCommandLine(T configuration,
RunnerSettings runnerSettings,
GeneralCommandLine cmdLine,
java.lang.String runnerId)
Patches the command line of the process about to be started by the underlying run configuration.
|
protected void |
patchCommandLine(T configuration,
RunnerSettings runnerSettings,
GeneralCommandLine cmdLine,
java.lang.String runnerId,
Executor executor)
Patches the command line of the process about to be started by the underlying run configuration.
|
protected void |
readExternal(T runConfiguration,
Element element)
Loads the settings of this extension from the run configuration XML element.
|
protected void |
validateConfiguration(T configuration,
boolean isExecution)
Validate extensions after general configuration validation passed
|
protected void |
writeExternal(T runConfiguration,
Element element)
Saves the settings of this extension to the run configuration XML element.
|
protected java.lang.String getSerializationId()
protected void readExternal(T runConfiguration, Element element)
runConfiguration
- the run configuration being deserialized.element
- the element with persisted settings.protected void writeExternal(T runConfiguration, Element element)
runConfiguration
- the run configuration being serialized.element
- the element into which the settings should be persisted,protected <P extends T> SettingsEditor<P> createEditor(P configuration)
configuration
- the configuration being edited.protected java.lang.String getEditorTitle()
public abstract boolean isApplicableFor(T configuration)
configuration
- Run configurationpublic abstract boolean isEnabledFor(T applicableConfiguration, RunnerSettings runnerSettings)
applicableConfiguration
- Applicable run configurationprotected abstract void patchCommandLine(T configuration, RunnerSettings runnerSettings, GeneralCommandLine cmdLine, java.lang.String runnerId) throws ExecutionException
configuration
- the underlying run configuration.runnerSettings
- the runner-specific settings.cmdLine
- the command line of the process about to be started.runnerId
- the ID of the ProgramRunner
used to start the process.ExecutionException
- if there was an error configuring the command line and the execution should be canceled.protected void patchCommandLine(T configuration, RunnerSettings runnerSettings, GeneralCommandLine cmdLine, java.lang.String runnerId, Executor executor) throws ExecutionException
configuration
- the underlying run configuration.runnerSettings
- the runner-specific settings.cmdLine
- the command line of the process about to be started.runnerId
- the ID of the ProgramRunner
used to start the process.executor
- the executor which is using to run the configurationExecutionException
- if there was an error configuring the command line and the execution should be canceled.protected void attachToProcess(T configuration, ProcessHandler handler, RunnerSettings runnerSettings)
configuration
- the underlying run configuration.handler
- the ProcessHandler for the running process.runnerSettings
- the runner-specific settings.protected void validateConfiguration(T configuration, boolean isExecution) throws java.lang.Exception
isExecution
- true if the configuration is about to be executed, false if the configuration settings are being edited.java.lang.Exception
protected void extendCreatedConfiguration(T configuration, Location location)
configuration
- Configuration created from context.location
- the location from which the configuration was created.protected void extendTemplateConfiguration(T configuration)