Import and JvmModel inference [message #699486] |
Thu, 21 July 2011 15:55 |
Eclipse User |
|
|
|
Originally posted by:
Hi,
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?
Hallvard
|
|
|
Powered by
FUDForum. Page generated in 0.02548 seconds