Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Hiding Xpand template from user
[Xpand] Hiding Xpand template from user [message #1089124] Sun, 18 August 2013 06:51 Go to next message
Jack Vo is currently offline Jack VoFriend
Messages: 21
Registered: September 2012
Junior Member
Hi everybody,
I'm new with xpand. I have a plug-in code generator with inputs: project, model, xpand template. This plug-in work well if input project includes input model and input xpand template.
My mission is hiding xpand from users, they just need to configure value for input model, and non-touching xpand template.
My solution: Develop a java code inside plug-in to generate xpand template outside the plugin then it will assemble model and run code generation.
Is my solution is possible? If so, where are difficult parts in this way? Are there any other possible solutions for my mission?
Thanks you very much for your time
Re: [Xpand] Hiding Xpand template from user [message #1092050 is a reply to message #1089124] Thu, 22 August 2013 09:07 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Hi Jack,

of course this is possible. You would use the XpandFacade invoked from your plugin code (maybe encapsuled in an Action).
The "critical" part is resource loading of your Xpand templates. By default, Xpand uses the classpath to resolve resources. This is usually not the right path to follow when invoking from plugin code. So the XpandExecutionContext needs a specialized ResourceManager, which loads resources from the bundle.

Good luck!

~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: [Xpand] Hiding Xpand template from user [message #1096922 is a reply to message #1092050] Thu, 29 August 2013 02:55 Go to previous message
Jack Vo is currently offline Jack VoFriend
Messages: 21
Registered: September 2012
Junior Member
Hi Karsten,
Thanks for your reply, I will try your suggest and inform if it works
Thanks
Previous Topic:[Acceleo] Warning in query implemented in Java
Next Topic:[Acceleo] file-exists/ generate once
Goto Forum:
  


Current Time: Sat Nov 09 02:10:36 GMT 2024

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

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

Back to the top