Search in sources :

Example 1 with CanonicallyNamed

use of org.elixir_lang.psi.call.CanonicallyNamed in project intellij-elixir by KronicDeth.

the class BeamFileImpl method processDeclarations.

/**
     * Passes the declarations contained in this PSI element and its children
     * for processing to the specified scope processor.
     *
     * @param processor  the processor receiving the declarations.
     * @param lastParent the child of this element has been processed during the previous
     *                   step of the tree up walk (declarations under this element do not need
     *                   to be processed again)
     * @param place      the original element from which the tree up walk was initiated.   @return true if the declaration processing should continue or false if it should be stopped.
     */
@Override
public boolean processDeclarations(@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, @Nullable PsiElement lastParent, @NotNull PsiElement place) {
    processor.handleEvent(PsiScopeProcessor.Event.SET_DECLARATION_HOLDER, this);
    final ElementClassHint classHint = processor.getHint(ElementClassHint.KEY);
    boolean keepProcessing = true;
    if (classHint == null || classHint.shouldProcess(ElementClassHint.DeclarationKind.CLASS)) {
        for (CanonicallyNamed modular : modulars()) {
            if (!processor.execute(modular, state)) {
                keepProcessing = false;
                break;
            }
        }
    }
    return keepProcessing;
}
Also used : ElementClassHint(com.intellij.psi.scope.ElementClassHint) CanonicallyNamed(org.elixir_lang.psi.call.CanonicallyNamed)

Aggregations

ElementClassHint (com.intellij.psi.scope.ElementClassHint)1 CanonicallyNamed (org.elixir_lang.psi.call.CanonicallyNamed)1