Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Invoking templates from menus?(How to invoke Xpand templates, without the user directly interacting with a workflow file?)
[Xpand] Invoking templates from menus? [message #527495] Thu, 15 April 2010 13:18 Go to next message
Nicholas  is currently offline Nicholas Friend
Messages: 4
Registered: April 2010
Junior Member
Hi

I'm looking to create a generation element for my dsl plug-in.

I seem to be getting on fine working with Xtext and Xpand, but want to know if there is a way I can have the user invoke a Xpand template, without having to deal directly with a workflow.

Ideally this would be a right-click menu option on the file to generate against.

I've had a search, but have only turned up this alternative: http://www.peterfriese.de/using-xpand-in-your-eclipse-wizard s/

Apologies I'm a complete novice to plug-in development, so try not to assume to much of me in your answers! Embarrassed

Many thanks
Re: [Xpand] Invoking templates from menus? [message #527507 is a reply to message #527495] Thu, 15 April 2010 13:42 Go to previous messageGo to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
Hi,

you can use JAVA. As long as your workflow is configured beforehand, you can invoke it from JAVA.

Quote:
public boolean run(String workFlowFile,
ProgressMonitor theMonitor,
Map<String,String> theParams,
Map<String,?> externalSlotContents)


http://www.eclipse.org/forums/index.php?t=msg&th=165963& amp;start=0&


One day I shall master M2T, but that day has yet to come...
Re: [Xpand] Invoking templates from menus? [message #527698 is a reply to message #527507] Fri, 16 April 2010 07:15 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Xpand also provides some Java APIs (CTRL+SHIFT+T 'XpandFacade')
to call templates directly from Java code.

Sven

Maxime Lecourt schrieb:
> Hi,
>
> you can use JAVA. As long as your workflow is configured beforehand, you
> can invoke it from JAVA.
>
> Quote:
>> public boolean run(String workFlowFile,
>> ProgressMonitor theMonitor,
>> Map<String,String> theParams,
>> Map<String,?> externalSlotContents)
>
>
> http://www.eclipse.org/forums/index.php?t=msg&th=165963& amp;start=0&


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: [Xpand] Invoking templates from menus? [message #527900 is a reply to message #527698] Fri, 16 April 2010 20:30 Go to previous message
Nicholas  is currently offline Nicholas Friend
Messages: 4
Registered: April 2010
Junior Member
thanks guys, that should get me started.
Previous Topic:[Acceleo] Problems with AcceleoService.doGenerate
Next Topic:XPAND FILE directive - is it possible to write to an InputStream
Goto Forum:
  


Current Time: Thu Apr 25 17:10:46 GMT 2024

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

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

Back to the top