I am currently writing a plugin that needs to embed UML diagrams (from possibly different modeling tools) within a GEF editor. I already downloaded the source code of Papyrus in order to figure out how load the diagram *.di file and create the respective edit part. Since I am not using the GMF framework for my editor, I have no clue what is needed and what not The embedded diagram does not need any editing functionality at all, it should just display the diagram in a configurable size and update the view if some external editor modifies the UML model or the DI resource.
Basically, dependencies on GMF are not a problem at all. I want to provide some sort of connector which connects diagrams of different modeling tools with my application. At the moment, I am trying to load the DI file using the following code:
In Papyrus, we can display several diagram in the same editor.
To do that, we have design a model that references diagrams , this is the SashModel org.eclipse.papyrus.sasheditor.di\model\di.ecore
In this model, we can know where is put the diagram which dimension, etc... I understand that the di file can confuse developers.
The only thing that annoys me is that somehow all layout information is lost, including placement of diagram elements and their sizes. However, if i use the CopyToImageUtil of GMF, the resulting image contains the correct diagram.