Handle INRE in breadcrumbs tooltip calculation (EA-91631 - INRE: FileBasedIndexImpl.handleDumbMode)

This commit is contained in:
Dmitry Jemerov
2016-11-21 16:54:38 +01:00
parent 56cb448e8a
commit b696f9ee8d
@@ -17,6 +17,7 @@
package org.jetbrains.kotlin.idea.codeInsight package org.jetbrains.kotlin.idea.codeInsight
import com.intellij.openapi.project.DumbService import com.intellij.openapi.project.DumbService
import com.intellij.openapi.project.IndexNotReadyException
import com.intellij.psi.ElementDescriptionUtil import com.intellij.psi.ElementDescriptionUtil
import com.intellij.psi.PsiElement import com.intellij.psi.PsiElement
import com.intellij.refactoring.util.RefactoringDescriptionLocation import com.intellij.refactoring.util.RefactoringDescriptionLocation
@@ -210,8 +211,13 @@ class KotlinBreadcrumbsInfoProvider : BreadcrumbsInfoProvider() {
} }
override fun elementTooltip(element: KtDeclaration): String { override fun elementTooltip(element: KtDeclaration): String {
try {
return ElementDescriptionUtil.getElementDescription(element, RefactoringDescriptionLocation.WITH_PARENT) return ElementDescriptionUtil.getElementDescription(element, RefactoringDescriptionLocation.WITH_PARENT)
} }
catch (e: IndexNotReadyException) {
return "Indexing..."
}
}
} }
private abstract class ConstructWithExpressionHandler<TElement : KtElement>( private abstract class ConstructWithExpressionHandler<TElement : KtElement>(