MarkusGerhart / spray

Automatically exported from code.google.com/p/spray
0 stars 0 forks source link

Improve formatter for the Spray DSL #72

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
the initial org.eclipselabs.spray.xtext.formatting.SprayFormatter wraps not all 
lines correctly

Original issue reported on code.google.com by de.abg.r...@gmail.com on 10 Nov 2011 at 4:20

GoogleCodeExporter commented 8 years ago

Original comment by de.abg.r...@gmail.com on 14 Nov 2011 at 8:37

GoogleCodeExporter commented 8 years ago
made my changes, so CTLR + SHFT + F should produce an acceptable output.

I am still undecided, how to handle the layout properties section, maybe we 
should introduce commas, to make it more readable

version 1: current version with spaces before and after =, the properties 
cannot be distingished so good
( color = dark_green fill = dark_blue )

version 2: version without spaces before and after =, might be to narrow
( color=dark_green fill=dark_blue )

version 1: current version with spaces before and after = and two spaces 
between properties, so the properties cant be distingished better, 
unfortunately I did not get the formatter to do that
( color = dark_green  fill = dark_blue )

Original comment by de.abg.r...@gmail.com on 15 Nov 2011 at 1:17

GoogleCodeExporter commented 8 years ago
When inserting a block expression for a text element, the expression should be 
rendered in one line. Usually these expressions should not necessarily be that 
complex.

fromText text ( ) { fromCardinality};

-> formatted:
fromText text ( ) {
    fromCardinality
};

Original comment by karsten....@googlemail.com on 16 Nov 2011 at 2:26

GoogleCodeExporter commented 8 years ago
The formatter has already been improved a lot. Can we close this one for now 
and reopen it when we have concrete issues of the formatter?

Original comment by karsten....@googlemail.com on 29 Mar 2012 at 1:50

GoogleCodeExporter commented 8 years ago
We can close it, I had not found a solution, how to do formatting dependent on 
the use context of the rule, but when you have already fix it, we can close it.

Original comment by de.abg.r...@gmail.com on 29 Mar 2012 at 8:14