use of com.intellij.codeInsight.highlighting.HighlightManagerImpl in project intellij-community by JetBrains.
the class FindManagerImpl method findNextUsageInFile.
private boolean findNextUsageInFile(@NotNull FileEditor fileEditor, @NotNull SearchResults.Direction direction) {
if (fileEditor instanceof TextEditor) {
TextEditor textEditor = (TextEditor) fileEditor;
Editor editor = textEditor.getEditor();
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(fileEditor);
}
return myFindUsagesManager.findPreviousUsageInFile(fileEditor);
}
Aggregations