void (Project project, Editor editor, TextRange range, int line, int col) { if (range != CARET_IS_OK) { if (TemplateManager.getInstance(project).getActiveTemplate(editor) == null && InplaceRefactoring.getActiveInplaceRenamer(editor) == null) { LogicalPosition pos1 = new LogicalPosition(line, col); editor.getCaretModel().moveToLogicalPosition(pos1); } if (range != null) { int offset = range.getStartOffset(); editor.getCaretModel().removeSecondaryCarets(); editor.getCaretModel().moveToOffset(offset); editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE); editor.getSelectionModel().setSelection(range.getStartOffset(), range.getEndOffset()); } } }