Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Import and JvmModel inference
Import and JvmModel inference [message #699486] Thu, 21 July 2011 15:55
Eclipse UserFriend
Originally posted by:


I'm working on improving XBase' support for Ecore. As a start, I've
implemented a prototype IJvmModelInferrer from EPackage/EClass to
JvmDeclaredType. This means that references to EClassifiers in my model
will be treated as references to (fake) Jvm types, as if I had generated
Java code for the EClassifiers. It seems to work within a model, but it
does not work for imported elements. E.g. if I import an Ecore package
(from an .ecore file in the same project), I can link to its
EClassifiers in rule assigmnents using [ecore::EClassifier], but not
ones using [types::JvmDeclaredType] or JvmTypeReference.

The documentation states that the elements in your xtext model (for
which you implement an IJvmModelInferrer) will be available for other
models, but it seems this does not hold in general for indexed resources
that are imported. It may not be surprising, since the cost of inferring
elements for all potentially imported objects may be very big. However,
if you could assume that the qualified names of the inferred Jvm
elements matched those of the original model element, you could do the
inference after finding a matching a non-Jvm element.

Now I wonder what to do in my case. E.g. there may be a way of making
the objects that generate IResourceDescription and/or
IEObjectDescription also generate descriptions for inferred Jvm
elements. Suggestions?

Previous Topic:Is Xtext itself built by Xtext?
Next Topic:Combining data structure with a markup format
Goto Forum:

Current Time: Wed Apr 21 22:02:41 GMT 2021

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

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

Back to the top