public abstract class TestDiscoveryConfigurationProducer extends JavaRunConfigurationProducerBase<JavaTestConfigurationWithDiscoverySupport>
EP_NAME
Constructor and Description |
---|
TestDiscoveryConfigurationProducer() |
Modifier and Type | Method and Description |
---|---|
protected static java.util.LinkedHashSet<java.lang.String> |
collectMethodPatterns(Location<PsiMethod> [] testMethods) |
RunProfile |
createProfile(Location<PsiMethod>[] testMethods,
Module module,
ConfigurationContext context,
java.lang.String configurationName) |
abstract RunProfileState |
createProfile(Location<PsiMethod> [] testMethods,
Module module,
RunConfiguration configuration,
ExecutionEnvironment environment) |
static Module |
detectTargetModule(java.util.Collection<? extends Module> survivedModules,
Project project) |
protected Module |
findModule(JavaTestConfigurationWithDiscoverySupport configuration,
Module contextModule) |
protected abstract Pair<java.lang.String,java.lang.String> |
getPosition(JavaTestConfigurationBase configuration) |
abstract boolean |
isApplicable(Location<PsiMethod> testMethod) |
boolean |
isConfigurationFromContext(JavaTestConfigurationWithDiscoverySupport configuration,
ConfigurationContext configurationContext)
Checks if the specified configuration was created from the specified context.
|
protected abstract void |
setPosition(JavaTestConfigurationBase configuration,
PsiLocation<PsiMethod> position) |
protected boolean |
setupConfigurationFromContext(JavaTestConfigurationWithDiscoverySupport configuration,
ConfigurationContext configurationContext,
Ref<PsiElement> ref)
Sets up a configuration based on the specified context.
|
protected void |
setupDiscoveryConfiguration(JavaTestConfigurationBase configuration,
PsiMethod sourceMethod,
Module targetModule) |
createConfigurationFromContext, setupConfigurationModule, setupPackageConfiguration
cloneTemplateConfiguration, cloneTemplateConfigurationStatic, createLightConfiguration, findExistingConfiguration, findOrCreateConfigurationFromContext, getConfigurationFactory, getConfigurationSettingsList, getConfigurationType, getInstance, getProducers, isPreferredConfiguration, onFirstRun, shouldReplace
protected abstract void setPosition(JavaTestConfigurationBase configuration, PsiLocation<PsiMethod> position)
protected abstract Pair<java.lang.String,java.lang.String> getPosition(JavaTestConfigurationBase configuration)
protected void setupDiscoveryConfiguration(JavaTestConfigurationBase configuration, PsiMethod sourceMethod, Module targetModule)
protected boolean setupConfigurationFromContext(JavaTestConfigurationWithDiscoverySupport configuration, ConfigurationContext configurationContext, Ref<PsiElement> ref)
RunConfigurationProducer
setupConfigurationFromContext
in class RunConfigurationProducer<JavaTestConfigurationWithDiscoverySupport>
configuration
- a clone of the template run configuration of the specified typeconfigurationContext
- contains the information about a location in the source code.ref
- 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 abstract RunProfileState createProfile(Location<PsiMethod> [] testMethods, Module module, RunConfiguration configuration, ExecutionEnvironment environment)
public RunProfile createProfile(Location<PsiMethod>[] testMethods, Module module, ConfigurationContext context, java.lang.String configurationName)
public static Module detectTargetModule(java.util.Collection<? extends Module> survivedModules, Project project)
protected Module findModule(JavaTestConfigurationWithDiscoverySupport configuration, Module contextModule)
findModule
in class JavaRunConfigurationProducerBase<JavaTestConfigurationWithDiscoverySupport>
public boolean isConfigurationFromContext(JavaTestConfigurationWithDiscoverySupport configuration, ConfigurationContext configurationContext)
RunConfigurationProducer
isConfigurationFromContext
in class RunConfigurationProducer<JavaTestConfigurationWithDiscoverySupport>
configuration
- a configuration instance.configurationContext
- contains the information about a location in the source code.