|
Re: [ATL] Problems using UML2 models [message #74277 is a reply to message #73499] |
Tue, 05 February 2008 10:52  |
Dennis Wagelaar Messages: 147 Registered: July 2009 |
Senior Member |
|
|
Juan M. Vara wrote:
> Hi all,
Hi Juan,
>
> We have found some problems when using UML2 models. This question may be
> better posed in the EMF newsgroup, but I hope someone here has already
> found the same problems and the solutions could help him also.
>
> 1) ATL engine raise an exception when it finds a multivalued
> UML2!Property (upper = *). The solution is to set the upper value to
> ‘-1’. However, any time you change and save the model, the UML2 plug-in
> translates every ‘-1’ to an ‘*’. So, you have to edit textually the UML2
> model and change back every ‘*’ to ‘-1’. Is there any way to avoid this
> behaviour??
I've seen this behaviour of the UML2 plugin as well. It appears that the
UML2 plugin recently started using '*' instead of '-1'. It is still
possible for me to copy LiteralUnlimitedNatural values. I can also still
assign the '-1' value as follows:
observers : UML2!"uml::Property" (
name <- 'observer',
type <- thisModule.Observer,
visibility <- #private,
isUnique <- true,
isOrdered <- true,
upperValue <- observersUpper,
lowerValue <- observersLower),
observersUpper : UML2!"uml::LiteralUnlimitedNatural" (
value <- 0-1),
observersLower : UML2!"uml::LiteralInteger" (
value <- 0),
N.B. You cannot assign values to the 'upper' and 'lower' attributes of a
Property. You must assign to 'lowerValue' and 'upperValue'.
>
> 2)The UML2 metamodel says every Property owns a ‘class’ attribute
> pointing to the UML2!Class that contains the Property. Nevertheless,
> when we try to navigate it in any binding (i.e. p.class), it returns
> oclUndefined. We can solve the problem using OCL
> refImmediateComposite(). Again, is there any way to avoid this??
This works for me, provided that the Property is really owned by a
Class. Some Property elements are owned by an Association.
Cheers,
Dennis
>
> Thanks on advance ...
> Juancho
|
|
|
Powered by
FUDForum. Page generated in 0.01460 seconds