List<ImplementationViewElement> (@NotNull ProgressIndicator indicator, @NotNull final Processor<? super ImplementationViewElement> processor) { final ImplementationSearcher.BackgroundableImplementationSearcher implementationSearcher = new ImplementationSearcher.BackgroundableImplementationSearcher() { @Override protected boolean isSearchDeep() { return myIsSearchDeep; } @Override protected void processElement(PsiElement element) { if (!processor.process(new PsiImplementationViewElement(element))) { indicator.cancel(); } indicator.checkCanceled(); } @Override protected PsiElement[] filterElements(PsiElement element, PsiElement[] targetElements) { return PsiImplementationViewSession.filterElements(targetElements); } }; PsiElement[] psiElements; if (!myAlwaysIncludeSelf) { psiElements = getSelfAndImplementations(myEditor, myElement, implementationSearcher, false); } else { psiElements = getSelfAndImplementations(myEditor, myElement, implementationSearcher); } return ContainerUtil.map(psiElements, PsiImplementationViewElement::new); }