Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to add additional methods to "inner figure class" template in graphdef.codegen
How to add additional methods to "inner figure class" template in graphdef.codegen [message #81892] Thu, 30 November 2006 07:41
Eclipse UserFriend
Originally posted by: reneschm.cs.tu-berlin.de

Hi,

Based on M2_2.0 I added to Top.javajet, Figure.javajet and
PolylineConnection.javajet in o.e.g.graphdef.codegen project some methods.
Now jet was replaced by xpand and I'm not sure where I have to place my
code now.
The generated figures should contain the following additions
implement IHighlightableFigure with its methods highlight() and
unHighlight()
with my M2_2.0 extension it looks like that:

/**
* @generated
*/
public class DecisionActivityFigure extends
org.eclipse.draw2d.RectangleFigure implements
org.eclipse.gmf.runtime.diagram.ui.figures.IHighlightableFig ure {

private org.eclipse.draw2d.Border oldBorder;

/**
* @generated
*/
public boolean highlight() {
if (oldBorder == null) {
oldBorder = this.getBorder();
}
this
.setBorder(new
org.eclipse.gmf.runtime.diagram.ui.figures.HighlightLineBord er(
new org.eclipse.swt.graphics.Color(null, 0, 255, 0),
2));
return true;
}

/**
* @generated
*/
public void unHighlight() {
setBorder(oldBorder);
oldBorder = null;
}
....
}
Previous Topic:Validate menu action doesn't show up when using emft validation 1.0.1
Next Topic:compartment's direction
Goto Forum:
  


Current Time: Sat May 31 05:09:55 EDT 2025

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

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

Back to the top