Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » how to deal with nestedPackages!!(the chart is below:))
how to deal with nestedPackages!! [message #542851] Sat, 26 June 2010 19:00
wafaa is currently offline wafaaFriend
Messages: 163
Registered: January 2010
Location: Egypt
Senior Member
hi all

can some one direct me to the correct solution for creating packaged element of a package like this
the input is similar to

Quote:
1 .Model A
-> 1.1 package B
-> -> 1.1.1 package C
->->-> 1.1.1.1Class D
->->-> 1.1.1.2 Class E
->-> 1.1.2 package F
->->-> 1.1.2.1 Class G
->->-> 1.1.2.2 Class H




I want to make all elements in all the nested package (which is any nested package of B) elements of the main package B

and (all the nested packages in the main package are not transformed)

I want the out put to be

Quote:
1.Model A
-> 1.1 package B
->->1.1.1 Class C
->-> 1.1.2ClassD
->-> 1.1.3 Class G
->->1.1.4 ClassH


I used this transformaion

rule Package {
from
p : UML!Package
(p.hasStereotype('Ontology') )
to
out : UML!Package (
name <- p.name ,
packagedElement <- p.packagedElement

)
}

but then the output is in the main model which I do not want


Quote:
1Model A
->1.1 package B
-> 1.2 Class C
->1.3 Class D
->1.4 Class G
->1.5 Class H

[Updated on: Sat, 26 June 2010 19:28]

Report message to a moderator

Previous Topic:[ATL][AML] Where can I find AMLLibrary
Next Topic:how to deal with nestedPackage of a package
Goto Forum:
  


Current Time: Wed Dec 11 00:19:46 GMT 2024

Powered by FUDForum. Page generated in 0.03092 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top