add additional project roots in resolve scope
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Thu, 10 Sep 2015 16:09:09 +0000 (19:09 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Thu, 10 Sep 2015 16:09:09 +0000 (19:09 +0300)
platform/indexing-impl/src/com/intellij/psi/impl/file/impl/ResolveScopeManagerImpl.java
platform/indexing-impl/src/com/intellij/util/indexing/AdditionalIndexableFileSet.java

index bf83ef0cffb6b145bdb9780008dc51dc8e3da309..079c724ca98e111126f97855bd08829fba01bced 100644 (file)
@@ -61,12 +61,13 @@ public class ResolveScopeManagerImpl extends ResolveScopeManager {
       return scope;
     }
   };
-  private AdditionalIndexableFileSet myAdditionalIndexableFileSet = new AdditionalIndexableFileSet();
+  private final AdditionalIndexableFileSet myAdditionalIndexableFileSet;
 
   public ResolveScopeManagerImpl(Project project, ProjectRootManager projectRootManager, PsiManager psiManager) {
     myProject = project;
     myProjectRootManager = projectRootManager;
     myManager = psiManager;
+    myAdditionalIndexableFileSet = new AdditionalIndexableFileSet(project);
 
     ((PsiManagerImpl) psiManager).registerRunnableToRunOnChange(new Runnable() {
       @Override
index 00df8c38367f82a417da1d33a9bcef0c6ae26aba..8b7ddf87fde1be6106786febfdc7341f7c4985d7 100644 (file)
@@ -40,6 +40,10 @@ public class AdditionalIndexableFileSet implements IndexableFileSet {
     myExtensions = extensions;
   }
 
+  public AdditionalIndexableFileSet(Project project) {
+    myProject = project;
+  }
+
   public AdditionalIndexableFileSet(IndexedRootsProvider... extensions) {
     myProject = null;
     myExtensions = extensions;