ImplementationSearcher (final boolean searchDeep) { if (ApplicationManager.getApplication().isUnitTestMode()) { return new ImplementationSearcher() { @Override protected PsiElement[] filterElements(PsiElement element, PsiElement[] targetElements) { return PsiImplementationViewSession.filterElements(targetElements); } }; } return new ImplementationSearcher.FirstImplementationsSearcher() { @Override protected PsiElement[] filterElements(PsiElement element, PsiElement[] targetElements) { return PsiImplementationViewSession.filterElements(targetElements); } @Override protected boolean isSearchDeep() { return searchDeep; } }; }