Do not try to find source file in Debugger when Indexes are not ready

#EA-72812 - INRE: FileBasedIndexImpl.handleDumbMode
This commit is contained in:
Natalia Ukhorskaya
2015-09-10 13:59:21 +03:00
parent fbc769b0e9
commit dfe9bb65b0
2 changed files with 2 additions and 2 deletions
@@ -175,8 +175,6 @@ public class JetPositionManager(private val myDebugProcess: DebugProcess) : Mult
val project = myDebugProcess.getProject()
if (DumbService.getInstance(project).isDumb()) return null
return DebuggerUtils.findSourceFileForClass(project, GlobalSearchScope.allScope(project), className, sourceName, location.lineNumber() - 1)
}
@@ -20,6 +20,7 @@ import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import com.intellij.openapi.project.DumbService;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.libraries.LibraryUtil;
import com.intellij.openapi.util.io.FileUtilRt;
@@ -71,6 +72,7 @@ public class DebuggerUtils {
) {
String extension = FileUtilRt.getExtension(fileName);
if (!KOTLIN_EXTENSIONS.contains(extension)) return null;
if (DumbService.getInstance(project).isDumb()) return null;
Collection<JetFile> filesInPackage = findFilesWithExactPackage(className.getPackageFqName(), searchScope, project);
Collection<JetFile> filesWithExactName = Collections2.filter(filesInPackage, new Predicate<JetFile>() {