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 15:00
wafaa is currently offline wafaa
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 15: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 Jul 30 01:04:35 EDT 2014

Powered by FUDForum. Page generated in 0.01726 seconds