Hi,
I have generated a diagram editor based on my ecore model and using the
dashboard. I need to create a custom project wizard during with the
project is setting up as well as a diagram file.
The diagram editor provides a class xxxxModelDiagramEditorUtil.
Therefore in my wizard I used the following call in order to create a
diagram file, like the wizard of the diagram editor plug-in would do:
xxxxModelDiagramEditorUtil.createAndOpenDiagram(
xxxxModelDiagramFileCreator.getInstance(),
diagramFolder.getFullPath(),
"top-level.diagram",
EditorUtil.getInitialContents(),
null,
workbench.getActiveWorkbenchWindow(),
monitor,true,true);
The generated file only contains the following:
<?xml version="1.0" encoding="UTF-8"?>
<org.example.mymodel:MyModel xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:org.example.mymodel="org.example.mymodel"
xmi:id="_v27PIBDvEduLQt8Jvx7xMg"/>
The diagram editor then complains that no diagram is defined in that
file, and when I look into a diagram file generated by the wizard into
the generated diagram editor plug-in, the file contains a bit more
definitions:
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:org.example.mymodel="org.example.mymodel"
xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.0/notation">
<org.example.mymodel:MyModel xmi:id="_gs2D4BDqEduuAoQ15k6jQA"/>
<notation:Diagram xmi:id="_guCWsBDqEduuAoQ15k6jQA" type="MyModel"
element="_gs2D4BDqEduuAoQ15k6jQA" name="top-level.diagram"
measurementUnit="Pixel">
<styles xmi:type="notation:PageStyle"
xmi:id="_guCWsRDqEduuAoQ15k6jQA"/>
<styles xmi:type="notation:GuideStyle"
xmi:id="_guCWshDqEduuAoQ15k6jQA"/>
<styles xmi:type="notation:DescriptionStyle"
xmi:id="_guCWsxDqEduuAoQ15k6jQA"/>
</notation:Diagram>
</xmi:XMI>
Does someboby have any idea why I get a diagram file not complete by
calling externally xxxxModelDiagramEditorUtil.createAndOpenDiagram ?
Thanks in advance...