void (@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)); if (found instanceof AbstractTreeNode) { update((AbstractTreeNode<?>)found, false); } }); }