The hierarchy created by GMF is not easy to apprehend in the generated code.
The section below shows the association between the editparts and the figures.
This can be useful to understand how to correct default border widths for example when you want your figure to use the maximum surface available.
Edit parts hierarchy Figures hierarchy .... .... | +-... +-ContainerEditPart <------------------> +-org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure // created in the createNodePlate method | +-mypackage.diagram.edit.parts.ContainerEditPart$ContainerFigure // inner class of the EditPart's class | +-org.eclipse.draw2d.RectangleFigure // if your figure is a rectangle in the gmfgraph file +-ContainerCompartmentEditPart <----------> +-org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure // created in the createFigure method (and | | // casted to ResizableCompartmentFigure) | | // with a border and insets : (t=1, l=0, b=0, r=0) | +-org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure // Compartment generated for the compartment title | | +-org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel // label containing the compartment title) | | +- ... (sub nodes of the label) | +-org.eclipse.gmf.runtime.draw2d.ui.internal.figures.AnimatableScrollPane // with a margin border and insets : (t=5, l=5, b=5, r=5) | +-org.eclipse.draw2d.FreeformViewport | +-org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemsAwareFreeFormLayer +-ContainedItemEditPart <---------------------> +-org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure // created in the createNodePlate method | | // (as for the ContainerEditPart, see above) | +-... // same structure as for the ContainerEditPart node) +-...
Discussion