use of com.perl5.lang.htmlmason.parser.psi.HTMLMasonBlock in project Perl5-IDEA by Camelcade.
the class HTMLMasonStubBasedNamedElementImpl method getArgsBlocks.
@NotNull
public List<HTMLMasonCompositeElement> getArgsBlocks() {
StubElement rootStub = getStub();
// noinspection Duplicates duplicates file implementation
if (rootStub != null) {
final List<HTMLMasonCompositeElement> result = new ArrayList<>();
PerlPsiUtil.processElementsFromStubs(rootStub, psi -> {
if (psi instanceof HTMLMasonArgsBlock) {
result.add(((HTMLMasonArgsBlock) psi));
}
return true;
}, HTMLMasonNamedElement.class);
return result;
}
HTMLMasonBlock block = PsiTreeUtil.getChildOfType(this, HTMLMasonBlock.class);
if (block != null) {
return block.getArgsBlocks();
}
return Collections.emptyList();
}
Aggregations