@Override
  public void update(Editor editor, Presentation presentation, DataContext dataContext) {
    super.update(editor, presentation, dataContext);
    presentation.setVisible(editor.getSelectionModel().hasSelection(true) && CopyAsRichTextAction.isRichCopyPossible(editor));
  }
@Override
  public void update(Editor editor, Presentation presentation, DataContext dataContext)