Use Xtext in Runtime [message #1063891] |
Fri, 14 June 2013 19:36 |
|
Hi,
i try to do following.
Implemented a simple bean grammar.
Used the grammar to generate java code -> Everything fine.
Since the bean xtext models contain more semantic information then the bean.classes does, i would like to provide a metaType-OSGi-service in runtime.
Something like:
MetatypeService {
// accesses the xtext index and returns proper model instance
EObject getMetatype(Class<? extends DTO> clazz);
}
The content of my bundles looks like:
- java-classes for beans.
- all beanmodel files
Now i would like to parse all the bean model files that are contained in any bundle in the OSGi runtime (not IDE), create an IContainer for each and put it into the xtext index. In IDE its simple, since it all works out of the box by the incremental builder.
But in runtime there is no builder.
In Xtext documentation i could read about org.eclipse.xtext.mwe.Reader used by mwe2. Is it the prefered way to run a mwe2 workflow to parse all the xtext files contained in the osgi runtime?
My idea is to use the extender pattern to find all proper bundles and to configure the mwe2 reader on the fly.
Any ideas?
Thanks, Florian
|
|
|
|
Powered by
FUDForum. Page generated in 0.01713 seconds