Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » ETL ANT Script help(Transformation from EMFText parsed concrete syntax files required)
ETL ANT Script help [message #629170] Mon, 27 September 2010 12:17 Go to next message
James Sharp is currently offline James SharpFriend
Messages: 20
Registered: September 2010
Junior Member
I am new to Epsilon and have begun to write an ETL file.

I have previously written EMFText parsers for both my source and target langauges and the packages are available within the current Eclipse environment and are working correctly (i.e. I can open one of the source langauge files and I can see a model structure of the file along side the DSL syntax).

I have been fumbling in the dark somewhat with this and so far I have looked at the ETL example ant file and have tried to alter this for my etl file and to work with the EMFText file types, however I get the error message:

etl.ant:17: java.lang.NullPointerException

my ant file reads:

<?xml version="1.0" ?>
<project default="main">
<target name="loadModels">
<epsilon.emf.register file="../metamodels/vhdl.ecore" />
<epsilon.emf.register file="../metamodels/csp.ecore" />
<epsilon.loadModel name="vhdl" type="EMF">
<parameter name="modelFile" file="../concrete_syntax/vhdl/vending_machine.vhdl" />
<parameter name="metamodelUri" value="vhdl" />
<parameter name="readOnLoad" value="true" />
<parameter name="storeOnDisposal" value="false" />
</epsilon.loadModel>
<epsilon.loadModel name="csp" type="EMF">
<parameter name="modelFile" file="../concrete_syntax/gen-csp/vending_machine.csp" />
<parameter name="metamodelUri" value="csp" />
<parameter name="readOnLoad" value="false" />
<parameter name="storeOnDisposal" value="true" />
</epsilon.loadModel>
</target>
<target name="main" depends="loadModels">
<epsilon.etl src="vhdl2csp.etl">
<model ref="vhdl" />
<model ref="csp" />
</epsilon.etl>
</target>
</project>


Any help in getting the etl script to fire would be greatly appreciated.

Many Thanks,

James
Re: ETL ANT Script help [message #629176 is a reply to message #629170] Mon, 27 September 2010 12:20 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi James,

Could you please put together the plugins needed to reproduce this in a
zip file and send it at epsilon.devs@gmail.com so that I can have a
look? (Please don't forget to mention which version of EMFText you're
using).

Cheers,
Dimitris

James Sharp wrote:
> I am new to Epsilon and have begun to write an ETL file.
>
> I have previously written EMFText parsers for both my source and target
> langauges and the packages are available within the current Eclipse
> environment and are working correctly (i.e. I can open one of the source
> langauge files and I can see a model structure of the file along side
> the DSL syntax).
>
> I have been fumbling in the dark somewhat with this and so far I have
> looked at the ETL example ant file and have tried to alter this for my
> etl file and to work with the EMFText file types, however I get the
> error message:
> etl.ant:17: java.lang.NullPointerException
>
> my ant file reads:
>
> <?xml version="1.0" ?> <project default="main">
> <target name="loadModels">
> <epsilon.emf.register file="../metamodels/vhdl.ecore" />
> <epsilon.emf.register file="../metamodels/csp.ecore" />
> <epsilon.loadModel name="vhdl" type="EMF">
> <parameter name="modelFile"
> file="../concrete_syntax/vhdl/vending_machine.vhdl" /> <parameter
> name="metamodelUri" value="vhdl" /> <parameter name="readOnLoad"
> value="true" /> <parameter name="storeOnDisposal" value="false" />
> </epsilon.loadModel>
> <epsilon.loadModel name="csp" type="EMF">
> <parameter name="modelFile"
> file="../concrete_syntax/gen-csp/vending_machine.csp" /> <parameter
> name="metamodelUri" value="csp" /> <parameter name="readOnLoad"
> value="false" /> <parameter name="storeOnDisposal" value="true" />
> </epsilon.loadModel>
> </target>
> <target name="main" depends="loadModels">
> <epsilon.etl src="vhdl2csp.etl">
> <model ref="vhdl" /> <model ref="csp" /> </epsilon.etl>
> </target>
> </project>
>
>
> Any help in getting the etl script to fire would be greatly appreciated.
>
> Many Thanks,
>
> James
Re: ETL ANT Script help [message #629190 is a reply to message #629170] Mon, 27 September 2010 12:56 Go to previous message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Hi,

I cannot quite check the line numbers on your code snippet, but could it
be that you get the NullpointerException from the loadModel task? I have
had similar problems just recently, and it seems that internally
getProject() always returns NULL for the loadModel implementation. (Not
sure why this is, though).

Cheers,

Steffen

On 27/09/2010 13:17, James Sharp wrote:
> I am new to Epsilon and have begun to write an ETL file.
>
> I have previously written EMFText parsers for both my source and
> target langauges and the packages are available within the current
> Eclipse environment and are working correctly (i.e. I can open one of
> the source langauge files and I can see a model structure of the file
> along side the DSL syntax).
>
> I have been fumbling in the dark somewhat with this and so far I have
> looked at the ETL example ant file and have tried to alter this for my
> etl file and to work with the EMFText file types, however I get the
> error message:
> etl.ant:17: java.lang.NullPointerException
>
> my ant file reads:
>
> <?xml version="1.0" ?> <project default="main">
> <target name="loadModels">
> <epsilon.emf.register file="../metamodels/vhdl.ecore" />
> <epsilon.emf.register file="../metamodels/csp.ecore" />
> <epsilon.loadModel name="vhdl" type="EMF">
> <parameter name="modelFile"
> file="../concrete_syntax/vhdl/vending_machine.vhdl" /> <parameter
> name="metamodelUri" value="vhdl" /> <parameter name="readOnLoad"
> value="true" /> <parameter name="storeOnDisposal" value="false" />
> </epsilon.loadModel>
> <epsilon.loadModel name="csp" type="EMF">
> <parameter name="modelFile"
> file="../concrete_syntax/gen-csp/vending_machine.csp" /> <parameter
> name="metamodelUri" value="csp" /> <parameter name="readOnLoad"
> value="false" /> <parameter name="storeOnDisposal" value="true" />
> </epsilon.loadModel>
> </target>
> <target name="main" depends="loadModels">
> <epsilon.etl src="vhdl2csp.etl">
> <model ref="vhdl" /> <model ref="csp" /> </epsilon.etl>
> </target>
> </project>
>
>
> Any help in getting the etl script to fire would be greatly appreciated.
>
> Many Thanks,
>
> James
Previous Topic:Loading models into IModel objects
Next Topic:Problem using `pre` to declare global data
Goto Forum:
  


Current Time: Thu Mar 28 20:30:00 GMT 2024

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

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

Back to the top