Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Acceleo as standalone(How to run Acceleo as a standalone Java application)
[Acceleo] Acceleo as standalone [message #635753] Thu, 28 October 2010 01:10 Go to next message
Yannick Duchene (Hibou57) is currently offline Yannick Duchene (Hibou57)Friend
Messages: 50
Registered: September 2010
Location: Metz (France - Europe)
Member
Hi happy designers,

I would like try to test something with which I would need Acceleo to be used as a standalone Java application : would give it two arguments, target directory and M2T source file, launch from command line (this is what I would like to get).

I had a look at the doc, but there was just really few things about this topic in Acceleo's doc.

It says nothing about what Java compiled files I have to copy outside of Eclipse, and I failed with a test.

This test, which suggested by the doc, is to run a transformation from Eclipse, and to run it as a Java application instead of as a plug-in.

When I do so, I have a message box with a progress bar, which reach the end, but then does not close, what ever the time I wait (even multiple minutes). I have to manually close the Eclipse process, otherwise, the whole Eclipse does not respond any more.

As this test fails, does that means I cannot use Acceleo standalone ?

Surprisingly, the process seems to complete in some way, as files in the target folder appears to be really generated ; this is just that it does not close at the end.

Here is the state of my attempts.

Any hint or tip, or links to doc, to use Acceleo as a Java standalone application, welcome.
Re: [Acceleo] Acceleo as standalone [message #635757 is a reply to message #635753] Thu, 28 October 2010 01:32 Go to previous messageGo to next message
Simon harrer is currently offline Simon harrerFriend
Messages: 25
Registered: August 2010
Junior Member
Hi,

I got something like want you want to achieve working.

The main problem is the compilation of the *.MTL to *.EMTL files. There may be a ANT task which can do this (see ref below). However, I used the AcceleoCompiler Class for this which has been published here: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2t/org .eclipse.acceleo/plugins/org.eclipse.acceleo.parser/src-ant/ org/eclipse/acceleo/parser/compiler/AcceleoCompiler.java?rev ision=1.13&root=Modeling_Project&view=markup

The following has to be done

1. Register Meta Models
2. Compile to *.emtl

-> then the transformation can be run using the automatically created java launch class. However, put the *.emtl files into the classpath.

Also an ant task is provided here, but I have not used this. http://www.eclipse.org/forums/index.php?t=msg&th=170451& amp;start=0&
Re: [Acceleo] Acceleo as standalone [message #635764 is a reply to message #635753] Thu, 28 October 2010 02:53 Go to previous messageGo to next message
Yannick Duchene (Hibou57) is currently offline Yannick Duchene (Hibou57)Friend
Messages: 50
Registered: September 2010
Location: Metz (France - Europe)
Member
Thanks for the link Simon, will have a look at all of this

(gonna not be a piece of cake for me who just know all that Eclipse and Java stuffs too few... still can be done, I believe)
Re: [Acceleo] Acceleo as standalone [message #636309 is a reply to message #635764] Sat, 30 October 2010 16:44 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050306020704040705030601
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Yannick,

Acceleo works in a standalone environment for sure, since it has been
designed with this use case in mind. The Java classes you are to launch
are the files automatically generated besides your "mtl" modules (those
which are annotated with the "@main" comment).

However as Simon mentionned, if we did have standalone generation in
mind while designing Acceleo, we did not expect that there would also be
such a need for standalone compilation, and you'll have to take a look
at his advice as we haven't made progress in this field since then.

As for the documentation, looking at your comment I do believe we'll
have to update it with a dedicated "standalone" section :).

Laurent Goubet
Obeo

Yannick Duchene (Hibou57) wrote:
> Thanks for the link Simon, will have a look at all of this
>
> (gonna not be a piece of cake for me who just know all that Eclipse and
> Java stuffs too few... still can be done, I believe)
>


--------------050306020704040705030601
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=
--------------050306020704040705030601--
Re: [Acceleo] Acceleo as standalone [message #636319 is a reply to message #636309] Sat, 30 October 2010 20:39 Go to previous messageGo to next message
Yannick Duchene (Hibou57) is currently offline Yannick Duchene (Hibou57)Friend
Messages: 50
Registered: September 2010
Location: Metz (France - Europe)
Member
Hi once again Mr Laurent,

Laurent Goubet wrote on Sat, 30 October 2010 12:44
However as Simon mentionned, if we did have standalone generation in
mind while designing Acceleo, we did not expect that there would also be
such a need for standalone compilation, and you'll have to take a look
at his advice as we haven't made progress in this field since then.

Yes, "standalone" and "portable" is a famous requirement nowadays (and to talk about Java applications, there exist some very lightweight JVM now) .

Just let me explain why I was thinking about it, so it does not look like an unjustified or silly expectation : I though about it because a process may rely on an external compiler and an external UML editor (I am balancing TopCased and ArgoUML, while ArgoUML does not work fine in Eclipse), so that most of the process is done outside of Eclipse. That was why I though about running Acceleo outside of Eclipse if possible.

Laurent Goubet wrote on Sat, 30 October 2010 12:44
As for the documentation, looking at your comment I do believe we'll
have to update it with a dedicated "standalone" section Smile.

I guess you have many pending job, so please, don't bother too much (except if someone with a commercial support request the same).
Re: [Acceleo] Acceleo as standalone [message #636321 is a reply to message #636309] Sat, 30 October 2010 20:49 Go to previous messageGo to next message
Simon harrer is currently offline Simon harrerFriend
Messages: 25
Registered: August 2010
Junior Member
Hi Laurent,

I think, the use case of standalone compilation is an important one.

Most companies use the Hudson Buildserver to build their products. For this occasion, the standalone-compilation is neccessary to build the fully functional product, execute test cases, etc.

It would be great, if some documentation would be provided. Maybe, with an example how to call the compiler. Is it possible to provide something myself? I do not know how the contribution guidelines are for the Acceleo Project.


And currently, the presented AcceleoCompiler Class only puts its output in the source directory. It is currently not possible to specify a target directory. This contradicts to the normal java compilation mechanism, as it compiles from src to bin. Something like this would also be preferred, I think.

Also, at default, the mtl files are copied to the bin directory. By adding Acceleo to the project, this could automatically be excluded.

The last two aspects just came into mind.

Cheers,
Simon
Re: [Acceleo] Acceleo as standalone [message #636334 is a reply to message #636319] Sun, 31 October 2010 01:03 Go to previous messageGo to next message
Yannick Duchene (Hibou57) is currently offline Yannick Duchene (Hibou57)Friend
Messages: 50
Registered: September 2010
Location: Metz (France - Europe)
Member
Yannick Duchene (Hibou57) wrote on Sat, 30 October 2010 16:39
Just let me explain why I was thinking about it, so it does not look like an unjustified or silly expectation : I though about it because a process may rely on an external compiler and an external UML editor (I am balancing TopCased and ArgoUML, while ArgoUML does not work fine in Eclipse), so that most of the process is done outside of Eclipse. That was why I though about running Acceleo outside of Eclipse if possible.

I'm pretty sure now. After some tests, pretty sure ArgoUML is the UML editor to recommend. Papyrus let you draw erroneous diagrams (you have to manually validate all the time with another tool), has trouble with XMI imports. TopCased is a validating editor, but suffers from too much "pointer error" and also have real troubles with XMI imports. The only one which does not crash while running, validates during edition, and imports XMI without a trouble, is ArgoUML. As said before, as it has failure with its Eclipse variant (ArgoEclipse), and works fine outside of Eclipse, then no more reasons to use Eclipse, except for Acceleo.

TBH: ArgoUML only have experimental support for UML2, and cannot draw state diagrams (which I need) in UML mode. But it seems the more promising of all the ones I tried.

This was my off-topic about what is the most recommended validating UML editor Razz

Have a nice time all.
Re: [Acceleo] Acceleo as standalone [message #636352 is a reply to message #636321] Sun, 31 October 2010 10:46 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi Simon,

As you might have guessed, we spend more time writing code than documentation (I wonder if there are developpers out there for whom it's not the case Razz). It would be greatly appreciated if you could provide such a document. As far as contribution guidelines are concerned ... we'd rather have documents that can be converted to HTML (for inclusion on the Help Center ).

All of the current docs are written using ReStructured Text and are accessible as source in the org.eclipse.acceleo.doc plugin on CVS. Another way of contibuting would be to directly edit the Acceleo wiki (ok, I don't know whether this is possible for external contributors). Whic reminds me I had copied a basic skeleton of standalone compilation on the FAQ.

Whatever your choice, don't hesitate to simply raise an enhancement request on the Eclipse bugzilla to attach your contribution and maintain the discussion Smile.

Laurent Goubet
Obeo

[Updated on: Sun, 31 October 2010 10:49]

Report message to a moderator

Re: [Acceleo] Acceleo as standalone [message #636354 is a reply to message #636334] Sun, 31 October 2010 10:31 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060706080407040409030000
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Yannick,

Comparison between UML modelers seem to be a reccurent topic :). It's a
wonder no studies are yet out on this ^^.

Laurent Goubet
Obeo

Yannick Duchene (Hibou57) wrote:
> Yannick Duchene (Hibou57) wrote on Sat, 30 October 2010 16:39
>> Just let me explain why I was thinking about it, so it does not look
>> like an unjustified or silly expectation : I though about it because a
>> process may rely on an external compiler and an external UML editor (I
>> am balancing TopCased and ArgoUML, while ArgoUML does not work fine in
>> Eclipse), so that most of the process is done outside of Eclipse. That
>> was why I though about running Acceleo outside of Eclipse if possible.
>
> I'm pretty sure now. After some tests, pretty sure ArgoUML is the UML
> editor to recommend. Papyrus let you draw erroneous diagrams (you have
> to manually validate all the time with another tool), has trouble with
> XMI imports. TopCased is a validating editor, but suffers from too much
> "pointer error" and also have real troubles with XMI imports. The only
> one which does not crash while running, validates during edition, and
> imports XMI without a trouble, is ArgoUML. As said before, as it has
> failure with its Eclipse variant (ArgoEclipse), and works fine outside
> of Eclipse, then no more reasons to use Eclipse, except for Acceleo.
>
> TBH: ArgoUML only have experimental support for UML2, and cannot draw
> state diagrams (which I need) in UML mode. But it seems the more
> promising of all the ones I tried.
>
> This was my off-topic about what is the most recommended validating UML
> editor :p
>
> Have a nice time all.
>


--------------060706080407040409030000
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=
--------------060706080407040409030000--
Re: [Acceleo] Acceleo as standalone [message #636627 is a reply to message #636354] Tue, 02 November 2010 09:38 Go to previous messageGo to next message
Sebastien Roy is currently offline Sebastien RoyFriend
Messages: 51
Registered: November 2009
Member
Hello,

For information about using modelers with Acceleo, here is my feedback about the 3 ones I have tested (unfortunately none of them are open-source) :
- Rhapsody (IBM): though this modeler claims beeing UML2 - XMI /EMF compliant, it is not. For very basic models the exported files are well parsed by EMF, but for more complex ones the parsing crashes, due to unexpected constructs.
- MagicDraw : excellent compatibility with UML2 - XMI /EMF. Furthermore, it is a low cost tool if you don't purchase specific technologies options.
- Rational Software Modeler (IBM). Excellent but expensive tool. Works perfectly.

Cheers

Sebastien
Re: [Acceleo] Acceleo as standalone [message #642025 is a reply to message #636354] Mon, 29 November 2010 15:33 Go to previous message
Thomas Neustupny is currently offline Thomas NeustupnyFriend
Messages: 75
Registered: October 2009
Member
Hi Laurent!

Laurent Goubet wrote on Sun, 31 October 2010 06:31
Comparison between UML modelers seem to be a reccurent topic Smile. It's a
wonder no studies are yet out on this ^^.

At the same time it seems to be a dead topic for years: since UML2 the "old" market leaders lost their positions and a new set of players offer quite nice (non-free) tools. Regarding free tools: there are way too few volunteering developers to have mature feature-complete tools, and that is true both in the eclipse community as well as for standalone tools.

[Updated on: Mon, 29 November 2010 15:34]

Report message to a moderator

Previous Topic:eAllContents gone ...
Next Topic:[Acceleo] Unexpected inheritance behavior
Goto Forum:
  


Current Time: Thu Apr 18 16:15:23 GMT 2024

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

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

Back to the top