mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove redundant fields in *TestConsoleProperties
This commit is contained in:
+2
-4
@@ -34,23 +34,21 @@ import javax.swing.*;
|
||||
|
||||
public class JUnitConsoleProperties extends JavaAwareTestConsoleProperties<JUnitConfiguration> {
|
||||
|
||||
private final JUnitConfiguration myConfiguration;
|
||||
|
||||
public JUnitConsoleProperties(@NotNull JUnitConfiguration configuration, Executor executor) {
|
||||
super("JUnit", configuration, executor);
|
||||
myConfiguration = configuration;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected GlobalSearchScope initScope() {
|
||||
final JUnitConfiguration.Data persistentData = myConfiguration.getPersistentData();
|
||||
final JUnitConfiguration.Data persistentData = getConfiguration().getPersistentData();
|
||||
final String testObject = persistentData.TEST_OBJECT;
|
||||
//ignore invisible setting
|
||||
if (JUnitConfiguration.TEST_CATEGORY.equals(testObject) ||
|
||||
JUnitConfiguration.TEST_PATTERN.equals(testObject) ||
|
||||
JUnitConfiguration.TEST_PACKAGE.equals(testObject)) {
|
||||
final SourceScope sourceScope = persistentData.getScope().getSourceScope(myConfiguration);
|
||||
final SourceScope sourceScope = persistentData.getScope().getSourceScope(getConfiguration());
|
||||
return sourceScope != null ? sourceScope.getGlobalSearchScope() : GlobalSearchScope.allScope(getProject());
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -34,23 +34,22 @@ import org.jetbrains.annotations.Nullable;
|
||||
import javax.swing.*;
|
||||
|
||||
public class TestNGConsoleProperties extends JavaAwareTestConsoleProperties<TestNGConfiguration> {
|
||||
private final TestNGConfiguration myConfiguration;
|
||||
|
||||
public TestNGConsoleProperties(TestNGConfiguration config, Executor executor) {
|
||||
super("TestNG", config, executor);
|
||||
myConfiguration = config;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected GlobalSearchScope initScope() {
|
||||
final String testObject = myConfiguration.getPersistantData().TEST_OBJECT;
|
||||
final TestNGConfiguration configuration = getConfiguration();
|
||||
final String testObject = configuration.getPersistantData().TEST_OBJECT;
|
||||
if (TestType.CLASS.getType().equals(testObject) ||
|
||||
TestType.METHOD.getType().equals(testObject)) {
|
||||
return super.initScope();
|
||||
}
|
||||
else {
|
||||
final SourceScope sourceScope = myConfiguration.getPersistantData().getScope().getSourceScope(myConfiguration);
|
||||
final SourceScope sourceScope = configuration.getPersistantData().getScope().getSourceScope(configuration);
|
||||
return sourceScope != null ? sourceScope.getGlobalSearchScope() : GlobalSearchScope.allScope(getProject());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user