use of com.perl5.lang.perl.extensions.PerlImplicitVariablesProvider in project Perl5-IDEA by Camelcade.
the class PerlResolveUtil method processChildren.
public static boolean processChildren(@NotNull PsiElement element, @NotNull PsiScopeProcessor processor, @NotNull ResolveState resolveState, @Nullable PsiElement lastParent, @NotNull PsiElement place) {
PsiElement run = lastParent == null ? element.getLastChild() : lastParent.getPrevSibling();
while (run != null) {
ProgressManager.checkCanceled();
if (run instanceof PerlCompositeElement && // fixme this should be in composite
!(run instanceof PerlLexicalScope) && !run.processDeclarations(processor, resolveState, null, place)) {
return false;
}
run = run.getPrevSibling();
}
// checking implicit variables fixme: decide, move processchildren to here or move this one to processDeclarations?
if (element instanceof PerlImplicitVariablesProvider) {
for (PerlVariableDeclarationElement wrapper : ((PerlImplicitVariablesProvider) element).getImplicitVariables()) {
ProgressManager.checkCanceled();
if (!processor.execute(wrapper, resolveState)) {
return false;
}
}
}
return true;
}
Aggregations