boolean (@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) { if (editor.isOneLineMode() && Boolean.TRUE.equals(PlatformCoreDataKeys.IS_MODAL_CONTEXT.getData(dataContext))) return false; SelectionModel selectionModel = editor.getSelectionModel(); CaretModel caretModel = editor.getCaretModel(); return selectionModel.hasSelection() || caretModel.getCaretCount() > 1; }