| [ATL] MoDisco .javaxmi files [message #656618] |
Sun, 27 February 2011 10:28  |
Rob 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 #662022 is a reply to message #660944] |
Mon, 28 March 2011 18:34  |
Rob 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 05:14] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01755 seconds