void (@NotNull AnActionEvent e) { Presentation p = e.getPresentation(); T scheme = getCurrentScheme(); p.setEnabledAndVisible(scheme != null && mySchemesPanel.getModel().canDuplicateScheme(scheme)); }