|"Diagram is not present" message when opening 2nd Editor [message #989779]
||Fri, 07 December 2012 17:29
| Jim Clark
Registered: November 2012
I've been following several guides on how to create multiple editors for a single model - primarily http://wiki.eclipse.org/Diagram_Partitioning.|
I have 1 editor for the model root and another for a node that gets opened on double click of the node.
The editors work well in isolation but I have an issue when I invoke the Open Behaviour on the node.
If I create a new diagram (root editor) then add two nodes and double click the first the node editor opens fine.
If I switch back to the root editor and double click the second node then I get the message "Cannot open input element. Reason: Diagram is not present in resource".
The message comes from my generated XXXDocumentProvider (Which has been modified to use a shared editing domain according to codeDOTgoogleDOTcom/p/gmftools/wiki/SharedEditingDomain).
When the first node editor is opened the DiagramImpl is in the GMFResource.
When the Second node editor is opened the DiagramImpl is NOT in the GMFResource.
If I save the root editor before opening the second node editor it open without error.
If I close the 1st node editor before opening the 2nd it will open without error. I would guess that this is because closing the 1st node editor triggers the save event that cleans up the model.
Any suggestions on what might be wrong or how best to investigate this further?
Powered by FUDForum
. Page generated in 0.01658 seconds