public abstract class ConfigurationFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ConfigurationFactory[] |
EMPTY_ARRAY |
Modifier | Constructor and Description |
---|---|
protected |
ConfigurationFactory(ConfigurationType type) |
Modifier and Type | Method and Description |
---|---|
boolean |
canConfigurationBeSingleton()
Deprecated.
Use
RunConfigurationSingletonPolicy |
void |
configureBeforeRunTaskDefaults(Key<? extends BeforeRunTask> providerID,
BeforeRunTask task)
In this method you can configure defaults for the task, which are preferable to be used for your particular configuration type
|
RunConfiguration |
createConfiguration(java.lang.String name,
RunConfiguration template)
Creates a new run configuration with the specified name by cloning the specified template.
|
abstract RunConfiguration |
createTemplateConfiguration(Project project)
Creates a new template run configuration within the context of the specified project.
|
RunConfiguration |
createTemplateConfiguration(Project project,
RunManager runManager) |
javax.swing.Icon |
getAddIcon()
Deprecated.
|
javax.swing.Icon |
getIcon() |
javax.swing.Icon |
getIcon(RunConfiguration configuration) |
java.lang.String |
getId()
Returns the id of the run configuration that is used for serialization.
|
java.lang.String |
getName()
The name of the run configuration variant created by this factory.
|
java.lang.Class<? extends BaseState> |
getOptionsClass() |
RunConfigurationSingletonPolicy |
getSingletonPolicy() |
ConfigurationType |
getType() |
boolean |
isApplicable(Project project)
Override this method and return
false to hide the configuration from 'New' popup in 'Edit Configurations' dialog. |
boolean |
isConfigurationSingletonByDefault()
Deprecated.
Use
RunConfigurationSingletonPolicy |
public static final ConfigurationFactory[] EMPTY_ARRAY
protected ConfigurationFactory(ConfigurationType type)
public RunConfiguration createConfiguration(java.lang.String name, RunConfiguration template)
name
- the name for the new run configuration.template
- the template from which the run configuration is copiedpublic boolean isApplicable(Project project)
false
to hide the configuration from 'New' popup in 'Edit Configurations' dialog. It will be
still possible to create this configuration by clicking on '42 more items' in the 'New' popup.true
if it makes sense to create configurations of this type in project
public abstract RunConfiguration createTemplateConfiguration(Project project)
project
- the project in which the run configuration will be usedpublic RunConfiguration createTemplateConfiguration(Project project, RunManager runManager)
public java.lang.String getId()
getName()
and this may cause problems if getName()
returns localized value. So the default implementation
must be overriden in all inheritors. In existing implementations you need to use the same value which is returned
by getName()
for compatibility but store it directly in the code instead of taking from a message bundle. For new configurations
you may use any unique ID; if a new ConfigurationType
has a single ConfigurationFactory
, use SimpleConfigurationType
instead.public java.lang.String getName()
@Deprecated public javax.swing.Icon getAddIcon()
AllIcons.General.Add
public javax.swing.Icon getIcon(RunConfiguration configuration)
public javax.swing.Icon getIcon()
public ConfigurationType getType()
public void configureBeforeRunTaskDefaults(Key<? extends BeforeRunTask> providerID, BeforeRunTask task)
@Deprecated public boolean isConfigurationSingletonByDefault()
RunConfigurationSingletonPolicy
@Deprecated public boolean canConfigurationBeSingleton()
RunConfigurationSingletonPolicy
public RunConfigurationSingletonPolicy getSingletonPolicy()
public java.lang.Class<? extends BaseState> getOptionsClass()