use of com.intellij.psi.search.scope.packageSet.PackageSetBase in project android by JetBrains.
the class TestArtifactCustomScopeTest method testUnitTestFileColor.
public void testUnitTestFileColor() throws Exception {
VirtualFile file = findRelativeFile("app/src/test/java/google/simpleapplication/UnitTest.java", getProject().getBaseDir());
assertNotNull(file);
UnitTestsScope scope = new UnitTestsScope();
PackageSetBase packageSet = (PackageSetBase) scope.getValue();
assertNotNull(packageSet);
assertTrue(packageSet.contains(file, getProject(), null));
}
use of com.intellij.psi.search.scope.packageSet.PackageSetBase in project intellij-community by JetBrains.
the class FileColorsModel method findConfiguration.
@Nullable
private FileColorConfiguration findConfiguration(@NotNull final VirtualFile colored) {
for (FileColorConfiguration configuration : getConfigurations()) {
NamedScope scope = NamedScopesHolder.getScope(myProject, configuration.getScopeName());
if (scope != null) {
NamedScopesHolder namedScopesHolder = NamedScopesHolder.getHolder(myProject, configuration.getScopeName(), null);
PackageSet packageSet = scope.getValue();
if (packageSet instanceof PackageSetBase && namedScopesHolder != null && ((PackageSetBase) packageSet).contains(colored, myProject, namedScopesHolder)) {
return configuration;
}
}
}
return null;
}
use of com.intellij.psi.search.scope.packageSet.PackageSetBase in project android by JetBrains.
the class TestArtifactCustomScopeTest method ignore_testAndroidTestFileColor.
// see comments on http://ag/1025651
public void ignore_testAndroidTestFileColor() throws Exception {
VirtualFile file = findRelativeFile("app/src/androidTest/java/google/simpleapplication/ApplicationTest.java", getProject().getBaseDir());
assertNotNull(file);
AndroidTestsScope scope = new AndroidTestsScope();
PackageSetBase packageSet = (PackageSetBase) scope.getValue();
assertNotNull(packageSet);
assertTrue(packageSet.contains(file, getProject(), null));
}
Aggregations