|
|
|
Re: [xcore] Two metamodels where one refers to the other [message #884806 is a reply to message #884633] |
Mon, 11 June 2012 21:41 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Hugo,
Yes, references need to use the keyword "refers", "contains", or
"container" and yes, you need to use plugin-in dependencies to be able
to refer to things in other Xcore resources.
On 11/06/2012 4:20 PM, Hugo Garcia wrote:
> On 06/11/2012 02:49 PM, Ed Merks wrote:
>> Hugo,
>>
>> Comments below.
>>
>> On 11/06/2012 2:31 PM, Hugo Garcia wrote:
>>> Hi
>>>
>>> This is the current experiment:
>>>
>>> * Create two metamodels with xcore [MA = Metamodel A, MB = Metamodel
>>> B].
>>> *?? Use classes from MA in MB as types by using the XCore Datatype
>>> mechanism. Is this the proper way to use A in B??
>>>
>>> import metamodelA.Thing
>>>
>>> class Something {
>>> Thingy thingy
>>> }
>>>
>>> type Thingy wraps Thing
>> What's Thing? A data type from the other model? You can use data types
>> Thing directly for attributes, i.e., Thing thingy.
>>>
>>> -H
>
> Not a datatype.
>
> Seems that the solution is using refers like this:
>
> in one xcore project:
>
> --
> package be.kul.thing
>
> class Thing {
> String name
> --
>
> and in the other xcore project that has a dependcy in the manifest to
> the first project:
>
> --
> package be.kul.something
>
> import be.kul.thing.Thing
>
> class Something {
> String name
> refers Thing thing
> }
> --
>
> right?
>
> -H
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03795 seconds