Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF change class hierarhy
GMF change class hierarhy [message #1032518] Wed, 03 April 2013 05:02 Go to next message
Igor Zapletnev is currently offline Igor ZapletnevFriend
Messages: 33
Registered: September 2012
Hi all,

I have generated edit part MyEditPart:

 * @generated
public class MyEditPart extends ShapeNodeEditPart {

And I want to change parent class on MyCustomShapeNodeEditPart that extends from ShapeNodeEditPart as well.

@extends annotation has affect for interfaces, but I need something like this:

 * @generated
 * @extends MyCustomShapeNodeEditPart
public class MyEditPart extends MyCustomShapeNodeEditPart {
Re: GMF change class hierarhy [message #1032640 is a reply to message #1032518] Wed, 03 April 2013 08:45 Go to previous message
Thomas Beyer is currently offline Thomas BeyerFriend
Messages: 55
Registered: February 2013
Hi Igor,

you can change the generator templates to make your class inherit from your custom shapenodeeditpart for any node you like.

-> diagram::editparts:NodeEditPart.xpt
-> impl::diagram::editparts:NodeEditPart.xpt
The latter has a declaration:
«DEFINE extendsListContents FOR gmfgen::GenNode-»
«IF hasBorderItems(self)»org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart«ELSE»org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart«ENDIF-»

you might want to change.

Previous Topic:Initializing a diagram with default node
Next Topic:GMF live validation
Goto Forum:

Current Time: Tue Mar 31 02:40:16 GMT 2020

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

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

Back to the top