use of com.intellij.psi.scope.NameHint in project intellij-community by JetBrains.
the class JavaDummyHolder method processDeclarations.
@Override
public boolean processDeclarations(@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, PsiElement lastParent, @NotNull PsiElement place) {
ElementClassHint classHint = processor.getHint(ElementClassHint.KEY);
if (classHint == null || classHint.shouldProcess(ElementClassHint.DeclarationKind.CLASS)) {
final NameHint nameHint = processor.getHint(NameHint.KEY);
final String name = nameHint != null ? nameHint.getName(state) : null;
//"pseudo-imports"
if (name != null) {
PsiClass imported = myPseudoImports.get(name);
if (imported != null) {
if (!processor.execute(imported, state))
return false;
}
} else {
for (PsiClass aClass : myPseudoImports.values()) {
if (!processor.execute(aClass, state))
return false;
}
}
if (getContext() == null) {
if (!JavaResolveUtil.processImplicitlyImportedPackages(processor, state, place, getManager()))
return false;
}
}
return true;
}
Aggregations