Search in sources :

Example 1 with CompilerReferenceService

use of com.intellij.compiler.CompilerReferenceService in project intellij-community by JetBrains.

the class JavaDirectInheritorsSearcher method performSearchUsingCompilerIndices.

private static CompilerDirectHierarchyInfo performSearchUsingCompilerIndices(@NotNull DirectClassInheritorsSearch.SearchParameters parameters, @NotNull SearchScope useScope, @NotNull Project project) {
    if (!(useScope instanceof GlobalSearchScope))
        return null;
    SearchScope scope = parameters.getScope();
    if (!(scope instanceof GlobalSearchScope))
        return null;
    PsiClass searchClass = ReadAction.compute(() -> (PsiClass) PsiUtil.preferCompiledElement(parameters.getClassToProcess()));
    final CompilerReferenceService compilerReferenceService = CompilerReferenceService.getInstance(project);
    return compilerReferenceService.getDirectInheritors(searchClass, (GlobalSearchScope) useScope, (GlobalSearchScope) scope, JavaFileType.INSTANCE);
}
Also used : GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) SearchScope(com.intellij.psi.search.SearchScope) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) CompilerReferenceService(com.intellij.compiler.CompilerReferenceService)

Aggregations

CompilerReferenceService (com.intellij.compiler.CompilerReferenceService)1 GlobalSearchScope (com.intellij.psi.search.GlobalSearchScope)1 SearchScope (com.intellij.psi.search.SearchScope)1