Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF-Generator doesn't customize gmfgraph::Figure
GMF-Generator doesn't customize gmfgraph::Figure [message #559302] Thu, 16 September 2010 10:23 Go to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi @ everyone

I have customized gmfgraph::Figure by creating an Figure.xpt like

«IMPORT 'http://www.eclipse.org/gmf/2006/GraphicalDefinition
«IMPORT 'http://www.eclipse.org/emf/2002/Ecore
«EXTENSION CustomUtil»
«EXTENSION Util»

«AROUND additions FOR gmfgraph::Figure»

...DO SOMETHING...

«ENDAROUND»



This should generate a
innerclass in my editpart like the following:

/**
* @generated
*/
public class SpecialStepPreviousStepFigure extends RectangleFigure {

/**
* @generated
*/
public SpecialStepPreviousStepFigure() {
this.setLineWidth(0);

this.setPreferredSize(new Dimension(getMapMode().DPtoLP(30),
getMapMode().DPtoLP(30)));
}


...DO SOMETHING...


This doesn't work anymore, only the default-constructor as shown above is created, my own contributions are ignored.

Can you help me?

Best regards
Markus




[Updated on: Thu, 16 September 2010 10:24]

Report message to a moderator

Re: GMF-Generator doesn't customize gmfgraph::Figure [message #559538 is a reply to message #559302] Fri, 17 September 2010 05:34 Go to previous messageGo to next message
Sven Krause is currently offline Sven KrauseFriend
Messages: 119
Registered: July 2009
Senior Member
Hi Markus,

the edit part's figure class body are created during the gmfgen model
creation. So might double check it at the nodes view map classbody
attribute. There is an option with the gmfgen creation dialog let you
decide which kind of code gen you prefer (java or QVTO). The default
selection is the java style. I've provided my own java based generation,
but I can tell you that I was forced doublicating a lot of code, since
the default implementation does not look like designed for extension :-(
For the QVTO: I've not searched for the default templates and if there
such for customization nor how QVT behaves on merging base and custom
templates located on different plugins...

Sven

Am 16.09.2010 12:23, schrieb Markus Oley:
> Hi @ everyone
>
> I have customized gmfgraph::Figure by creating an Figure.xpt like
> «IMPORT 'http://www.eclipse.org/gmf/2006/GraphicalDefinition
> «IMPORT 'http://www.eclipse.org/emf/2002/Ecore
> «EXTENSION CustomUtil»
> «EXTENSION Util»
>
> ...DO SOMETHING...
>
> «AROUND additions FOR gmfgraph::Figure»
> «ENDAROUND»
>
>
>
> This should generate a innerclass in my editpart like the following:
> /**
> * @generated
> */
> public class SpecialStepPreviousStepFigure extends RectangleFigure {
>
> /**
> * @generated
> */
> public SpecialStepPreviousStepFigure() {
> this.setLineWidth(0);
>
> this.setPreferredSize(new Dimension(getMapMode().DPtoLP(30),
> getMapMode().DPtoLP(30)));
> }
>
>
> ...DO SOMETHING...
>
> This doesn't work anymore, only the default-constructor as shown above
> is created, my own contributions are ignored.
> Can you help me?
> Best regards
> Markus
>
>
>
>
>
Re: GMF-Generator doesn't customize gmfgraph::Figure [message #628780 is a reply to message #559538] Fri, 24 September 2010 06:27 Go to previous messageGo to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi again,

thank you for your quick answer,

I think the problem is a different one.
I have enabled custom templates while using galileo.

Now I wanted to port my editors to helios and with this it doesn't work anymore.
So it principally worked with the old eclipse version.

Did something in structure change, so that the gmf-generator doesn't find the xpts?
can I debug or increase log-messages using the generator?

Best regards
Markus

[Updated on: Fri, 24 September 2010 06:28]

Report message to a moderator

Re: GMF-Generator doesn't customize gmfgraph::Figure [message #633055 is a reply to message #628780] Fri, 15 October 2010 08:41 Go to previous message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
OK, problem was different.
We used a .def-file to build things with gmftools. We defined a figureTemplatePath, which was ignored building from the GMF-Toolbar-Button
Previous Topic:aovoid, forbid undo in Commands
Next Topic:SyntaxError in a top::Figure.xpt template
Goto Forum:
  


Current Time: Sat Apr 27 02:52:44 GMT 2024

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

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

Back to the top