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.
// 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.