void (@NotNull PsiFile file, @NotNull Editor editor, @NotNull SelectionModel selectionModel, @NotNull Project project) { if (file.findElementAt(editor.getCaretModel().getOffset()) instanceof PsiWhiteSpace) return; selectionModel.selectWordAtCaret(false); String selection = selectionModel.getSelectedText(); if (selection != null) { for (int i = 0; i < selection.length(); i++) { if (!Character.isJavaIdentifierPart(selection.charAt(i))) { selectionModel.removeSelection(); } } } doRangeHighlighting(editor, project); selectionModel.removeSelection(); }