@Override
    public boolean isCopyVisible(@NotNull DataContext dataContext) {
      Caret caret = dataContext.getData(CommonDataKeys.CARET);
      return caret != null
             ? isCaretInsideSelection(caret)
             : getSelectionModel().hasSelection(true);
    }
@Override
    public boolean isCopyVisible(@NotNull DataContext dataContext)