void (PsiScopeProcessor processor, PsiElement position) { ElementClassHint hint = processor.getHint(ElementClassHint.KEY); if (position == null) return; if (hint == null || hint.shouldProcess(ElementClassHint.DeclarationKind.PACKAGE) || hint.shouldProcess(ElementClassHint.DeclarationKind.CLASS)) { List<PsiPackage> cachedPackages = getDefaultPackages(position.getProject()); for (PsiElement psiPackage : cachedPackages) { if (!processor.execute(psiPackage, ResolveState.initial())) return; } } }