Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xbase and dynamic meta-models
Xbase and dynamic meta-models [message #743425] Fri, 21 October 2011 13:12 Go to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 42
Registered: July 2009
Member
Hi,

Disclaimer: I am not sure I I have fully understood the Xbase concepts,
so please forgive me, if I ask stupid questions...

I am wondering, how Xbase can be used with a dynamic object model, i.e.
one where I do not have concrete Java classes/interfaces at runtime nor
at design time.

Take the domain model example: If I reference an "Entity" from my
XExpression, how would the type (and thus its features) be determined?
As far as I understand, this is done through the IJvmModelInferrer - but
the example implementation assumes, that there is a "jvmClass" with the
name of the entity and its features available - at least it associates
the model entity to such a class. In a dynamic model (e.g. dynamic EMF,
SDO etc.), such classes do not exist - do I require to do such an
association nonetheless? If so, should I create a "dummy" JvmModel that
reflects the dynamic model (X.getY()) and map this to dynamic accesses
at runtime (X.getY()->Metamodel.getClass("X").getProperty("Y")? Or
should I create the JvmModel with a direct mapping to the dynamic
classes (e.g. Metamodel.getClass("X").getProperty("y"))?

I hope the problem description is about clear - would be happy about
some ideas.

Cheers,
Kai
Re: Xbase and dynamic meta-models [message #743506 is a reply to message #743425] Fri, 21 October 2011 14:38 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Kai,<br>
<br>
Maybe you're interested in what we're doing with we're doing with
Xcore:<br>
<blockquote><a
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=354245">https://bugs.eclipse.org/bugs/show_bug.cgi?id=354245</a><br>
</blockquote>
You can look at the source at github:<br>
<blockquote><a href="https://github.com/merks/Xcore">https://github.com/merks/Xcore</a><br>
</blockquote>
We have the interpreter part working quite nicely.<br>
<br>
<br>
On 21/10/2011 3:12 PM, Kai Kreuzer wrote:
<blockquote cite="mid:j7rqcg$ik2$1@news.eclipse.org" type="cite">Hi,
<br>
<br>
Disclaimer: I am not sure I I have fully understood the Xbase
concepts, so please forgive me, if I ask stupid questions...
<br>
<br>
I am wondering, how Xbase can be used with a dynamic object model,
i.e. one where I do not have concrete Java classes/interfaces at
runtime nor at design time.
<br>
<br>
Take the domain model example: If I reference an "Entity" from my
XExpression, how would the type (and thus its features) be
determined?
<br>
As far as I understand, this is done through the IJvmModelInferrer
- but the example implementation assumes, that there is a
"jvmClass" with the name of the entity and its features available
- at least it associates the model entity to such a class. In a
dynamic model (e.g. dynamic EMF, SDO etc.), such classes do not
exist - do I require to do such an association nonetheless? If so,
should I create a "dummy" JvmModel that reflects the dynamic model
(X.getY()) and map this to dynamic accesses at runtime
(X.getY()-&gt;Metamodel.getClass("X").getProperty("Y")? Or should
I create the JvmModel with a direct mapping to the dynamic classes
(e.g. Metamodel.getClass("X").getProperty("y"))?
<br>
<br>
I hope the problem description is about clear - would be happy
about some ideas.
<br>
<br>
Cheers,
<br>
Kai
<br>
</blockquote>
</body>
</html>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Call the generator from the eclipse application, passing an argument which determines the output tem
Next Topic:XText 1.0.2 - EcoreUtil.copy and ^ escaped not working
Goto Forum:
  


Current Time: Thu Apr 25 08:37:02 GMT 2024

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

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

Back to the top