void (RadComponent component, boolean selected) { ListenerNavigateButton btn = myNavigateButtons.get(component); if (selected) { ReadAction.nonBlocking(() -> component.getBinding() != null ? ListenerNavigateButton.prepareActionGroup(component) : null) .finishOnUiThread(ModalityState.nonModal(), group -> { if (group != null && group.getChildrenCount() > 0) { ListenerNavigateButton navigateButton = btn; if (navigateButton == null) { navigateButton = new ListenerNavigateButton(component); myNavigateButtons.put(component, navigateButton); } add(navigateButton); navigateButton.setVisible(true); } else { if (btn != null) { btn.setVisible(false); } } }) .submit(AppExecutorUtil.getAppExecutorService()); } else { if (btn != null) { btn.setVisible(false); } } }