void (final RadComponent component, final boolean showIfEmpty) { ReadAction.nonBlocking(() -> prepareActionGroup(component)) .finishOnUiThread(ModalityState.nonModal(), actionGroup -> { if (actionGroup != null && actionGroup.getChildrenCount() == 0 && showIfEmpty) { actionGroup.add(new MyNavigateAction(UIDesignerBundle.message("navigate.to.listener.empty"), null)); } if (actionGroup != null && actionGroup.getChildrenCount() > 0) { final DataContext context = DataManager.getInstance().getDataContext(component.getDelegee()); final JBPopupFactory factory = JBPopupFactory.getInstance(); final ListPopup popup = factory.createActionGroupPopup(UIDesignerBundle.message("navigate.to.listener.title"), actionGroup, context, JBPopupFactory.ActionSelectionAid.NUMBERING, true); FormEditingUtil.showPopupUnderComponent(popup, component); } }).submit(AppExecutorUtil.getAppExecutorService()); }