void (@NotNull final AnActionEvent e) { super.update(e); CaptionSelection selection = e.getData(CaptionSelection.DATA_KEY); if (selection != null) { e.getPresentation().setEnabled(selection.getContainer() != null && selection.getContainer().getLayout() instanceof FormLayout && GroupRowsColumnsAction.isGrouped(selection)); } }