void (final int nextPos) { myNavigatedNow = true; final Place next = myHistory.get(nextPos); final Place from = getCurrent(); fireStarted(from, next); try { final ActionCallback callback = myRoot.navigateTo(next, false); assert callback != null; callback.doWhenDone(() -> { synchronized (this) { myCurrentPos = nextPos; } }).doWhenProcessed(() -> { myNavigatedNow = false; fireFinished(from, next); }); } catch (Throwable e) { myNavigatedNow = false; throw new RuntimeException(e); } }