void () { myRef.get().cancel(); ChangesBrowserNode<?> selection = VcsTreeModelData.selected(myViewer).iterateNodes().first(); GenericChangesBrowserNode node = ObjectUtils.tryCast(selection, GenericChangesBrowserNode.class); if (node == null) return; T newSelection = myChanges.getList().get(node.getIndex()); IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> onSelected(newSelection)); }