Search in sources :

Example 1 with ResolveCache

use of com.intellij.psi.impl.source.resolve.ResolveCache in project intellij-community by JetBrains.

the class JavaClassReference method advancedResolve.

@Override
@NotNull
public JavaResolveResult advancedResolve(boolean incompleteCode) {
    PsiFile file = getJavaContextFile();
    final ResolveCache resolveCache = ResolveCache.getInstance(file.getProject());
    return (JavaResolveResult) resolveCache.resolveWithCaching(this, MyResolver.INSTANCE, false, false, file)[0];
}
Also used : ResolveCache(com.intellij.psi.impl.source.resolve.ResolveCache) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with ResolveCache

use of com.intellij.psi.impl.source.resolve.ResolveCache in project intellij-community by JetBrains.

the class PsiImportStaticReferenceElementImpl method multiResolve.

@Override
@NotNull
public JavaResolveResult[] multiResolve(boolean incompleteCode) {
    PsiFile file = getContainingFile();
    final ResolveCache resolveCache = ResolveCache.getInstance(file.getProject());
    final ResolveResult[] results = resolveCache.resolveWithCaching(this, OurGenericsResolver.INSTANCE, true, incompleteCode, file);
    return results instanceof JavaResolveResult[] ? (JavaResolveResult[]) results : JavaResolveResult.EMPTY_ARRAY;
}
Also used : ResolveCache(com.intellij.psi.impl.source.resolve.ResolveCache) NotNull(org.jetbrains.annotations.NotNull)

Example 3 with ResolveCache

use of com.intellij.psi.impl.source.resolve.ResolveCache in project intellij-community by JetBrains.

the class ClsJavaCodeReferenceElementImpl method multiResolve.

@Override
@NotNull
public JavaResolveResult[] multiResolve(boolean incompleteCode) {
    PsiFile file = getContainingFile();
    final ResolveCache resolveCache = ResolveCache.getInstance(file.getProject());
    ResolveResult[] results = resolveCache.resolveWithCaching(this, Resolver.INSTANCE, true, incompleteCode, file);
    if (results.length == 0)
        return JavaResolveResult.EMPTY_ARRAY;
    return (JavaResolveResult[]) results;
}
Also used : ResolveCache(com.intellij.psi.impl.source.resolve.ResolveCache) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

ResolveCache (com.intellij.psi.impl.source.resolve.ResolveCache)3 NotNull (org.jetbrains.annotations.NotNull)3