extending generator's method in runtime [message #805141] |
Thu, 23 February 2012 06:34  |
Eclipse User |
|
|
|
Hello,
I am wondering, if it would be possible to extend generator in the runtime.
It means following:
Imagine simple grammar, where only entities are states and transitions.
Many states and transitions can be present in the project and every state can be reached by many ways from other states using some transition. It is no problem to write generator, which covers all transitions.
The problem is, that I need to allow developers to choose in each project different algorithm. E.g. sometimes I might want to generate the code only for transitions, which are targeting to state, which was not reached before. Other example, somebody might want to choose 20% of transitions randomly.
Because of this, I would need to specify algorithm for choosing transitions in the project. (There might be some default behavior implemented, but I need to be able to override it, e.g. in file with specified name in the project.)
Is there any way how to do this - i.e. change plugin's behavior during application run?
Thank you & Best regards,
Michal
|
|
|
Re: extending generator's method in runtime [message #805321 is a reply to message #805141] |
Thu, 23 February 2012 11:29  |
Eclipse User |
|
|
|
The short answer: You have to build custom UI for this.
Am 23.02.12 12:34, schrieb Michal S:
> Hello,
> I am wondering, if it would be possible to extend generator in the runtime.
>
> It means following:
> Imagine simple grammar, where only entities are states and transitions.
> Many states and transitions can be present in the project and every
> state can be reached by many ways from other states using some
> transition. It is no problem to write generator, which covers all
> transitions. The problem is, that I need to allow developers to choose
> in each project different algorithm. E.g. sometimes I might want to
> generate the code only for transitions, which are targeting to state,
> which was not reached before. Other example, somebody might want to
> choose 20% of transitions randomly.
>
> Because of this, I would need to specify algorithm for choosing
> transitions in the project. (There might be some default behavior
> implemented, but I need to be able to override it, e.g. in file with
> specified name in the project.)
>
> Is there any way how to do this - i.e. change plugin's behavior during
> application run?
> Thank you & Best regards,
> Michal
>
>
>
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
|
|
|
Powered by
FUDForum. Page generated in 0.03249 seconds