void (@NotNull Object element, @NotNull Runnable onDone, boolean parentsOnly, boolean canSmartExpand) { boolean toRevalidate = isValid(element) && !myRevalidatedObjects.contains(element) && getNodeForElement(element, false) == null && isInStructure(element); if (!toRevalidate) { runDone(onDone); return; } myRevalidatedObjects.add(element); getBuilder() .revalidateElement(element) .onSuccess(o -> invokeLaterIfNeeded(false, new TreeRunnable("AbstractTreeUi.checkPathAndMaybeRevalidate: on done revalidateElement") { @Override public void perform() { _expand(o, onDone, parentsOnly, false, canSmartExpand); } })) .onError(throwable -> wrapDone(onDone, "AbstractTreeUi.checkPathAndMaybeRevalidate: on rejected revalidateElement").run()); }