use of org.eclipse.jdt.core.dom.ChildListPropertyDescriptor in project xtext-xtend by eclipse.
the class ASTFlattenerUtils method genericChildListProperty.
public List<ASTNode> genericChildListProperty(final ASTNode node, final String propertyName) {
final Function1<ChildListPropertyDescriptor, Boolean> _function = (ChildListPropertyDescriptor it) -> {
String _id = it.getId();
return Boolean.valueOf(Objects.equal(propertyName, _id));
};
final ChildListPropertyDescriptor property = IterableExtensions.<ChildListPropertyDescriptor>head(IterableExtensions.<ChildListPropertyDescriptor>filter(Iterables.<ChildListPropertyDescriptor>filter(node.structuralPropertiesForType(), ChildListPropertyDescriptor.class), _function));
if ((property != null)) {
Object _structuralProperty = node.getStructuralProperty(property);
return ((List<ASTNode>) _structuralProperty);
}
return null;
}
Aggregations