From a47a27565b7dc40bba15005924bc784fcbf14378 Mon Sep 17 00:00:00 2001 From: Natalia Ukhorskaya Date: Mon, 25 May 2015 14:22:25 +0300 Subject: [PATCH] JetPositionManager: do not calculate class name during indexing --- .../kotlin/idea/debugger/JetPositionManager.kt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/debugger/JetPositionManager.kt b/idea/src/org/jetbrains/kotlin/idea/debugger/JetPositionManager.kt index 09d056f084a..9aec3f792fe 100644 --- a/idea/src/org/jetbrains/kotlin/idea/debugger/JetPositionManager.kt +++ b/idea/src/org/jetbrains/kotlin/idea/debugger/JetPositionManager.kt @@ -217,10 +217,15 @@ public class JetPositionManager(private val myDebugProcess: DebugProcess) : Mult private fun classNameForPosition(element: PsiElement): String? { return runReadAction { - val file = element.getContainingFile() as JetFile - val isInLibrary = LibraryUtil.findLibraryEntry(file.getVirtualFile(), file.getProject()) != null - val typeMapper = if (!isInLibrary) prepareTypeMapper(file) else createTypeMapperForLibraryFile(element, file) - getInternalClassNameForElement(element, typeMapper, file, isInLibrary).className + if (DumbService.getInstance(element.getProject()).isDumb()) { + null + } + else { + val file = element.getContainingFile() as JetFile + val isInLibrary = LibraryUtil.findLibraryEntry(file.getVirtualFile(), file.getProject()) != null + val typeMapper = if (!isInLibrary) prepareTypeMapper(file) else createTypeMapperForLibraryFile(element, file) + getInternalClassNameForElement(element, typeMapper, file, isInLibrary).className + } } }