Promise<Object> (Object element, VirtualFile file, boolean requestFocus, Condition<? super AbstractTreeNode<?>> nonStopCondition) { AbstractTreeUpdater updater = getUpdater(); if (updater == null) { return Promises.rejectedPromise(); } final AsyncPromise<Object> result = new AsyncPromise<>(); UiActivityMonitor.getInstance().addActivity(myProject, new UiActivity.AsyncBgOperation("projectViewSelect"), updater.getModalityState()); batch(indicator -> { _select(element, file, requestFocus, nonStopCondition, result, indicator, null, false); UiActivityMonitor.getInstance().removeActivity(myProject, new UiActivity.AsyncBgOperation("projectViewSelect")); }); return result; }