void (@NotNull ActionGroup group, @NotNull AnActionEvent event, boolean wasPopup, boolean wasHideIfEmpty, boolean wasDisableIfEmpty) { boolean warnPopup = wasPopup != group.isPopup(); boolean warnHide = wasHideIfEmpty != group.hideIfNoVisibleChildren(); boolean warnDisable = wasDisableIfEmpty != group.disableIfNoVisibleChildren(); if (!(warnPopup || warnHide || warnDisable)) return; String operationName = group.getClass().getSimpleName() + "#update (" + group.getClass().getName() + ")"; if (warnPopup) { event.getPresentation().setPopupGroup(!wasPopup); // keep the old logic for a while String message = "Calling `setPopup()` in " + operationName + ". " + "Please use `event.getPresentation().setPopupGroup()` instead."; LOG.error(PluginException.createByClass(message, null, group.getClass())); } if (warnHide) { event.getPresentation().setHideGroupIfEmpty(!wasHideIfEmpty); // keep the old logic for a while String message = "Changing `hideIfNoVisibleChildren()` result in " + operationName + ". " + "Please use `event.getPresentation().setHideGroupIfEmpty()` instead."; LOG.error(PluginException.createByClass(message, null, group.getClass())); } if (warnHide) { event.getPresentation().setDisableGroupIfEmpty(!wasDisableIfEmpty); // keep the old logic for a while String message = "Changing `disableIfNoVisibleChildren()` result in " + operationName + ". " + "Please use `event.getPresentation().setHideGroupIfEmpty()` instead."; LOG.error(PluginException.createByClass(message, null, group.getClass())); } }