As I told earlier , I have a multi page editor in which I have added as an instance of Diagram editor. I have not subclassed it. We don't actually persist the layout, it's a view only diagram with property sheets for editing. So the diagram file is actually for viewing .
We need to change the underlying Graphiti diagram file while we are reloading the model.
As the underlying diagram file will be different from the earlier one.
Once the model loaded, we need to recreate the UI and the Diagram because the diagram file contains the old information. Is it possible to set the diagram in the DiagramTypeProvider from a client editor ?. Generally if the setInput() method in the DiagramEditor is made public my problem is solved.
Please let me know if you have any other advice or if I was not clear in my question.
can you open the diagram file without UI, do your modifications, and
then open the editor? That would solve the issue, i guess.
After the initial open, do you generate a second file containing the modifications?
Depending on your situation calling refreshContent() on DiagramEditorInternal might help. If you remove the obsolete diagram from its resource before calling the method Graphiti will trigger a reload (if you want the reload happen from a different file you would have to update the URI in the DiagramEditorInput).