Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Re: [TCS] Referencing
Re: [TCS] Referencing [message #14703] Thu, 29 May 2008 14:57 Go to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------080301000608030007040407
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Jose,

Please use the TMF newsgroup for TCS questions. I've added it to the
"to" list of the reply.

Freddy.

Jose E. Rivera a
Re: [TCS] Referencing [message #14733 is a reply to message #14703] Fri, 30 May 2008 05:05 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jose,

I am not sure to understand what you mean. Could you please give a code
example following your TCS specification the way you would like it to work?

Thanks,

Frédéric Jouault

Freddy Allilaire a écrit :
> Hi Jose,
>
> Please use the TMF newsgroup for TCS questions. I've added it to the
> "to" list of the reply.
>
> Freddy.
>
> Jose E. Rivera a écrit :
>> Hi all,
>>
>> I'm using TCS and I need to serialize elements with complex
>> references. Not to complicate it more with my metamodel, I would
>> introduce what I want to do with the KM3 metamodel example.
>>
>> Suppose that when serializing a KM3 reference, I would like to print
>> all the names of its containing class supertypes. I would like to do
>> something like that(last line):
>>
>> template Reference addToContext:
>> "reference" name $multiplicity (isContainer? "container")
>> ":" type{refersTo= name, autoCreate= never}
>> (isDefined(opposite) ? "oppositeOf" opposite{refersTo= name, lookIn=
>> type, autoCreate= never})
>> owner.superTypes{refersTo = name, separator = ","} ";";
>>
>> But TCS does not allow me (i can not use the dot (owner.superTypes) as
>> I expected). Is there any way to handle it?
>>
>> Thanks in advance,
>> Jose E. Rivera
>
Re: [TCS] Referencing [message #14763 is a reply to message #14733] Mon, 02 June 2008 07:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rivera.lcc.uma.es

Hi,

For example, given the KM3 metamodel as well (class "Reference"), I
would like to produce something like:

class Reference extends StructuralFeature {
attribute isContainer : Boolean;
reference opposite[0-1] : Reference StructuralFeature;
}

Note "StructuralFeature" printed at the end of the reference "opposite".
I would need to access from a "Reference" to the supertypes of its owner...
I would like to write in TCS something like:
owner.supertypes{refersTo = name, separator = ","} ";";
(In the example there is only one supertype) Is there any way to do it?

Yhank you very much,
Jose

Frédéric Jouault escribió:
> Hi Jose,
>
> I am not sure to understand what you mean. Could you please give a code
> example following your TCS specification the way you would like it to work?
>
> Thanks,
>
> Frédéric Jouault
>
> Freddy Allilaire a écrit :
>> Hi Jose,
>>
>> Please use the TMF newsgroup for TCS questions. I've added it to the
>> "to" list of the reply.
>>
>> Freddy.
>>
>> Jose E. Rivera a écrit :
>>> Hi all,
>>>
>>> I'm using TCS and I need to serialize elements with complex
>>> references. Not to complicate it more with my metamodel, I would
>>> introduce what I want to do with the KM3 metamodel example.
>>>
>>> Suppose that when serializing a KM3 reference, I would like to print
>>> all the names of its containing class supertypes. I would like to do
>>> something like that(last line):
>>>
>>> template Reference addToContext:
>>> "reference" name $multiplicity (isContainer? "container")
>>> ":" type{refersTo= name, autoCreate= never}
>>> (isDefined(opposite) ? "oppositeOf" opposite{refersTo= name,
>>> lookIn= type, autoCreate= never})
>>> owner.superTypes{refersTo = name, separator = ","} ";";
>>>
>>> But TCS does not allow me (i can not use the dot (owner.superTypes)
>>> as I expected). Is there any way to handle it?
>>>
>>> Thanks in advance,
>>> Jose E. Rivera
>>
Re: [TCS] Referencing [message #14853 is a reply to message #14763] Fri, 13 June 2008 10:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rivera.lcc.uma.es

Hi,

since I have got no answer, can I assume that TCS does not allow to do
these kind of things?

Regards,
Jose E. Rivera

Jose E. Rivera escribió:
> Hi,
>
> For example, given the KM3 metamodel as well (class "Reference"), I
> would like to produce something like:
>
> class Reference extends StructuralFeature {
> attribute isContainer : Boolean;
> reference opposite[0-1] : Reference StructuralFeature;
> }
>
> Note "StructuralFeature" printed at the end of the reference "opposite".
> I would need to access from a "Reference" to the supertypes of its owner...
> I would like to write in TCS something like:
> owner.supertypes{refersTo = name, separator = ","} ";";
> (In the example there is only one supertype) Is there any way to do it?
>
> Yhank you very much,
> Jose
>
> Frédéric Jouault escribió:
>> Hi Jose,
>>
>> I am not sure to understand what you mean. Could you please give a
>> code example following your TCS specification the way you would like
>> it to work?
>>
>> Thanks,
>>
>> Frédéric Jouault
>>
>> Freddy Allilaire a écrit :
>>> Hi Jose,
>>>
>>> Please use the TMF newsgroup for TCS questions. I've added it to the
>>> "to" list of the reply.
>>>
>>> Freddy.
>>>
>>> Jose E. Rivera a écrit :
>>>> Hi all,
>>>>
>>>> I'm using TCS and I need to serialize elements with complex
>>>> references. Not to complicate it more with my metamodel, I would
>>>> introduce what I want to do with the KM3 metamodel example.
>>>>
>>>> Suppose that when serializing a KM3 reference, I would like to print
>>>> all the names of its containing class supertypes. I would like to do
>>>> something like that(last line):
>>>>
>>>> template Reference addToContext:
>>>> "reference" name $multiplicity (isContainer? "container")
>>>> ":" type{refersTo= name, autoCreate= never}
>>>> (isDefined(opposite) ? "oppositeOf" opposite{refersTo= name,
>>>> lookIn= type, autoCreate= never})
>>>> owner.superTypes{refersTo = name, separator = ","} ";";
>>>>
>>>> But TCS does not allow me (i can not use the dot (owner.superTypes)
>>>> as I expected). Is there any way to handle it?
>>>>
>>>> Thanks in advance,
>>>> Jose E. Rivera
>>>
Re: [TCS] Referencing [message #16481 is a reply to message #14763] Wed, 09 July 2008 10:39 Go to previous message
Eclipse UserFriend
Hi,

When you put StructuralFeature after Reference you are duplicating
information that is already in the definition of Reference.

What would you want to happen: 1) redefinition of the supertypes of
Reference, or 2) comparison of both definitions that generates an error
if they are inconsistent?


I must admit that I do not understand the point of your example. An
actual example may help me to understand what you want to do.


In any case, a simple work-around is to parse with a slightly modified
metamodel (with the corresponding structure), then use model
transformation to get to your actual metamodel.


Regards,

Frédéric Jouault


Jose E. Rivera a écrit :
> Hi,
>
> For example, given the KM3 metamodel as well (class "Reference"), I
> would like to produce something like:
>
> class Reference extends StructuralFeature {
> attribute isContainer : Boolean;
> reference opposite[0-1] : Reference StructuralFeature;
> }
>
> Note "StructuralFeature" printed at the end of the reference "opposite".
> I would need to access from a "Reference" to the supertypes of its owner...
> I would like to write in TCS something like:
> owner.supertypes{refersTo = name, separator = ","} ";";
> (In the example there is only one supertype) Is there any way to do it?
>
> Yhank you very much,
> Jose
>
> Frédéric Jouault escribió:
>> Hi Jose,
>>
>> I am not sure to understand what you mean. Could you please give a
>> code example following your TCS specification the way you would like
>> it to work?
>>
>> Thanks,
>>
>> Frédéric Jouault
>>
>> Freddy Allilaire a écrit :
>>> Hi Jose,
>>>
>>> Please use the TMF newsgroup for TCS questions. I've added it to the
>>> "to" list of the reply.
>>>
>>> Freddy.
>>>
>>> Jose E. Rivera a écrit :
>>>> Hi all,
>>>>
>>>> I'm using TCS and I need to serialize elements with complex
>>>> references. Not to complicate it more with my metamodel, I would
>>>> introduce what I want to do with the KM3 metamodel example.
>>>>
>>>> Suppose that when serializing a KM3 reference, I would like to print
>>>> all the names of its containing class supertypes. I would like to do
>>>> something like that(last line):
>>>>
>>>> template Reference addToContext:
>>>> "reference" name $multiplicity (isContainer? "container")
>>>> ":" type{refersTo= name, autoCreate= never}
>>>> (isDefined(opposite) ? "oppositeOf" opposite{refersTo= name,
>>>> lookIn= type, autoCreate= never})
>>>> owner.superTypes{refersTo = name, separator = ","} ";";
>>>>
>>>> But TCS does not allow me (i can not use the dot (owner.superTypes)
>>>> as I expected). Is there any way to handle it?
>>>>
>>>> Thanks in advance,
>>>> Jose E. Rivera
>>>
Previous Topic:fighting vertical silos
Next Topic:SPL sample context for LocalFunctionDeclarations
Goto Forum:
  


Current Time: Wed Jul 02 01:22:02 EDT 2025

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

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

Back to the top