public class JavaScratchConfigurationProducer extends AbstractApplicationConfigurationProducer<JavaScratchConfiguration>
EP_NAME
Constructor and Description |
---|
JavaScratchConfigurationProducer() |
Modifier and Type | Method and Description |
---|---|
ConfigurationFactory |
getConfigurationFactory() |
boolean |
isConfigurationFromContext(JavaScratchConfiguration configuration,
ConfigurationContext context)
Checks if the specified configuration was created from the specified context.
|
protected boolean |
setupConfigurationFromContext(JavaScratchConfiguration configuration,
ConfigurationContext context,
Ref<PsiElement> sourceElement)
Sets up a configuration based on the specified context.
|
boolean |
shouldReplace(ConfigurationFromContext self,
ConfigurationFromContext other)
When two configurations are created from the same context by two different producers, checks if the configuration created by
this producer should replace the other one, that is if the other one should be discarded.
|
createConfigurationFromContext, findModule, setupConfigurationModule, setupPackageConfiguration
cloneTemplateConfiguration, cloneTemplateConfigurationStatic, createLightConfiguration, findExistingConfiguration, findOrCreateConfigurationFromContext, getConfigurationSettingsList, getConfigurationType, getInstance, getProducers, isPreferredConfiguration, onFirstRun
public ConfigurationFactory getConfigurationFactory()
getConfigurationFactory
in class RunConfigurationProducer<JavaScratchConfiguration>
protected boolean setupConfigurationFromContext(JavaScratchConfiguration configuration, ConfigurationContext context, Ref<PsiElement> sourceElement)
RunConfigurationProducer
setupConfigurationFromContext
in class AbstractApplicationConfigurationProducer<JavaScratchConfiguration>
configuration
- a clone of the template run configuration of the specified typecontext
- contains the information about a location in the source code.sourceElement
- a reference to the source element for the run configuration (by default contains the element at caret,
can be updated by the producer to point to a higher-level element in the tree).public boolean shouldReplace(ConfigurationFromContext self, ConfigurationFromContext other)
RunConfigurationProducer
This is the same relationship as RunConfigurationProducer.isPreferredConfiguration(ConfigurationFromContext, ConfigurationFromContext)
but
specified from the "replacement" side.
shouldReplace
in class RunConfigurationProducer<JavaScratchConfiguration>
self
- a configuration created by this producer.other
- a configuration created by another producer.RunConfigurationProducer.isPreferredConfiguration(ConfigurationFromContext, ConfigurationFromContext)
public boolean isConfigurationFromContext(JavaScratchConfiguration configuration, ConfigurationContext context)
RunConfigurationProducer
isConfigurationFromContext
in class AbstractApplicationConfigurationProducer<JavaScratchConfiguration>
configuration
- a configuration instance.context
- contains the information about a location in the source code.