diff --git a/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java b/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java index bba107fcd03f..248ca7b7c154 100644 --- a/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java +++ b/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java @@ -178,6 +178,9 @@ public class CompilerReferenceServiceImpl extends CompilerReferenceService imple PsiModificationTracker.MODIFICATION_COUNT, this)); } + catch (ProcessCanceledException e) { + throw e; + } catch (Exception e) { LOG.error("an exception during scope without code references calculation", e); return null; @@ -211,7 +214,6 @@ public class CompilerReferenceServiceImpl extends CompilerReferenceService imple if (!isServiceEnabledFor(aClass) || searchScope == LibraryScopeCache.getInstance(myProject).getLibrariesOnlyScope()) return null; try { - Map candidatesPerFile = ReadAction.compute(() -> { if (myProject.isDisposed()) throw new ProcessCanceledException(); return CachedValuesManager.getCachedValue(aClass, () -> CachedValueProvider.Result.create( @@ -234,6 +236,9 @@ public class CompilerReferenceServiceImpl extends CompilerReferenceService imple } return new CompilerHierarchyInfoImpl(candidatesPerFile, aClass, dirtyScope, searchScope, myProject, searchFileType, searchType); } + catch (ProcessCanceledException e) { + throw e; + } catch (Exception e) { LOG.error("an exception during hierarchy calculation", e); return null;