JavaResolveResult (boolean incompleteCode) { final PsiElement resolved = resolve(); if (resolved == null) { return JavaResolveResult.EMPTY; } PsiSubstitutor substitutor = mySubstitutor; if (substitutor == null) { if (resolved instanceof PsiClass) { substitutor = JavaPsiFacade.getElementFactory(myManager.getProject()).createRawSubstitutor((PsiClass) resolved); } else { substitutor = PsiSubstitutor.EMPTY; } } return new CandidateInfo(resolved, substitutor); }