mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-189742: update presentation for parent folders of removed files
This commit is contained in:
@@ -225,6 +225,11 @@ class AsyncProjectViewSupport {
|
||||
}
|
||||
|
||||
private void updatePresentationsFromRootTo(@NotNull VirtualFile file) {
|
||||
// find first valid parent for removed file
|
||||
while (!file.isValid()) {
|
||||
file = file.getParent();
|
||||
if (file == null) return;
|
||||
}
|
||||
SmartList<TreePath> list = new SmartList<>();
|
||||
acceptAndUpdate(new ProjectViewFileVisitor(file, null) {
|
||||
@NotNull
|
||||
|
||||
@@ -273,6 +273,11 @@ public final class ScopeViewTreeModel extends BaseTreeModel<AbstractTreeNode> im
|
||||
}
|
||||
|
||||
private void notifyPresentationChanged(@NotNull VirtualFile file) {
|
||||
// find first valid parent for removed file
|
||||
while (!file.isValid()) {
|
||||
file = file.getParent();
|
||||
if (file == null) return;
|
||||
}
|
||||
List<Node> list = new SmartList<>();
|
||||
find(file, list, found -> {
|
||||
list.forEach(node -> update(node, false));
|
||||
|
||||
Reference in New Issue
Block a user