do not include test sources in non-java IDEs

This commit is contained in:
Anna Kozlova
2012-09-12 17:53:24 +04:00
parent 088c51820a
commit 6173b7cbf0
2 changed files with 4 additions and 3 deletions
@@ -23,6 +23,7 @@ package com.intellij.analysis;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.project.Project;
import com.intellij.psi.search.scope.ProjectProductionScope;
import com.intellij.psi.search.scope.TestsScope;
import com.intellij.psi.search.scope.packageSet.CustomScopesProviderEx;
import com.intellij.psi.search.scope.packageSet.NamedScope;
import org.jetbrains.annotations.NotNull;
@@ -43,7 +44,8 @@ public class PackagesScopesProvider extends CustomScopesProviderEx {
public PackagesScopesProvider() {
myProjectProductionScope = new ProjectProductionScope();
myScopes = Arrays.asList(myProjectProductionScope);
final NamedScope projectTestScope = new TestsScope();
myScopes = Arrays.asList(myProjectProductionScope, projectTestScope);
}
@Override
@@ -47,7 +47,6 @@ public class DefaultScopesProvider extends CustomScopesProviderEx {
public DefaultScopesProvider(Project project) {
myProject = project;
final NamedScope projectScope = new ProjectFilesScope();
final NamedScope projectTestScope = new TestsScope();
final NamedScope nonProjectScope = new NonProjectFilesScope();
final String text = FilePatternPackageSet.SCOPE_FILE + ":*//*";
myProblemsScope = new NamedScope(IdeBundle.message("predefined.scope.problems.name"), new AbstractPackageSet(text) {
@@ -56,7 +55,7 @@ public class DefaultScopesProvider extends CustomScopesProviderEx {
&& WolfTheProblemSolver.getInstance(myProject).isProblemFile(file);
}
});
myScopes = Arrays.asList(projectScope, getProblemsScope(), getAllScope(), projectTestScope, nonProjectScope);
myScopes = Arrays.asList(projectScope, getProblemsScope(), getAllScope(), nonProjectScope);
}
@NotNull