private boolean spansMultipleModules() {
   final String qualifiedName = getConfiguration().getPackage();
   if (qualifiedName != null) {
     final Project project = getConfiguration().getProject();
     final PsiPackage aPackage = JavaPsiFacade.getInstance(project).findPackage(qualifiedName);
     if (aPackage != null) {
       final TestSearchScope scope = getScope();
       if (scope != null) {
         final SourceScope sourceScope = scope.getSourceScope(getConfiguration());
         if (sourceScope != null) {
           final GlobalSearchScope configurationSearchScope =
               GlobalSearchScopesCore.projectTestScope(project)
                   .intersectWith(sourceScope.getGlobalSearchScope());
           final PsiDirectory[] directories = aPackage.getDirectories(configurationSearchScope);
           return directories.length > 1;
         }
       }
     }
   }
   return false;
 }
Ejemplo n.º 2
0
 public SourceScope getSourceScope() {
   return SourceScope.modulesWithDependencies(myConfiguration.getModules());
 }
Ejemplo n.º 3
0
 public Module[] getModulesToCompile() {
   final SourceScope sourceScope = getSourceScope();
   return sourceScope != null ? sourceScope.getModulesToCompile() : Module.EMPTY_ARRAY;
 }