Community
Participate
Working Groups
Build Identifier: Version: 3.7.1 Build id: M20110909-1335 In my grammar I have a rule like so: [code] Exp : k=ID '->' v=ID [/code] I want to implement my formatter to achieve the following: [code] aaa -> bbb ccc -> ddd eee -> fff [/code] Since there is no keyword after the second ID, in my formatter I tried something like the following: [code] c.setLinewrap().before(f.getExpRule()); Assignment k = f.getExpAccess().getVAssignment_0_2(); c.setLinewrap().before(k); c.setIndentationIncrement().before(k); c.setLinewrap().after(k); c.setIndentationDecrement().after(k); [/code] While the "before" rules seem to work fine, the "after" rules do not seem to work on [font=Courier]Assignment[/font] objects. Thus my indentation is never decremented and I end up with the following: [code] aaa -> bbb ccc -> ddd eee -> fff [/code] Reproducible: Always Steps to Reproduce: 1. As description above
Build id: 4.3.2.M20140221-1700 I can confirm this behavior for Xtext SDK 2.5.4.v201404100756. The proposed solution (http://www.eclipse.org/forums/index.php/mv/msg/279480/783780/#msg_783780) to use the respective rule call element of the assignment instead of the assignment element has no effect.
won't fix because it affects the old formatter infrastructure