Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Custom Decoration code generation
Custom Decoration code generation [message #84551] Mon, 11 December 2006 10:03 Go to next message
Eclipse UserFriend
Originally posted by: joerg.weinmann.iese.fraunhofer.de

Hi!

I have a problem regarding the usage of Custom Decorations for Polylines
in the gmfgraph file. I would like to use my own decoration, but somehow
the code generator seems to skip my Custom Decoration child.


My gmfgraph looks like this:
...
<figures
xsi:type="gmfgraph:PolylineConnection"
referencingElements="EinsToZwei"
name="EinsToZweiFigure">
<children
xsi:type="gmfgraph:CustomDecoration"
name="compDeco"
qualifiedClassName="de.example.ui.CompartmentDecoration"
bundleName="Decorations"/>
<children
xsi:type="gmfgraph:Label"
referencingElements="EinsToZweiName"
name="EinsToZweiNameFigure"/>
<foregroundColor
xsi:type="gmfgraph:ConstantColor"
value="black"/>
</figures>
</figures>
...


The generated code internal Figure class in EinsToZweiEditPart.java looks
like this:

/**
* @generated
*/
public class EinsToZweiFigure extends
org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnection Ex {

/**
* @generated
*/
public EinsToZweiFigure() {
this.setForegroundColor(org.eclipse.draw2d.ColorConstants.bl ack

);
}

}


I guess, I did something wrong or missed to set some flag somewhere. Maybe
someone can give me hint?

Thanks,
Jörg Weinmann
Re: Custom Decoration code generation [message #84568 is a reply to message #84551] Mon, 11 December 2006 10:53 Go to previous message
Eclipse UserFriend
Originally posted by: joerg.weinmann.iese.fraunhofer.de

Ok, found the solution by my own.

I forgot to set the "Target Decoration" attribute of the Polyline
Connection node.

Thanks anyway,
Jörg Weinmann
Previous Topic:problem with managing layout model
Next Topic:Combining two generated editors
Goto Forum:
  


Current Time: Sat Oct 19 11:19:53 GMT 2024

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

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

Back to the top