JetPositionManager: do not calculate class name during indexing
This commit is contained in:
@@ -217,10 +217,15 @@ public class JetPositionManager(private val myDebugProcess: DebugProcess) : Mult
|
|||||||
|
|
||||||
private fun classNameForPosition(element: PsiElement): String? {
|
private fun classNameForPosition(element: PsiElement): String? {
|
||||||
return runReadAction {
|
return runReadAction {
|
||||||
val file = element.getContainingFile() as JetFile
|
if (DumbService.getInstance(element.getProject()).isDumb()) {
|
||||||
val isInLibrary = LibraryUtil.findLibraryEntry(file.getVirtualFile(), file.getProject()) != null
|
null
|
||||||
val typeMapper = if (!isInLibrary) prepareTypeMapper(file) else createTypeMapperForLibraryFile(element, file)
|
}
|
||||||
getInternalClassNameForElement(element, typeMapper, file, isInLibrary).className
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user