if I add some new Elements to my domain model (addressbook) programmatically, how can I update the shapes for rendering programmatically? Maybe I should extends the DefaultUpdateShapeFeature, but how should I call this extended class in the popupmenu?
E.g. I add a new contact via popupmenu of a shape with an SWT Dialog. After running the dialog the new contact is going to add to the emf addressbook model. The addressbook will render by a rectangle and the contacts are compartment in this rectangle rendered by ellipse. How to update this in the diagramm?
And another question is, how can I reuse the outline view for my domain model? With Eclipse Editor I can use the Adapter class. But how can I add this in graphiti editor?
Michael Wenz Messages: 1784 Registered: July 2009 Location: Walldorf, Germany
you may override the DefaultUpdateDiagramFeature that cares about updating
the complete diagram. It it registered by default for updates on diagram
level (see DefaultFeatureProvider.getUpdateFeature()). In your subclass you
may also check if all contacts are available in the diagram.
Regarding the outline: there is an example of an outline available in the
org.eclipse.graphiti.examples.common plugin. See the classes in package