public abstract class ConfigurationFromContext
extends java.lang.Object
RunConfigurationProducer
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<ConfigurationFromContext> |
COMPARATOR
Compares configurations according to precedence.
|
static java.util.Comparator<ConfigurationFromContext> |
NAME_COMPARATOR
Compares configurations according to configuration type name.
|
Constructor and Description |
---|
ConfigurationFromContext() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAlternativeLocationDisplayName()
Return alternative location display name provided by
MultipleRunLocationsProvider . |
RunConfiguration |
getConfiguration()
Returns the run configuration object for the created configuration.
|
abstract RunnerAndConfigurationSettings |
getConfigurationSettings()
Returns the created run configuration settings.
|
ConfigurationType |
getConfigurationType()
Returns the type of the created configuration.
|
abstract PsiElement |
getSourceElement()
Returns the element from which this configuration was created.
|
boolean |
isFromAlternativeLocation()
Return if this configuration was created from alternative location provided by
MultipleRunLocationsProvider . |
boolean |
isPreferredTo(ConfigurationFromContext other)
Checks if this configuration should be discarded in favor of another configuration created from the same context.
|
boolean |
isProducedBy(java.lang.Class<? extends RunConfigurationProducer> producerClass)
Checks if this configuration was created by the specified producer.
|
void |
onFirstRun(ConfigurationContext context,
java.lang.Runnable startRunnable)
Called before the configuration created from context is first executed.
|
void |
setAlternativeLocationDisplayName(java.lang.String alternativeLocationDisplayName) |
abstract void |
setConfigurationSettings(RunnerAndConfigurationSettings configurationSettings) |
void |
setFromAlternativeLocation(boolean isFromAlternativeLocation) |
boolean |
shouldReplace(ConfigurationFromContext other)
Checks if this configuration should replace another one, that is if the other should be discarded.
|
java.lang.String |
toString() |
public static final java.util.Comparator<ConfigurationFromContext> COMPARATOR
public static final java.util.Comparator<ConfigurationFromContext> NAME_COMPARATOR
public abstract RunnerAndConfigurationSettings getConfigurationSettings()
public abstract void setConfigurationSettings(RunnerAndConfigurationSettings configurationSettings)
public RunConfiguration getConfiguration()
public ConfigurationType getConfigurationType()
public abstract PsiElement getSourceElement()
public void onFirstRun(ConfigurationContext context, java.lang.Runnable startRunnable)
context
- the contextstartRunnable
- the runnable that needs to be called after additional customization is complete.public boolean isPreferredTo(ConfigurationFromContext other)
other
- another configuration created from the same context.public boolean shouldReplace(ConfigurationFromContext other)
RunConfigurationProducer.shouldReplace(ConfigurationFromContext, ConfigurationFromContext)
public boolean isProducedBy(java.lang.Class<? extends RunConfigurationProducer> producerClass)
producerClass
- the run configuration producer class.public java.lang.String toString()
toString
in class java.lang.Object
public boolean isFromAlternativeLocation()
MultipleRunLocationsProvider
.public void setFromAlternativeLocation(boolean isFromAlternativeLocation)
public java.lang.String getAlternativeLocationDisplayName()
MultipleRunLocationsProvider
.public void setAlternativeLocationDisplayName(java.lang.String alternativeLocationDisplayName)