AnAction () { return new AnAction() { @Override public void actionPerformed(@NotNull AnActionEvent e) { final Editor editor = e.getData(CommonDataKeys.EDITOR); if (editor != null) { XmlChooseColorIntentionAction.chooseColor(editor.getComponent(), myElement); } } }; }