JavaResolveResult (boolean incompleteCode) { PsiFile file = getJavaContextFile(); ResolveCache resolveCache = ResolveCache.getInstance(file.getProject()); return (JavaResolveResult) resolveCache.resolveWithCaching(this, MyResolver.INSTANCE, false, false,file)[0]; }