Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] MoDisco .javaxmi files(PSM2PIM Transformation)
[ATL] MoDisco .javaxmi files [message #656618] Sun, 27 February 2011 15:28 Go to next message
Rob is currently offline RobFriend
Messages: 17
Registered: February 2011
Junior Member
Hi!

I am working on a Modeling Project with MoDisco with the full workflow from Reverse Engineering to M2M to Forward Engineering.

I retrieve a Model from an application with MoDisco Discoverer which results in a x.javaxmi file.

For platform independence i want to transform this model in a PIM model but within the same metamodel (java.xmi or ecore?) but with less information.

I did some UML transformation earlier and I remember that I got a copy of the source model when I startet the ATL Transformation with an empty atl-file (without any rules).

I wanted to test the atl-file for the javaxmi transformation now without any rules but I keep getting an empty result file.
Is there any special meta model definition to use with the javaxmi transformation?

I am using: http://www.eclipse.org/MoDisco/Java/0.2.incubation/java for the uri.

Many thanks in advance

Re: [ATL] MoDisco .javaxmi files [message #660944 is a reply to message #656618] Tue, 22 March 2011 13:01 Go to previous messageGo to next message
Thanasis Naskos is currently offline Thanasis NaskosFriend
Messages: 22
Registered: March 2011
Junior Member
Hello George,

I'm not aware of the "empty atl-file" but working on a project this period, I found something that could be useful in your case...

It's an atl transformation file that produces atl code for coping any model you want....

the link to this file
http://soft.vub.ac.be/viewvc/UML2CaseStudies/uml2cs-transfor mations/EModelCopyGenerator.atl

Smile
Re: [ATL] MoDisco .javaxmi files [message #662022 is a reply to message #660944] Mon, 28 March 2011 22:34 Go to previous message
Rob is currently offline RobFriend
Messages: 17
Registered: February 2011
Junior Member
Thx 4 your answer, Thanasis.

I was able to solve this problem. It was just a mistake with from/refine keyword in atl module.

But anyway I am running into some strange problems.

Still on javaxmi model based on java.ecore doing transformation from java to java - same metamodel.
I tried to create lazy rules to transfer type information from FieldDeclarations and Parameters, which works so far.

lazy rule F2F {
	from
		s: Java!FieldDeclaration
	to
		t : Java!FieldDeclaration (
			type <- thisModule.TA2TA(f),
		)
}

lazy rule TA2TA {
	from
		f: Java!TypeAccess
	to
		t : Java!TypeAccess (
			type <- if (f.type.type.oclIsKindOf(Java!PrimitiveTypeVoid))
.....
					


I am not quite sure, why I have to access type twice here - but this way the checks work - although I can not figure it out from the metamodel. From my understanding it should work with f.type.olcIsKindOf ...

the same code works for Parameters (i.e. SingleVariableDeclarations)

but when I try to transfer returnType in MethodDeclaration I get an error, that type is not valid for MethodDeclaration.

Maybe I am missunderstanding some concepts of ATL. But I dig through the Metamodel and from my point of view it should not matter whether it is type in SingleVariableDeclaration/AbstractVariablesContainer or returnType in MethodDeclaration.

Any hints would be appreciated.

Thx
Rob

[Updated on: Thu, 31 March 2011 09:14]

Report message to a moderator

Previous Topic:public2private launch
Next Topic:[QVTo] How to find specific object in a list
Goto Forum:
  


Current Time: Fri Apr 19 01:26:53 GMT 2024

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

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

Back to the top