tolerate INRE when showing members in project view (EA-91482 - INRE: FileBasedIndexIm...
authorpeter <peter@jetbrains.com>
Wed, 16 Nov 2016 17:04:06 +0000 (18:04 +0100)
committerpeter <peter@jetbrains.com>
Wed, 16 Nov 2016 17:18:28 +0000 (18:18 +0100)
java/java-impl/src/com/intellij/ide/projectView/CompositePsiClassChildrenSource.java [moved from java/java-impl/src/com/intellij/ide/projectView/CompositePsiClasChildrenSource.java with 74% similarity]
java/java-impl/src/com/intellij/ide/projectView/PsiClassChildrenSource.java

similarity index 74%
rename from java/java-impl/src/com/intellij/ide/projectView/CompositePsiClasChildrenSource.java
rename to java/java-impl/src/com/intellij/ide/projectView/CompositePsiClassChildrenSource.java
index b76aece2c61121fd5ab2fa97433d1da856e8ffee..a70765a4a36faa97b30ce353ffcbabc4855a41f7 100644 (file)
  */
 package com.intellij.ide.projectView;
 
+import com.intellij.openapi.project.IndexNotReadyException;
 import com.intellij.psi.PsiClass;
 import com.intellij.psi.PsiElement;
 
 import java.util.List;
 
-public class CompositePsiClasChildrenSource implements PsiClassChildrenSource {
+class CompositePsiClassChildrenSource implements PsiClassChildrenSource {
   private final PsiClassChildrenSource[] mySources;
 
-  public CompositePsiClasChildrenSource(PsiClassChildrenSource[] sources) {
+  CompositePsiClassChildrenSource(PsiClassChildrenSource[] sources) {
     mySources = sources;
   }
 
   @Override
   public void addChildren(PsiClass psiClass, List<PsiElement> children) {
     for (PsiClassChildrenSource source : mySources) {
-      source.addChildren(psiClass, children);
+      try {
+        source.addChildren(psiClass, children);
+      }
+      catch (IndexNotReadyException ignore) {
+      }
     }
   }
 }
index 0466ab29bfecef87c6430a7432420854da2bb55b..5111bd60c4bbd65b0ab890b39d13daed2d1e153f 100644 (file)
@@ -50,5 +50,5 @@ public interface PsiClassChildrenSource {
     }
   };
 
-  PsiClassChildrenSource DEFAULT_CHILDREN = new CompositePsiClasChildrenSource(new PsiClassChildrenSource[]{CLASSES, METHODS, FIELDS});
+  PsiClassChildrenSource DEFAULT_CHILDREN = new CompositePsiClassChildrenSource(new PsiClassChildrenSource[]{CLASSES, METHODS, FIELDS});
 }