void (Editor editor, PsiFile file, SelectionModel selectionModel, int offset) { final GrVariable variable = findVariableAtCaret(file, editor, offset); if (variable == null || variable instanceof GrField || variable instanceof GrParameter) { selectionModel.selectLineAtCaret(); } else { final TextRange textRange = variable.getTextRange(); selectionModel.setSelection(textRange.getStartOffset(), textRange.getEndOffset()); } }