Search in sources :

Example 6 with LightRef

use of org.jetbrains.jps.backwardRefs.LightRef in project intellij-community by JetBrains.

the class CompilerReferenceServiceImpl method calculateDirectInheritors.

private Map<VirtualFile, Object[]> calculateDirectInheritors(@NotNull PsiNamedElement aClass, @NotNull GlobalSearchScope useScope, @NotNull FileType searchFileType, @NotNull CompilerHierarchySearchType searchType) {
    final CompilerElementInfo searchElementInfo = asCompilerElements(aClass, false);
    if (searchElementInfo == null)
        return null;
    LightRef searchElement = searchElementInfo.searchElements[0];
    myReadDataLock.lock();
    try {
        if (myReader == null)
            return null;
        try {
            return myReader.getDirectInheritors(searchElement, useScope, myDirtyScopeHolder.getDirtyScope(), searchFileType, searchType);
        } catch (StorageException e) {
            throw new RuntimeException(e);
        }
    } finally {
        myReadDataLock.unlock();
    }
}
Also used : LightRef(org.jetbrains.jps.backwardRefs.LightRef) StorageException(com.intellij.util.indexing.StorageException)

Aggregations

LightRef (org.jetbrains.jps.backwardRefs.LightRef)6 Nullable (org.jetbrains.annotations.Nullable)4 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 StorageException (com.intellij.util.indexing.StorageException)2 TIntHashSet (gnu.trove.TIntHashSet)2 GlobalSearchScope (com.intellij.psi.search.GlobalSearchScope)1 Queue (com.intellij.util.containers.Queue)1 THashSet (gnu.trove.THashSet)1 IOException (java.io.IOException)1 NotNull (org.jetbrains.annotations.NotNull)1