Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Use Xtext in Runtime
Use Xtext in Runtime [message #1063891] Fri, 14 June 2013 19:36 Go to next message
Florian Pirchner is currently offline Florian PirchnerFriend
Messages: 94
Registered: July 2009
Member

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
Re: Use Xtext in Runtime [message #1064200 is a reply to message #1063891] Tue, 18 June 2013 08:45 Go to previous message
Florian Pirchner is currently offline Florian PirchnerFriend
Messages: 94
Registered: July 2009
Member

No ideas on that?

Best Florian
Previous Topic:ImportURI for external files
Next Topic:Cross reference to a cross reference ??
Goto Forum:
  


Current Time: Fri Apr 19 08:51:11 GMT 2024

Powered by FUDForum. Page generated in 0.01713 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top