Run the text generation from my editor [message #664854] |
Tue, 12 April 2011 05:37  |
Eclipse User |
|
|
|
Hi all,
I'm abeginner with Xtext and I don't know how to the run the generation process defined in the 'generator' project.
I already defined my grammar and the generation template with Xpand. I already test it in the 'generator' project and it wiorks well.
When I run my projects as Eclipse Application, I can edit files according to my grammar. At this step, I want to run the generation to transform the file I am editing.
I don't know how to do that.
Anyone can help me ?
|
|
|
Re: Run the text generation from my editor [message #664858 is a reply to message #664854] |
Tue, 12 April 2011 06:13   |
Eclipse User |
|
|
|
Hi, in the Eclipse b3 project I wrote several different "runners" that
operate on the file being in the editor (with a console, with a dialog,
parameterized actions defined in extension points, etc). In my case I
execute an interpreter - but should not be difficult to use a similar
setup to run generation.
This info is naturally not worth much if your question is really "how do
I run generation from code?" - I have not done that, so I can't answer.
- henrik
On 4/12/11 11:37 AM, Sam wrote:
> Hi all,
>
> I'm abeginner with Xtext and I don't know how to the run the generation
> process defined in the 'generator' project.
>
> I already defined my grammar and the generation template with Xpand. I
> already test it in the 'generator' project and it wiorks well.
>
> When I run my projects as Eclipse Application, I can edit files
> according to my grammar. At this step, I want to run the generation to
> transform the file I am editing.
>
> I don't know how to do that.
> Anyone can help me ?
|
|
|
|
|
|
|
|
|
|
Re: Run the text generation from my editor [message #665154 is a reply to message #665094] |
Wed, 13 April 2011 08:59  |
Eclipse User |
|
|
|
I can't write the code for you ;-), but can point you to similar things
I have done, and answer concrete questions.
For starters, look at how an Eclipse IncrementalBuilder is done (google
for it). Alternatively, look at how a participant can be registered with
the XtextBuilder.
- henrik
On 4/13/11 11:10 AM, Sam wrote:
> You may be right !!!
>
> But can I do it ? If you can help me out a little it would be great.
>
> Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.27867 seconds