Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsMy first transformation
https://www.eclipse.org/forums/index.php/mv/msg/219874/695354/#msg_695354
pre {
'Running ETL'.println();
var jm : new JavaModel!SelfReference;
}
rule Jamopp2Javamodel
transform s : jamoppModel!CompilationUnit
to t : JavaModel!Statement {
}
I get an error:
Running ETL
Type 'JavaModel!SelfReference' not found (D:\Workspaces\CodeMonitor\it.polito.softeng.javamodel\src\it\polito\softeng\javamodel\jamopp2javamodel.etl@3:25)
In the run configuration I inserted a reference to a registered package with the name "JavaModel". This package contains the EClass SelfReference but it is not found.
Any suggestion?]]>Federico Tomassetti2011-07-11T15:08:15-00:00Re: My first transformation
https://www.eclipse.org/forums/index.php/mv/msg/219874/695391/#msg_695391
]]>Antonio Garcia-Dominguez2011-07-11T16:18:11-00:00Re: My first transformation
https://www.eclipse.org/forums/index.php/mv/msg/219874/695417/#msg_695417
Federico Tomassetti2011-07-11T17:22:58-00:00Re: My first transformation
https://www.eclipse.org/forums/index.php/mv/msg/219874/695439/#msg_695439
exactly? The model you have is a metamodel, so you should not add it as
a model directly to your launch configuration. Instead, you need to add
a model using the label JavaModel and ensure that the metamodel of that
is the JavaModel metamodel.
Steffen
On 11/07/2011 18:22, Federico Tomassetti wrote:
> I tried loading the JavaModel package both as a Registered meta-model
> and as a model under the name "JavaModel". It did not work.]]>Steffen Zschaler2011-07-11T18:12:44-00:00Re: My first transformation
https://www.eclipse.org/forums/index.php/mv/msg/219874/695450/#msg_695450
If you load a registered EPackage as a model, you are loading an Ecore model, which contains your metamodel. The only types you can work with are EClass, EAttribute and so on: the Ecore types.
If you want to use the JavaModel EPackage to create a model, you need to load a proper model based on your metamodel. You can add an empty model to a launch configuration by setting the "Read on load" option to false.
By the way, have you checked our examples? This one should be useful:
It works: I did not understand that I have to configure the "unexisting model" and refer to the metamodel there. It was not clear to me reading the examples.