|
Re: How to use Name Expressions [message #477254 is a reply to message #477248] |
Tue, 15 April 2008 15:31 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Hi Felix,
There is a notion of substituting string expressions in the UML spec. but
the UML2 opensource component doesn't support this currently.
To get this to work we would need some facility in the UMLUtil that performs
the "merge" step and substitution of bound parameters to create a new
entity. Right now, we only support exporting UML constructs to an .ecore
representation that can then be used for generically specified code during
code generation.
The last time I looked at this in the spec., the actually string
substitution rules seemed fuzzy (to me at least).
Cheers,
- James.
"Felix Dorner" <felix_do@web.de> wrote in message
news:fu01k8$ufm$1@build.eclipse.org...
> Hey,
>
> I am trying to figure out how to work with name expressions. As a simple
> example, that I already fail to construct, look at the template
> Collection<T> { add(T) }. In bound templates, I'd like "add" to change to
> addA, where A is the name of the actual Parameter in the binding.
> So in Collection<Car> I want the add operation to be called addCar().
>
> Is that a correct use case of the name expression mechanism?
>
> Thanks,
> Felix
|
|
|
|
Re: How to use Name Expressions [message #626411 is a reply to message #477248] |
Tue, 15 April 2008 15:31 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Hi Felix,
There is a notion of substituting string expressions in the UML spec. but
the UML2 opensource component doesn't support this currently.
To get this to work we would need some facility in the UMLUtil that performs
the "merge" step and substitution of bound parameters to create a new
entity. Right now, we only support exporting UML constructs to an .ecore
representation that can then be used for generically specified code during
code generation.
The last time I looked at this in the spec., the actually string
substitution rules seemed fuzzy (to me at least).
Cheers,
- James.
"Felix Dorner" <felix_do@web.de> wrote in message
news:fu01k8$ufm$1@build.eclipse.org...
> Hey,
>
> I am trying to figure out how to work with name expressions. As a simple
> example, that I already fail to construct, look at the template
> Collection<T> { add(T) }. In bound templates, I'd like "add" to change to
> addA, where A is the name of the actual Parameter in the binding.
> So in Collection<Car> I want the add operation to be called addCar().
>
> Is that a correct use case of the name expression mechanism?
>
> Thanks,
> Felix
|
|
|
|
Powered by
FUDForum. Page generated in 0.02003 seconds