// DefinitionArgument returns pp::DefinitionArgument
// : argName = UNION_VARIABLE_OR_NAME ((op = '=' | op = '=>') value = AssignmentExpression)?
// ;
final DefinitionArgumentListElements access = grammarAccess.getDefinitionArgumentListAccess();
while(itor.hasNext()) {
IDomNode n = itor.next();
EObject ge = n.getGrammarElement();
if(ge == access.getLeftParenthesisKeyword_1()) {
IDomNode nextLeaf = DomModelUtils.nextLeaf(n);
if(DomModelUtils.isWhitespace(nextLeaf))
if(breakAndAlign)
nextLeaf.getStyles().add(StyleSet.withStyles(styles.oneLineBreak(), styles.indent()));
else
nextLeaf.getStyles().add(StyleSet.withStyles(styles.indent()));
}
else if(ge == access.getRightParenthesisKeyword_4()) {
IDomNode prevLeaf = DomModelUtils.previousLeaf(n);
if(DomModelUtils.isWhitespace(prevLeaf))
prevLeaf.getStyles().add(StyleSet.withStyles(styles.dedent()));
}
else if(breakAndAlign) {
if(ge == access.getCommaKeyword_2_1_0()) {
IDomNode nextLeaf = DomModelUtils.nextLeaf(n);
if(DomModelUtils.isWhitespace(nextLeaf))
nextLeaf.getStyles().add(StyleSet.withStyles(styles.oneLineBreak()));
}
// Break on endcomma does not look good - here is how it would be done though...
// else if(ge == grammarAccess.getDefinitionArgumentListAccess().getEndCommaParserRuleCall_3()) {
// IDomNode spaceAfterEndComma = DomModelUtils.nextLeaf(DomModelUtils.firstTokenWithText(n));
// if(DomModelUtils.isWhitespace(spaceAfterEndComma))