boolean (@NotNull Editor editor, @NotNull SearchResults.Direction direction) { editor.getCaretModel().removeSecondaryCarets(); if (tryToFindNextUsageViaEditorSearchComponent(editor, direction)) { return true; } RangeHighlighter[] highlighters = ((HighlightManagerImpl)HighlightManager.getInstance(myProject)).getHighlighters(editor); if (highlighters.length > 0) { return highlightNextHighlighter(highlighters, editor, editor.getCaretModel().getOffset(), direction == SearchResults.Direction.DOWN, false); } if (direction == SearchResults.Direction.DOWN) { return myFindUsagesManager.findNextUsageInFile(editor); } return myFindUsagesManager.findPreviousUsageInFile(editor); }