void (final GuiEditor editor, final List<? extends RadComponent> selection, final AnActionEvent e) { Processor<ComponentItem> processor = selectedValue -> { Runnable runnable = () -> { for(RadComponent c: selection) { if (!morphComponent(editor, c, selectedValue)) break; } editor.refreshAndSave(true); }; CommandProcessor.getInstance().executeCommand(editor.getProject(), runnable, UIDesignerBundle.message("morph.component.command"), null); IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(editor.getGlassLayer(), true)); return true; }; PaletteListPopupStep step = new PaletteListPopupStep(editor, null, processor, UIDesignerBundle.message("morph.component.title")); step.hideNonAtomic(); if (selection.size() == 1) { step.hideComponentClass(selection.get(0).getComponentClassName()); } final ListPopup listPopup = JBPopupFactory.getInstance().createListPopup(step); FormEditingUtil.showPopupUnderComponent(listPopup, selection.get(0)); }