Skip to main content


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 19:12
Alain Lavoie is currently offline Alain LavoieFriend
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: Fri Apr 26 14:03:44 GMT 2024

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

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

Back to the top