void (@NotNull final Project project, final Editor editor, final PsiFile file, final DataContext dataContext) { editor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE); // select editor text fragment if (!editor.getSelectionModel().hasSelection()) { editor.getSelectionModel().selectLineAtCaret(); } invokeOnEditor(project, editor, file); }