mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diagnostics and a possible fix for EA-99045 - assert: ResolveScopeManagerImpl.getDefaultResolveScope
This commit is contained in:
+4
-3
@@ -165,7 +165,7 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase<PsiFunct
|
||||
if (allCandidates.isEmpty()) return;
|
||||
|
||||
for (VirtualFile vFile : putLikelyFilesFirst(descriptors, allCandidates.keySet(), project)) {
|
||||
List<FunExprOccurrence> toLoad = filterInapplicable(samClasses, vFile, allCandidates.get(vFile));
|
||||
List<FunExprOccurrence> toLoad = filterInapplicable(samClasses, vFile, allCandidates.get(vFile), project);
|
||||
if (!toLoad.isEmpty()) {
|
||||
LOG.trace("To load " + vFile.getPath() + " with values: " + toLoad);
|
||||
if (!processor.process(vFile, ContainerUtil.map(toLoad, it -> it.funExprOffset))) {
|
||||
@@ -186,8 +186,9 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase<PsiFunct
|
||||
@NotNull
|
||||
private static List<FunExprOccurrence> filterInapplicable(List<PsiClass> samClasses,
|
||||
VirtualFile vFile,
|
||||
Collection<FunExprOccurrence> occurrences) {
|
||||
return ReadAction.compute(() -> ContainerUtil.filter(occurrences, it -> it.canHaveType(samClasses, vFile)));
|
||||
Collection<FunExprOccurrence> occurrences, Project project) {
|
||||
return ReadAction.compute(() -> project.isDisposed() ? Collections.emptyList()
|
||||
: ContainerUtil.filter(occurrences, it -> it.canHaveType(samClasses, vFile)));
|
||||
}
|
||||
|
||||
private static boolean processFile(@NotNull Processor<PsiFunctionalExpression> consumer,
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ public class ResolveScopeManagerImpl extends ResolveScopeManager {
|
||||
@Override
|
||||
public GlobalSearchScope getDefaultResolveScope(final VirtualFile vFile) {
|
||||
final PsiFile psiFile = myManager.findFile(vFile);
|
||||
assert psiFile != null;
|
||||
assert psiFile != null : "directory=" + vFile.isDirectory() + "; " + myProject;
|
||||
return getResolveScopeFromProviders(vFile);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user