Hello guys,
I create a new _diagram by passing a model instance:
org.eclipse.gmf.runtime.notation.Diagram diagram = null;
try {
diagram = ViewService.createDiagram(modelInstance,
MyEditPart.MODEL_ID,
MyEditorPlugin.DIAGRAM_PREFERENCES_HINT);
diagram.setElement(modelInstance);
TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE
.createEditingDomain();
Resource diagramResource = editingDomain
.getResourceSet()
.createResource(
URI.createFileURI(location
+ "/modelInstance.mymodel_diagram"));
diagramResource.eSetDeliver(false);
diagramResource.getContents().add(diagram);
diagramResource.eSetDeliver(true);
diagramResource.save(null);
} catch (IOException e) {
e.printStackTrace();
}
Unfortunately, when I open this _diagram with the related Graphical Editor, the contained elements are layouted from the bottom to the top (it is an activity diagram, so the initial node is on the bottom of the diagram). What I want is that the elements are layouted from left to the right.
My question now: Is there a possibility to modify the auto/default layout behavior?