Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] How to find the package owning a class ?
[ATL] How to find the package owning a class ? [message #868946] Wed, 02 May 2012 15:12
Alain Lavoie is currently offline Alain Lavoie
Messages: 82
Registered: April 2012
Member
Hi,

I need to copy some classes from one package to another, all in the same model.
This is the code:
module AddClassesCIM2PIM;
create OUT : UML refining IN : UML;
rule CopySomeClasses {
	from
	    ma: UML!Package (ma.oclIsTypeOf(UML!Package))
	to 
	    ta : UML!Package (
                         name <- 'IN!PIM'
	    ), 			
	    ca : UML!Class ( 
                         name <- ma.name
	     )
}

Problems:
P1 - At execution, a new UML!Package of the name 'IN!PIM' is created.
How can I have a reference to always the same package ?

P2 - I tryed to find the UML!Class reference to its direct parent package, without success.
How can I get/set the package owning a class ?

Regards.
Previous Topic:[QVTO] Custom data types
Next Topic:[ATL] No type named 'Root' in metamodel
Goto Forum:
  


Current Time: Sun Apr 20 07:07:31 EDT 2014

Powered by FUDForum. Page generated in 0.01728 seconds