[ATL] How can I set namespace of classes in uml2 [message #81572] |
Sun, 18 May 2008 23:25 |
Eclipse User |
|
|
|
Hi people!
I have to migrate few atl transformations that uses uml1.4 to uml2.
I`m using version 1.1.1 of uml2 jar.
My original transformation is that:
rule MergeClass {
from s : UML2!Class (
if thisModule.inElements->includes(s) then
s.oclIsTypeOf(UML2!Class)
else
if thisModule.allMergeElements(s) and s.isValid() then
s.oclIsTypeOf(UML2!Class)
else
false
endif
endif
)
to t : UML2!Class mapsTo s (
isRoot <- s.isRoot,
isActive <- s.isActive,
isAbstract <- s.isAbstract,
visibility <- s.visibility,
name <- s.name,
isSpecification <- s.isSpecification,
isLeaf <- s.isLeaf,
comment <- s.comment,
constraint <- s.constraint,
namespace <-if thisModule.allMergeElements(s.namespace) --THIS IS MY
PROBLEM
then s.namespace
else s.namespace.fromSourceModel() endif,
feature <- s.feature
)
My problem is because in uml2 i cannot set the package (namespace) of
class using the same way that in the code.
The uml2 api have an method getNamespace() but dont have a set.
any help please? how can i set the namespace of classes in uml2?
best regards
|
|
|
Powered by
FUDForum. Page generated in 0.10680 seconds