void (@NotNull GuiEditor editor, final ArrayList<? extends RadComponent> selection, final AnActionEvent e) { if (selection.size() == 0) { e.getPresentation().setEnabled(false); return; } for(RadComponent c: selection) { if (!(c instanceof RadAtomicComponent)) { e.getPresentation().setEnabled(false); return; } } }