use of com.intellij.find.findUsages.FindUsagesOptions in project intellij-plugins by JetBrains.
the class DartServerFindUsagesTest method findUsages.
@NotNull
private Collection<UsageInfo> findUsages(@NotNull final SearchScope scope) {
final PsiElement elementToSearch = getFile().findElementAt(getEditor().getCaretModel().getOffset());
assertNotNull(elementToSearch);
final FindUsagesManager manager = ((FindManagerImpl) FindManager.getInstance(getProject())).getFindUsagesManager();
final FindUsagesHandler handler = manager.getFindUsagesHandler(elementToSearch, false);
assertInstanceOf(handler, DartServerFindUsagesHandler.class);
final CommonProcessors.CollectProcessor<UsageInfo> processor = new CommonProcessors.CollectProcessor<>();
handler.processElementUsages(elementToSearch, processor, new FindUsagesOptions(scope));
return processor.getResults();
}
Aggregations