|extending generator's method in runtime [message #805141]
||Thu, 23 February 2012 06:34
| Michal S
Registered: July 2011
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,