|
|
Re: AbstractDeclarativeFormatter 2.0 strange behaviour [message #661822 is a reply to message #661326] |
Mon, 28 March 2011 06:48 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Hi Mark,
yes, subsequent formatting of the very same input should yield unchanged
results. Everything else sounds like a bug to me. Regarding the
precedencies of formatting rules: I cannot provide any insight on this
at the moment, but will come back to that question later. The default
behavior of the declarative formatter is to insert a single space
between two tokens.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 24.03.11 10:32, schrieb Mark Christiaens:
> I've been trying to implement a formatter in Xtext 2.0 but it's not
> behaving well. Some questions:
>
> It's unclear to me what the precendence of FormattingConfig commands is.
> For example. Suppose I tell the formatter to put a newline after a ';'
> keyword. Suppose in addition I tell the formatter to not put a newline
> after a rule that ends with the ';' keyword. What will happen? Will a
> newline appear or not?
> The AbstractDeclarativeFormatter implements some kind of default
> behavior that I can tweak with overriding configureFormatting. What is
> that behavior?
> Is the formatting supposed to be "idempotent" i.e., if I reformat an
> already formatted file, I would expect that nothing happens. In my
> tests, additional new lines continue to appear each time I invoke the
> formatter.
> Regards,
> ---
> Mark Christiaens
> Discover the Future of VHDL Design
> Go to http://www.sigasi.com
|
|
|
|
Powered by
FUDForum. Page generated in 0.02273 seconds