Icon (boolean enabled) { Presentation p = getAction().getTemplatePresentation(); Icon icon = Objects.requireNonNullElse(p.getIcon(), AllIcons.Toolbar.Unknown); if (enabled) return icon; if (p.getDisabledIcon() != null) return p.getDisabledIcon(); return IconLoader.getDisabledIcon(icon); }