Home » Modeling » UML2 » template expansion
| | | | |
Re: template expansion [message #472215 is a reply to message #472213] |
Tue, 03 April 2007 17:20 |
Rafael Chaves Messages: 362 Registered: July 2009 |
Senior Member |
|
|
James, it seems you misunderstood my comment (I did not ask for any UI
support, for instance). It was just an expansion of my own original post
(that one you understood correctly, as you replied with very relevant
comments). Let me try to rephrase my question.
I understand per your other reply that there is no support for automatic
expansion of templates, but let's ignore that fact for now, as my question
here has more to do with UML practices than with UML2 per se.
I was just trying to make sure I understood what to do if I wanted to
reference elements in a bound element that are actually defined in the
template, should I expand the bound element first (so it has all the
elements defined in the template), or should I just reference the original
element.
Again, in my example:
class Car
class List<T>
operation get(i : Integer) : T
If I wanted to refer to invoke the operation "get" on a List<Car>, should
I just refer to the generic operation as defined in List<T>, or should I
first expand List<Car> as:
class List_Of_Car
operation get(i : Integer) : Car
and then refer to this specific "get" operation instead.
I looked for info on this in the spec but could not find anything.
Thanks
Rafael
James Bruck wrote:
> Rafael,
> There is no menu option to create a new "merged" version of a class with all
> the substitutions applied.
> What does exist is the ability to convert your fully specified UML to ecore
> and vice versa.
> - James.
> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
> news:a374ee74f94d65b1bb16603f9c8cf50c$1@www.eclipse.org...
>> This is my motivation for asking this question: imagine you have the
>> following classes in your model:
>>
>> class Car
>>
>> class List<T>
>> operation get(i : Integer) : T
>>
>> Now consider an activity wants to call get(Integer) on an object whose
>> type is List<Car>. In the CallOperationAction, what would be the operation
>> element referred to? The generic version? Or should the generic get
>> operation be somehow expanded, generating a List<Car> specific operation,
>> and that operation be referred?
>>
|
|
|
Re: template expansion [message #472220 is a reply to message #472215] |
Tue, 03 April 2007 20:47 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Rafael,
The two representations are supposed to be semantically equivalent, but I
would think that it's not generally a good idea to reference the template
representations of things from non-templates...
Kenn
"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:556811df69c76fc7cc955159ea8a7703$1@www.eclipse.org...
> James, it seems you misunderstood my comment (I did not ask for any UI
> support, for instance). It was just an expansion of my own original post
> (that one you understood correctly, as you replied with very relevant
> comments). Let me try to rephrase my question.
>
> I understand per your other reply that there is no support for automatic
> expansion of templates, but let's ignore that fact for now, as my question
> here has more to do with UML practices than with UML2 per se.
>
> I was just trying to make sure I understood what to do if I wanted to
> reference elements in a bound element that are actually defined in the
> template, should I expand the bound element first (so it has all the
> elements defined in the template), or should I just reference the original
> element.
>
> Again, in my example:
>
> class Car
>
> class List<T>
> operation get(i : Integer) : T
>
> If I wanted to refer to invoke the operation "get" on a List<Car>, should
> I just refer to the generic operation as defined in List<T>, or should I
> first expand List<Car> as:
>
> class List_Of_Car
> operation get(i : Integer) : Car
>
> and then refer to this specific "get" operation instead.
>
> I looked for info on this in the spec but could not find anything.
>
> Thanks
>
> Rafael
>
> James Bruck wrote:
>
>> Rafael,
>
>> There is no menu option to create a new "merged" version of a class with
>> all
>> the substitutions applied.
>> What does exist is the ability to convert your fully specified UML to
>> ecore
>> and vice versa.
>
>> - James.
>
>
>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>> news:a374ee74f94d65b1bb16603f9c8cf50c$1@www.eclipse.org...
>>> This is my motivation for asking this question: imagine you have the
>>> following classes in your model:
>>>
>>> class Car
>>>
>>> class List<T>
>>> operation get(i : Integer) : T
>>>
>>> Now consider an activity wants to call get(Integer) on an object whose
>>> type is List<Car>. In the CallOperationAction, what would be the
>>> operation
>>> element referred to? The generic version? Or should the generic get
>>> operation be somehow expanded, generating a List<Car> specific
>>> operation,
>>> and that operation be referred?
>>>
>
>
|
|
|
Re: template expansion [message #472227 is a reply to message #472220] |
Wed, 04 April 2007 19:57 |
Rafael Chaves Messages: 362 Registered: July 2009 |
Senior Member |
|
|
Kenn, so if I understood well, there isn't a single right way.
I guess I agree with your position on the issue of referring to
templates from non-template elements. But at the same time, I feel that
expanding bound elements will lose information that might be useful
later on (for instance, when generating code in a language that supports
parametric types). Unless I am missing something.
I guess what I would really like to see was some way of figuring out the
template binding that generated any given bound element in expanded form
(just annotated bug 180744 with that information).
Rafael
Kenn Hussey wrote:
> Rafael,
>
> The two representations are supposed to be semantically equivalent, but I
> would think that it's not generally a good idea to reference the template
> representations of things from non-templates...
>
> Kenn
>
> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
> news:556811df69c76fc7cc955159ea8a7703$1@www.eclipse.org...
>> James, it seems you misunderstood my comment (I did not ask for any UI
>> support, for instance). It was just an expansion of my own original post
>> (that one you understood correctly, as you replied with very relevant
>> comments). Let me try to rephrase my question.
>>
>> I understand per your other reply that there is no support for automatic
>> expansion of templates, but let's ignore that fact for now, as my question
>> here has more to do with UML practices than with UML2 per se.
>>
>> I was just trying to make sure I understood what to do if I wanted to
>> reference elements in a bound element that are actually defined in the
>> template, should I expand the bound element first (so it has all the
>> elements defined in the template), or should I just reference the original
>> element.
>>
>> Again, in my example:
>>
>> class Car
>>
>> class List<T>
>> operation get(i : Integer) : T
>>
>> If I wanted to refer to invoke the operation "get" on a List<Car>, should
>> I just refer to the generic operation as defined in List<T>, or should I
>> first expand List<Car> as:
>>
>> class List_Of_Car
>> operation get(i : Integer) : Car
>>
>> and then refer to this specific "get" operation instead.
>>
>> I looked for info on this in the spec but could not find anything.
>>
>> Thanks
>>
>> Rafael
>>
>> James Bruck wrote:
>>
>>> Rafael,
>>> There is no menu option to create a new "merged" version of a class with
>>> all
>>> the substitutions applied.
>>> What does exist is the ability to convert your fully specified UML to
>>> ecore
>>> and vice versa.
>>> - James.
>>
>>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>>> news:a374ee74f94d65b1bb16603f9c8cf50c$1@www.eclipse.org...
>>>> This is my motivation for asking this question: imagine you have the
>>>> following classes in your model:
>>>>
>>>> class Car
>>>>
>>>> class List<T>
>>>> operation get(i : Integer) : T
>>>>
>>>> Now consider an activity wants to call get(Integer) on an object whose
>>>> type is List<Car>. In the CallOperationAction, what would be the
>>>> operation
>>>> element referred to? The generic version? Or should the generic get
>>>> operation be somehow expanded, generating a List<Car> specific
>>>> operation,
>>>> and that operation be referred?
>>>>
>>
>
>
|
|
|
Re: template expansion [message #472497 is a reply to message #472227] |
Mon, 09 April 2007 01:09 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Some comments below...
"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:ev0vv0$hie$1@build.eclipse.org...
> Kenn, so if I understood well, there isn't a single right way.
>
> I guess I agree with your position on the issue of referring to
> templates from non-template elements. But at the same time, I feel that
> expanding bound elements will lose information that might be useful later
> on (for instance, when generating code in a language that supports
> parametric types). Unless I am missing something.
>
> I guess what I would really like to see was some way of figuring out the
> template binding that generated any given bound element in expanded form
> (just annotated bug 180744 with that information).
From the above paragraph it seems that... to paraphrase...: Given a bound
element in expanded form, you want to know the template binding that
generated it. Since there are many different ways that an element could
be bound ... ie by either substituting default parameters or via multiple
bindings I'm not sure if there is a definitive way of doing this (although I
have not thought about this in great detail)
This seems to be a little bit different from what you ask for in the bug
detail... "Ideally, on the expanded form, there would be a way of telling
apart things that were defined in the element itself from those coming from
a template binding expansion.". This request seems possible since we could
annotate the expanded model while applying the substitutions.
- James
>
> Rafael
>
> Kenn Hussey wrote:
>> Rafael,
>>
>> The two representations are supposed to be semantically equivalent, but I
>> would think that it's not generally a good idea to reference the template
>> representations of things from non-templates...
>>
>> Kenn
>>
>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>> news:556811df69c76fc7cc955159ea8a7703$1@www.eclipse.org...
>>> James, it seems you misunderstood my comment (I did not ask for any UI
>>> support, for instance). It was just an expansion of my own original post
>>> (that one you understood correctly, as you replied with very relevant
>>> comments). Let me try to rephrase my question.
>>>
>>> I understand per your other reply that there is no support for automatic
>>> expansion of templates, but let's ignore that fact for now, as my
>>> question here has more to do with UML practices than with UML2 per se.
>>>
>>> I was just trying to make sure I understood what to do if I wanted to
>>> reference elements in a bound element that are actually defined in the
>>> template, should I expand the bound element first (so it has all the
>>> elements defined in the template), or should I just reference the
>>> original element.
>>>
>>> Again, in my example:
>>>
>>> class Car
>>>
>>> class List<T>
>>> operation get(i : Integer) : T
>>>
>>> If I wanted to refer to invoke the operation "get" on a List<Car>,
>>> should I just refer to the generic operation as defined in List<T>, or
>>> should I first expand List<Car> as:
>>>
>>> class List_Of_Car
>>> operation get(i : Integer) : Car
>>>
>>> and then refer to this specific "get" operation instead.
>>>
>>> I looked for info on this in the spec but could not find anything.
>>>
>>> Thanks
>>>
>>> Rafael
>>>
>>> James Bruck wrote:
>>>
>>>> Rafael,
>>>> There is no menu option to create a new "merged" version of a class
>>>> with all
>>>> the substitutions applied.
>>>> What does exist is the ability to convert your fully specified UML to
>>>> ecore
>>>> and vice versa.
>>>> - James.
>>>
>>>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>>>> news:a374ee74f94d65b1bb16603f9c8cf50c$1@www.eclipse.org...
>>>>> This is my motivation for asking this question: imagine you have the
>>>>> following classes in your model:
>>>>>
>>>>> class Car
>>>>>
>>>>> class List<T>
>>>>> operation get(i : Integer) : T
>>>>>
>>>>> Now consider an activity wants to call get(Integer) on an object whose
>>>>> type is List<Car>. In the CallOperationAction, what would be the
>>>>> operation
>>>>> element referred to? The generic version? Or should the generic get
>>>>> operation be somehow expanded, generating a List<Car> specific
>>>>> operation,
>>>>> and that operation be referred?
>>>>>
>>>
>>
>>
>
|
|
|
Re: template expansion [message #472498 is a reply to message #472215] |
Mon, 09 April 2007 01:20 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Rafael,
.... I meant additional API that could be exposed through the example UI ..
but I understand that you are requesting support for template expansion...
....I believe Kenn answered your second question about how to refer to
specific "get" operation in the example below....
- James.
"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:556811df69c76fc7cc955159ea8a7703$1@www.eclipse.org...
> James, it seems you misunderstood my comment (I did not ask for any UI
> support, for instance). It was just an expansion of my own original post
> (that one you understood correctly, as you replied with very relevant
> comments). Let me try to rephrase my question.
>
> I understand per your other reply that there is no support for automatic
> expansion of templates, but let's ignore that fact for now, as my question
> here has more to do with UML practices than with UML2 per se.
>
> I was just trying to make sure I understood what to do if I wanted to
> reference elements in a bound element that are actually defined in the
> template, should I expand the bound element first (so it has all the
> elements defined in the template), or should I just reference the original
> element.
>
> Again, in my example:
>
> class Car
>
> class List<T>
> operation get(i : Integer) : T
>
> If I wanted to refer to invoke the operation "get" on a List<Car>, should
> I just refer to the generic operation as defined in List<T>, or should I
> first expand List<Car> as:
>
> class List_Of_Car
> operation get(i : Integer) : Car
>
> and then refer to this specific "get" operation instead.
>
> I looked for info on this in the spec but could not find anything.
>
> Thanks
>
> Rafael
>
> James Bruck wrote:
>
>> Rafael,
>
>> There is no menu option to create a new "merged" version of a class with
>> all
>> the substitutions applied.
>> What does exist is the ability to convert your fully specified UML to
>> ecore
>> and vice versa.
>
>> - James.
>
>
>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>> news:a374ee74f94d65b1bb16603f9c8cf50c$1@www.eclipse.org...
>>> This is my motivation for asking this question: imagine you have the
>>> following classes in your model:
>>>
>>> class Car
>>>
>>> class List<T>
>>> operation get(i : Integer) : T
>>>
>>> Now consider an activity wants to call get(Integer) on an object whose
>>> type is List<Car>. In the CallOperationAction, what would be the
>>> operation
>>> element referred to? The generic version? Or should the generic get
>>> operation be somehow expanded, generating a List<Car> specific
>>> operation,
>>> and that operation be referred?
>>>
>
>
|
|
| | | | |
Re: template expansion [message #605374 is a reply to message #472213] |
Tue, 03 April 2007 17:20 |
Rafael Chaves Messages: 362 Registered: July 2009 |
Senior Member |
|
|
James, it seems you misunderstood my comment (I did not ask for any UI
support, for instance). It was just an expansion of my own original post
(that one you understood correctly, as you replied with very relevant
comments). Let me try to rephrase my question.
I understand per your other reply that there is no support for automatic
expansion of templates, but let's ignore that fact for now, as my question
here has more to do with UML practices than with UML2 per se.
I was just trying to make sure I understood what to do if I wanted to
reference elements in a bound element that are actually defined in the
template, should I expand the bound element first (so it has all the
elements defined in the template), or should I just reference the original
element.
Again, in my example:
class Car
class List<T>
operation get(i : Integer) : T
If I wanted to refer to invoke the operation "get" on a List<Car>, should
I just refer to the generic operation as defined in List<T>, or should I
first expand List<Car> as:
class List_Of_Car
operation get(i : Integer) : Car
and then refer to this specific "get" operation instead.
I looked for info on this in the spec but could not find anything.
Thanks
Rafael
James Bruck wrote:
> Rafael,
> There is no menu option to create a new "merged" version of a class with all
> the substitutions applied.
> What does exist is the ability to convert your fully specified UML to ecore
> and vice versa.
> - James.
> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
> news:a374ee74f94d65b1bb16603f9c8cf50c$1@www.eclipse.org...
>> This is my motivation for asking this question: imagine you have the
>> following classes in your model:
>>
>> class Car
>>
>> class List<T>
>> operation get(i : Integer) : T
>>
>> Now consider an activity wants to call get(Integer) on an object whose
>> type is List<Car>. In the CallOperationAction, what would be the operation
>> element referred to? The generic version? Or should the generic get
>> operation be somehow expanded, generating a List<Car> specific operation,
>> and that operation be referred?
>>
|
|
|
Re: template expansion [message #605398 is a reply to message #472215] |
Tue, 03 April 2007 20:47 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Rafael,
The two representations are supposed to be semantically equivalent, but I
would think that it's not generally a good idea to reference the template
representations of things from non-templates...
Kenn
"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:556811df69c76fc7cc955159ea8a7703$1@www.eclipse.org...
> James, it seems you misunderstood my comment (I did not ask for any UI
> support, for instance). It was just an expansion of my own original post
> (that one you understood correctly, as you replied with very relevant
> comments). Let me try to rephrase my question.
>
> I understand per your other reply that there is no support for automatic
> expansion of templates, but let's ignore that fact for now, as my question
> here has more to do with UML practices than with UML2 per se.
>
> I was just trying to make sure I understood what to do if I wanted to
> reference elements in a bound element that are actually defined in the
> template, should I expand the bound element first (so it has all the
> elements defined in the template), or should I just reference the original
> element.
>
> Again, in my example:
>
> class Car
>
> class List<T>
> operation get(i : Integer) : T
>
> If I wanted to refer to invoke the operation "get" on a List<Car>, should
> I just refer to the generic operation as defined in List<T>, or should I
> first expand List<Car> as:
>
> class List_Of_Car
> operation get(i : Integer) : Car
>
> and then refer to this specific "get" operation instead.
>
> I looked for info on this in the spec but could not find anything.
>
> Thanks
>
> Rafael
>
> James Bruck wrote:
>
>> Rafael,
>
>> There is no menu option to create a new "merged" version of a class with
>> all
>> the substitutions applied.
>> What does exist is the ability to convert your fully specified UML to
>> ecore
>> and vice versa.
>
>> - James.
>
>
>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>> news:a374ee74f94d65b1bb16603f9c8cf50c$1@www.eclipse.org...
>>> This is my motivation for asking this question: imagine you have the
>>> following classes in your model:
>>>
>>> class Car
>>>
>>> class List<T>
>>> operation get(i : Integer) : T
>>>
>>> Now consider an activity wants to call get(Integer) on an object whose
>>> type is List<Car>. In the CallOperationAction, what would be the
>>> operation
>>> element referred to? The generic version? Or should the generic get
>>> operation be somehow expanded, generating a List<Car> specific
>>> operation,
>>> and that operation be referred?
>>>
>
>
|
|
|
Re: template expansion [message #605428 is a reply to message #472220] |
Wed, 04 April 2007 19:57 |
Rafael Chaves Messages: 362 Registered: July 2009 |
Senior Member |
|
|
Kenn, so if I understood well, there isn't a single right way.
I guess I agree with your position on the issue of referring to
templates from non-template elements. But at the same time, I feel that
expanding bound elements will lose information that might be useful
later on (for instance, when generating code in a language that supports
parametric types). Unless I am missing something.
I guess what I would really like to see was some way of figuring out the
template binding that generated any given bound element in expanded form
(just annotated bug 180744 with that information).
Rafael
Kenn Hussey wrote:
> Rafael,
>
> The two representations are supposed to be semantically equivalent, but I
> would think that it's not generally a good idea to reference the template
> representations of things from non-templates...
>
> Kenn
>
> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
> news:556811df69c76fc7cc955159ea8a7703$1@www.eclipse.org...
>> James, it seems you misunderstood my comment (I did not ask for any UI
>> support, for instance). It was just an expansion of my own original post
>> (that one you understood correctly, as you replied with very relevant
>> comments). Let me try to rephrase my question.
>>
>> I understand per your other reply that there is no support for automatic
>> expansion of templates, but let's ignore that fact for now, as my question
>> here has more to do with UML practices than with UML2 per se.
>>
>> I was just trying to make sure I understood what to do if I wanted to
>> reference elements in a bound element that are actually defined in the
>> template, should I expand the bound element first (so it has all the
>> elements defined in the template), or should I just reference the original
>> element.
>>
>> Again, in my example:
>>
>> class Car
>>
>> class List<T>
>> operation get(i : Integer) : T
>>
>> If I wanted to refer to invoke the operation "get" on a List<Car>, should
>> I just refer to the generic operation as defined in List<T>, or should I
>> first expand List<Car> as:
>>
>> class List_Of_Car
>> operation get(i : Integer) : Car
>>
>> and then refer to this specific "get" operation instead.
>>
>> I looked for info on this in the spec but could not find anything.
>>
>> Thanks
>>
>> Rafael
>>
>> James Bruck wrote:
>>
>>> Rafael,
>>> There is no menu option to create a new "merged" version of a class with
>>> all
>>> the substitutions applied.
>>> What does exist is the ability to convert your fully specified UML to
>>> ecore
>>> and vice versa.
>>> - James.
>>
>>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>>> news:a374ee74f94d65b1bb16603f9c8cf50c$1@www.eclipse.org...
>>>> This is my motivation for asking this question: imagine you have the
>>>> following classes in your model:
>>>>
>>>> class Car
>>>>
>>>> class List<T>
>>>> operation get(i : Integer) : T
>>>>
>>>> Now consider an activity wants to call get(Integer) on an object whose
>>>> type is List<Car>. In the CallOperationAction, what would be the
>>>> operation
>>>> element referred to? The generic version? Or should the generic get
>>>> operation be somehow expanded, generating a List<Car> specific
>>>> operation,
>>>> and that operation be referred?
>>>>
>>
>
>
|
|
|
Re: template expansion [message #607421 is a reply to message #472227] |
Mon, 09 April 2007 01:09 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Some comments below...
"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:ev0vv0$hie$1@build.eclipse.org...
> Kenn, so if I understood well, there isn't a single right way.
>
> I guess I agree with your position on the issue of referring to
> templates from non-template elements. But at the same time, I feel that
> expanding bound elements will lose information that might be useful later
> on (for instance, when generating code in a language that supports
> parametric types). Unless I am missing something.
>
> I guess what I would really like to see was some way of figuring out the
> template binding that generated any given bound element in expanded form
> (just annotated bug 180744 with that information).
From the above paragraph it seems that... to paraphrase...: Given a bound
element in expanded form, you want to know the template binding that
generated it. Since there are many different ways that an element could
be bound ... ie by either substituting default parameters or via multiple
bindings I'm not sure if there is a definitive way of doing this (although I
have not thought about this in great detail)
This seems to be a little bit different from what you ask for in the bug
detail... "Ideally, on the expanded form, there would be a way of telling
apart things that were defined in the element itself from those coming from
a template binding expansion.". This request seems possible since we could
annotate the expanded model while applying the substitutions.
- James
>
> Rafael
>
> Kenn Hussey wrote:
>> Rafael,
>>
>> The two representations are supposed to be semantically equivalent, but I
>> would think that it's not generally a good idea to reference the template
>> representations of things from non-templates...
>>
>> Kenn
>>
>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>> news:556811df69c76fc7cc955159ea8a7703$1@www.eclipse.org...
>>> James, it seems you misunderstood my comment (I did not ask for any UI
>>> support, for instance). It was just an expansion of my own original post
>>> (that one you understood correctly, as you replied with very relevant
>>> comments). Let me try to rephrase my question.
>>>
>>> I understand per your other reply that there is no support for automatic
>>> expansion of templates, but let's ignore that fact for now, as my
>>> question here has more to do with UML practices than with UML2 per se.
>>>
>>> I was just trying to make sure I understood what to do if I wanted to
>>> reference elements in a bound element that are actually defined in the
>>> template, should I expand the bound element first (so it has all the
>>> elements defined in the template), or should I just reference the
>>> original element.
>>>
>>> Again, in my example:
>>>
>>> class Car
>>>
>>> class List<T>
>>> operation get(i : Integer) : T
>>>
>>> If I wanted to refer to invoke the operation "get" on a List<Car>,
>>> should I just refer to the generic operation as defined in List<T>, or
>>> should I first expand List<Car> as:
>>>
>>> class List_Of_Car
>>> operation get(i : Integer) : Car
>>>
>>> and then refer to this specific "get" operation instead.
>>>
>>> I looked for info on this in the spec but could not find anything.
>>>
>>> Thanks
>>>
>>> Rafael
>>>
>>> James Bruck wrote:
>>>
>>>> Rafael,
>>>> There is no menu option to create a new "merged" version of a class
>>>> with all
>>>> the substitutions applied.
>>>> What does exist is the ability to convert your fully specified UML to
>>>> ecore
>>>> and vice versa.
>>>> - James.
>>>
>>>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>>>> news:a374ee74f94d65b1bb16603f9c8cf50c$1@www.eclipse.org...
>>>>> This is my motivation for asking this question: imagine you have the
>>>>> following classes in your model:
>>>>>
>>>>> class Car
>>>>>
>>>>> class List<T>
>>>>> operation get(i : Integer) : T
>>>>>
>>>>> Now consider an activity wants to call get(Integer) on an object whose
>>>>> type is List<Car>. In the CallOperationAction, what would be the
>>>>> operation
>>>>> element referred to? The generic version? Or should the generic get
>>>>> operation be somehow expanded, generating a List<Car> specific
>>>>> operation,
>>>>> and that operation be referred?
>>>>>
>>>
>>
>>
>
|
|
|
Re: template expansion [message #607422 is a reply to message #472215] |
Mon, 09 April 2007 01:20 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Rafael,
.... I meant additional API that could be exposed through the example UI ..
but I understand that you are requesting support for template expansion...
....I believe Kenn answered your second question about how to refer to
specific "get" operation in the example below....
- James.
"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:556811df69c76fc7cc955159ea8a7703$1@www.eclipse.org...
> James, it seems you misunderstood my comment (I did not ask for any UI
> support, for instance). It was just an expansion of my own original post
> (that one you understood correctly, as you replied with very relevant
> comments). Let me try to rephrase my question.
>
> I understand per your other reply that there is no support for automatic
> expansion of templates, but let's ignore that fact for now, as my question
> here has more to do with UML practices than with UML2 per se.
>
> I was just trying to make sure I understood what to do if I wanted to
> reference elements in a bound element that are actually defined in the
> template, should I expand the bound element first (so it has all the
> elements defined in the template), or should I just reference the original
> element.
>
> Again, in my example:
>
> class Car
>
> class List<T>
> operation get(i : Integer) : T
>
> If I wanted to refer to invoke the operation "get" on a List<Car>, should
> I just refer to the generic operation as defined in List<T>, or should I
> first expand List<Car> as:
>
> class List_Of_Car
> operation get(i : Integer) : Car
>
> and then refer to this specific "get" operation instead.
>
> I looked for info on this in the spec but could not find anything.
>
> Thanks
>
> Rafael
>
> James Bruck wrote:
>
>> Rafael,
>
>> There is no menu option to create a new "merged" version of a class with
>> all
>> the substitutions applied.
>> What does exist is the ability to convert your fully specified UML to
>> ecore
>> and vice versa.
>
>> - James.
>
>
>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>> news:a374ee74f94d65b1bb16603f9c8cf50c$1@www.eclipse.org...
>>> This is my motivation for asking this question: imagine you have the
>>> following classes in your model:
>>>
>>> class Car
>>>
>>> class List<T>
>>> operation get(i : Integer) : T
>>>
>>> Now consider an activity wants to call get(Integer) on an object whose
>>> type is List<Car>. In the CallOperationAction, what would be the
>>> operation
>>> element referred to? The generic version? Or should the generic get
>>> operation be somehow expanded, generating a List<Car> specific
>>> operation,
>>> and that operation be referred?
>>>
>
>
|
|
|
Goto Forum:
Current Time: Sun Sep 22 12:56:17 GMT 2024
Powered by FUDForum. Page generated in 0.08192 seconds
|