Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » "Diagram is not present" message when opening 2nd Editor (GMFResource not being updated correctly)
"Diagram is not present" message when opening 2nd Editor [message #989779] Fri, 07 December 2012 12:29 Go to previous message
Jim Clark is currently offline Jim Clark
Messages: 4
Registered: November 2012
Junior Member
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?
 
Read Message
Read Message
Read Message
Previous Topic:Only a type can be imported.
Next Topic:Default value of node attribute
Goto Forum:
  


Current Time: Tue May 21 09:50:57 EDT 2013

Powered by FUDForum. Page generated in 0.02018 seconds