|
Re: Handwritten formatter? [message #759637 is a reply to message #759440] |
Tue, 29 November 2011 12:27 |
Henrik Lindberg Messages: 2509 Registered: July 2009 |
Senior Member |
|
|
I looked at code, and googled for info on the topic.
This message thread:
http://dev.eclipse.org/mhonarc/lists/xtext-dev/msg00888.html and the
issue that was logged as a result of that discussion:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=313289
The thread talks about the ParseTreeConstructor, and the complication
that when it calls the formatter, there is no node model. (The issue
also mentions this, and some other cases where there is no associated
node model).
I am wondering what you think regarding the evolution of the formatter.
Is it likely to stay more or less as it is, with the addition of also
passing the current semantic object through the pipeline, or do you see
it radically changing?
- henrik
On 2011-28-11 17:57, Henrik Lindberg wrote:
> Hi,
> I have a couple of requirements in the formatter for Geppetto that makes
> me think I am best served by writing a formatter from scratch.
>
> I want to be able to modify the formatting rules via preferences, and
> the formatter needs to make decisions based on the length of lists, and
> in some cases, the actual values of things.
>
> Has someone implemented something similar somewhere that I could take a
> peek at?
>
> Any other general advice? The IFormatter interface looks suspiciously
> simple :)
>
> Regards
> - henrik
|
|
|
Re: Handwritten formatter? [message #760088 is a reply to message #759637] |
Thu, 01 December 2011 09:42 |
Moritz Eysholdt Messages: 161 Registered: July 2009 Location: Kiel, Germany |
Senior Member |
|
|
Hi Henrik,
I'm hoping to reimplement the formatter soon, but so far other things
had a higher priority. It's bothering us, too, the that old formatter
isn't powerful enough to handle the Xtend language.
A new formatter would have access to the node model, the semantic model
and would not be restricted to the old formatters "rule engine".
Furthermore, it would work with the new serializer, since the
ParseTreeConstructor is about to be phased out.
regards,
Moritz
On 29.11.11 13:27, Henrik Lindberg wrote:
> I looked at code, and googled for info on the topic.
>
> This message thread:
> http://dev.eclipse.org/mhonarc/lists/xtext-dev/msg00888.html and the
> issue that was logged as a result of that discussion:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=313289
>
> The thread talks about the ParseTreeConstructor, and the complication
> that when it calls the formatter, there is no node model. (The issue
> also mentions this, and some other cases where there is no associated
> node model).
>
> I am wondering what you think regarding the evolution of the formatter.
> Is it likely to stay more or less as it is, with the addition of also
> passing the current semantic object through the pipeline, or do you see
> it radically changing?
>
> - henrik
>
> On 2011-28-11 17:57, Henrik Lindberg wrote:
>> Hi,
>> I have a couple of requirements in the formatter for Geppetto that makes
>> me think I am best served by writing a formatter from scratch.
>>
>> I want to be able to modify the formatting rules via preferences, and
>> the formatter needs to make decisions based on the length of lists, and
>> in some cases, the actual values of things.
>>
>> Has someone implemented something similar somewhere that I could take a
>> peek at?
>>
>> Any other general advice? The IFormatter interface looks suspiciously
>> simple :)
>>
>> Regards
>> - henrik
>
|
|
|
Powered by
FUDForum. Page generated in 0.03654 seconds