Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] [snipmatch] headless API for generating code snippets?

On 30.08.2013, at 18:23, Andreas Sewe <andreas.sewe@xxxxxxxxxxxxxx> wrote:

> Don't you get some pretty-printing / auto-formating for your DSL for
> free? You might be able to use the pretty printer to produce the desired
> output.


I have not done this before, but the basic idea seems to be to pass the EObjects to an Xtext Serializer, see [1] for the general documentation and [2] for an example.

Cheers,
Fabian

[1] http://www.eclipse.org/Xtext/documentation.html#serialization
[2] http://stackoverflow.com/a/12302496/18154

Back to the top