Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Running a installed acceleo bundle from a Java main method
[Acceleo] Running a installed acceleo bundle from a Java main method [message #535080] Fri, 21 May 2010 09:15 Go to next message
Fabien Giquel is currently offline Fabien Giquel
Messages: 138
Registered: July 2009
Senior Member
Hi,

here is a context of launching an acceleo module which does not work. I would like to know if it is an expected limit or if it is a bug :

- Helios M7 with acceleo bundles.
- installed an acceleo module X in plugins directory.
- creating in the workspace a simple Java project (not a plugin project) and adding to the classpath the emf and acceleo jars.
- writing a Java class with a main method which invokes the acceleo module X main Java class for generation (calling the doGenerate() method)


Running the java class as 'Java application' results in an error : "invalid relative pathName : ... .emtl" (more details in the thread http://www.eclipse.org/forums/index.php?t=msg&th=168568& amp;start=0&)
The problem is that the .emtl file is located in a .jar (the module X installed bundle) and acceleo generated code expects to find it unzipped (calling URI.createFileURI(..)).

Of course calling the same way from a plugin (eclipse context) works fine.

Thanks in advance.


----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Ch√Ęteau de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
Re: [Acceleo] Running a installed acceleo bundle from a Java main method [message #535101 is a reply to message #535080] Fri, 21 May 2010 09:51 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1628
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020509020606070703080305
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Fabien,

This is a known limitation we're currently trying to break. I built a
little more than an hour ago a nightly that should fix the issue, but
have yet to confirm the fix. If you wish to help in the verification (or
check that it works in your context), the nightly can be retrieved from
http://modeling.eclipse.org/modeling/m2t/acceleo/downloads/d rops/3.0.0/N201005210354/m2t-acceleo-SDK-incubation-N2010052 10354.zip

Laurent Goubet
Obeo

Fabien Giquel wrote:
> Hi,
>
> here is a context of launching an acceleo module which does not work. I
> would like to know if it is an expected limit or if it is a bug :
>
> - Helios M7 with acceleo bundles.
> - installed an acceleo module X in plugins directory.
> - creating in the workspace a simple Java project (not a plugin project)
> and adding to the classpath the emf and acceleo jars.
> - writing a Java class with a main method which invokes the acceleo
> module X main Java class for generation (calling the doGenerate() method)
>
>
> Running the java class as 'Java application' results in an error :
> "invalid relative pathName : ... .emtl" (more details in the thread
> http://www.eclipse.org/forums/index.php?t=msg&th=168568& amp;start=0&) The
> problem is that the .emtl file is located in a .jar (the module X
> installed bundle) and acceleo generated code expects to find it unzipped
> (calling URI.createFileURI(..)).
>
> Of course calling the same way from a plugin (eclipse context) works fine.
>
> Thanks in advance.


--------------020509020606070703080305
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------020509020606070703080305--
Previous Topic:[XPAND] Dynamic Instance
Next Topic:[Check] metatype function
Goto Forum:
  


Current Time: Wed Oct 01 18:39:26 GMT 2014

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

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