Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [acceleo] loading EMF resource with a folder URI
[acceleo] loading EMF resource with a folder URI [message #1058070] Fri, 10 May 2013 15:09 Go to next message
Vlad Gheorghe is currently offline Vlad Gheorghe
Messages: 111
Registered: May 2011
Senior Member
Hello,

Suppose I have an EMF-based metamodel which defines a resource that constructs the model from the contents of a folder.

Even if that works programatically, when trying to load it in acceleo we get:

java.lang.IllegalArgumentException: Path must include project and resource name: /PPP
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2169)
at org.eclipse.core.internal.resources.Container.getFile(Container.java:208)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoLaunchOperation.run(AcceleoLaunchOperation.java:121)
...

Would it make sense to allow loading from any resource, not only files ?


Best regards,
Vlad Gheorghe
Re: [acceleo] loading EMF resource with a folder URI [message #1058273 is a reply to message #1058070] Mon, 13 May 2013 08:37 Go to previous message
Stephane Begaudeau is currently offline Stephane Begaudeau
Messages: 406
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

Acceleo has been created with the idea that people would launch their generation on a model. We have made sure that Acceleo can also be used in complex use cases. While your use case makes sense, it is more complex than the regular code generation use case and the user interface of Acceleo does not support it. You can launch your generator in stand alone or you can use a dedicated launcher (new Acceleo UI Launcher) in which you can start your generation on a "folder". Personnaly I tend to use a dedicated launcher in order to provide my users with additional options for the generation. You use case makes sense but I don't think it makes enough sense for us to change the way the Acceleo user interface works. The next thing you know, people will come and complain about Acceleo not generating what they want because they have selected the folder containing their model and not the model itself...

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau
Google+: +stephane.begaudeau
Blog: http://stephanebegaudeau.tumblr.com | Eclipse Java Development Tools Tips and Tricks



Previous Topic: [acceleo] How to create file "Android Model" with EMF Eclipse
Next Topic:[Acceleo]Acceleo does not see metamodels located in targetplatform
Goto Forum:
  


Current Time: Mon Jul 28 12:37:05 EDT 2014

Powered by FUDForum. Page generated in 0.02489 seconds