Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF template aspects
GMF template aspects [message #895721] Sun, 15 July 2012 11:11 Go to next message
Matthias N is currently offline Matthias NFriend
Messages: 65
Registered: June 2012
Member
Hi,
as much I know aspect oriented programming is supported by xpand.

I have a GMF project, and when I customize templates, I put them into a folder "templates/aspects/".

The aspects however must follow the same directory structure as the original template, e.g.

the original template:
org.eclipse.gmf.codegen/templates/xpt/editor/Editor.xpt

the aspect:
<my project>/templates/aspects/xpt/editor/Editor.xpt

Therefore, I can only change the Editor.xpt template. So, if my changes concern several templates, I have to create an aspect template for each of those.

What I want to have is an aspect, e.g. color.xpt which contains all template changes within this one file. Example:

color.xpt
<<Around template/xx/yy/ ...>>

<<EndAround>>

<<Around template/zz/aa// ...>>

<<EndAround>>

Is this possible ?
Re: GMF template aspects [message #895882 is a reply to message #895721] Mon, 16 July 2012 12:38 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 769
Registered: July 2009
Location: Grenoble, France
Senior Member
Hi,

Have you looked at those resources?
http://wiki.eclipse.org/Graphical_Modeling_Framework/Tutorial/Part_3#Customizing_generation_templates
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: GMF template aspects [message #895938 is a reply to message #895882] Mon, 16 July 2012 14:59 Go to previous messageGo to next message
Matthias N is currently offline Matthias NFriend
Messages: 65
Registered: June 2012
Member

Yes, I have looked at the "using aspects" from the bonita blog. Unfortunately, they don't answer my question.
Re: GMF template aspects [message #896187 is a reply to message #895938] Tue, 17 July 2012 14:08 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 697
Registered: November 2009
Senior Member
Hi,

a thing that would work is to have all your customization in one template and call this from various other aspect templates. However, I could not see additional value from this.

Ralph

[Updated on: Tue, 17 July 2012 14:08]

Report message to a moderator

Previous Topic:Adding Content Assist to a WrappingLabel?
Next Topic:load only visible pages in gmf(lazy loading)
Goto Forum:
  


Current Time: Mon Nov 24 21:48:35 GMT 2014

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

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