INRE: hierarchy view is not available during dumb mode so if it starts during loading nodes, just ignore

EA-87838 - INRE: FileBasedIndexImpl.handleDumbMode
This commit is contained in:
Anna.Kozlova
2016-10-14 09:57:28 +02:00
parent 30d5ae89d0
commit 277deeb3f8
@@ -18,6 +18,7 @@ package com.intellij.ide.hierarchy;
import com.intellij.ide.util.treeView.AbstractTreeStructure;
import com.intellij.ide.util.treeView.NodeDescriptor;
import com.intellij.openapi.project.IndexNotReadyException;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.TestSourcesFilter;
import com.intellij.openapi.util.ActionCallback;
@@ -93,7 +94,12 @@ public abstract class HierarchyTreeStructure extends AbstractTreeStructure {
final Object[] cachedChildren = descriptor.getCachedChildren();
if (cachedChildren == null) {
if (descriptor.isValid()) {
descriptor.setCachedChildren(buildChildren(descriptor));
try {
descriptor.setCachedChildren(buildChildren(descriptor));
}
catch (IndexNotReadyException e) {
return ArrayUtil.EMPTY_OBJECT_ARRAY;
}
}
else {
descriptor.setCachedChildren(ArrayUtil.EMPTY_OBJECT_ARRAY);