AnAction (@NotNull String id, @NotNull Icon icon) { AnAction delegate = ActionManager.getInstance().getAction(id); AnAction result = new MarkupModelDelegateAction(delegate); result.getTemplatePresentation().setIcon(icon); return result; }