Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xcore as metamodel for Xtext Grammar(Xcore as metamodel for Xtext Grammar)
icon5.gif  Xcore as metamodel for Xtext Grammar [message #1158765] Mon, 28 October 2013 04:56 Go to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hello all,
I am using XCORE as metamodel for my xtext grammar. I am actually not that clear with some of the keywords available in xcore.

Say I have defined one class in xcore:

class sample {
......
......
}

and in other class I make use of this:

class sample2 {
contains sample s1
}

My question is what is the difference between "contains sample s1" and "contains resolving sample s1" ??

Thanks in advance Smile


Arshad
Re: Xcore as metamodel for Xtext Grammar [message #1159488 is a reply to message #1158765] Mon, 28 October 2013 15:18 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Arshad,

Ecore allows for cross resource containment, but only if
EReference.isProxyResolving is true and the GenModel has Containment
Proxies set to true (because this supported as added later in EMF's
evolution and we didn't want existing models to suddenly support some
new things unless that's what the client really wants). With Xcore the
GenModel has Containment Proxies true by default, and if you want
containment references that allow the contained children to be in the
root of another resource, you have to include the "resolving" keyword.


On 28/10/2013 5:56 AM, Arshad Adavani wrote:
> Hello all,
> I am using XCORE as metamodel for my xtext grammar. I am actually not
> that clear with some of the keywords available in xcore.
>
> Say I have defined one class in xcore:
>
> class sample {
> .....
> .....
> }
>
> and in other class I make use of this:
>
> class sample2 {
> contains sample s1
> }
>
> My question is what is the difference between "contains sample s1" and
> "contains resolving sample s1" ??
>
> Thanks in advance :)


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Interpreter for xtext
Next Topic:Using Xtext as a language translator
Goto Forum:
  


Current Time: Fri Apr 26 22:40:38 GMT 2024

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

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

Back to the top