public static GlobalSearchScope adjustScope(PsiDirectory baseDir,
                                              GlobalSearchScope scope,
                                              boolean skipSourceDirsForBaseTestDirectory,
                                              boolean skipTestDirsForBaseSourceDirectory) {
    if (baseDir != null) {
      if (TestSourcesFilter.isTestSources(baseDir.getVirtualFile(), baseDir.getProject())) {
        if (skipSourceDirsForBaseTestDirectory) {
          return scope.intersectWith(GlobalSearchScopesCore.projectTestScope(baseDir.getProject()));
        }
      }
      else {
        if (skipTestDirsForBaseSourceDirectory) {
          return scope.intersectWith(GlobalSearchScopesCore.projectProductionScope(baseDir.getProject()));
        }
      }
    }
    return scope;
  }
public static GlobalSearchScope adjustScope(PsiDirectory baseDir,
                                              GlobalSearchScope scope,
                                              boolean skipSourceDirsForBaseTestDirectory,
                                              boolean skipTestDirsForBaseSourceDirectory)