mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-110977 - try to search by file if element is already invalidated
This commit is contained in:
+2
-2
@@ -287,9 +287,9 @@ class AsyncProjectViewSupport {
|
||||
}
|
||||
|
||||
private static TreeVisitor createVisitor(PsiElement element, VirtualFile file, Predicate<TreePath> predicate) {
|
||||
if (element != null) return new ProjectViewNodeVisitor(element, file, predicate);
|
||||
if (element != null && element.isValid()) return new ProjectViewNodeVisitor(element, file, predicate);
|
||||
if (file != null) return new ProjectViewFileVisitor(file, predicate);
|
||||
LOG.warn("cannot create visitor without element and/or file");
|
||||
LOG.warn(element != null ? "element invalidated: " + element : "cannot create visitor without element and/or file");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user