Refactoring UML!Property [message #556668] |
Thu, 02 September 2010 05:37  |
Eclipse User |
|
|
|
Hi,
I work on a UML to UML transformation and I'd like to know if there's a way to copy classes' ownedAttributes?
I saw in UMLCopy something like:
from f: UML!Class
to t:UML!Class(
ownedAttribute <- f.ownedAttribute
)
But when I tried it, that does not work:
Cannot set feature ownedAttribute to value ... , containment references cannot span across models.
If I'm right, it's due to UML!Property.class value, but I can't change it and I don't know how to create a instance of UML!Property and then fill it with values of the source item.
Maybe it's because I think in OO concepts ...
I tried something like :
from f: UML!Class
to t:UML!Class(
name<- f.name
),
tmp: UML!Property
do{
for (e in d.ownedAttribute){
tmp = UML!Property.newInstance();
tmp.name <- e.name;
t.ownedAttribute<-t.ownedAttribute->append(tmp);
}
}
But Property instances are not included in the class.
Thanks for your help and advices
[Updated on: Thu, 02 September 2010 05:48] by Moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 1.37556 seconds