Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Diagram disappears after saving when one tries to edit
Diagram disappears after saving when one tries to edit [message #1042436] Tue, 16 April 2013 12:36 Go to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Hi.

I developed a custom editor, for which I contributed a customized EditorInput and where I reimplemented init in order to be possible to load directly the model file and generate diagram from it if necessary.

Everything runs ok. After opening I can edit and create new objects, however after Saving, the editor becomes unusable, graphic elements disappear, and I can't create anything.

Do you know what can be happening. Is this a symptom of issues with recordsets transactionaleditingdomains?

Thanks in advance

rui
Re: Diagram disappears after saving when one tries to edit [message #1042521 is a reply to message #1042436] Tue, 16 April 2013 14:29 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Rui,

not sure what happens here. Did you check what's being persisted on disk?

I haven't tried adding things to the diagram as you did it. There is an
example in the finished tutorial plugin in the SDK that add a context menu
entry to the project explorer that creates a new diagram and populates it
with some initial content, maybe that would be an option? See here:
http://git.eclipse.org/c/gmp/org.eclipse.gmp.graphiti.git/tree/examples/org.eclipse.graphiti.examples.tutorial/src/org/eclipse/graphiti/examples/tutorial/handlers

Michael
Re: Diagram disappears after saving when one tries to edit [message #1042614 is a reply to message #1042521] Tue, 16 April 2013 16:55 Go to previous messageGo to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Hi. Thanks.

That's the example I used. But I changed somethings such as:

I have an editor extending Graphiti DiagramEditor.
I have a custom class extending DefaultBehaviour which creates editingdomain. /resourceset

When I ask a Model file to be open, the init method trigers the creation of a custom diagraminput which contains naturally diagramURI, and also modelURI.

The diagramURI is created from modeluri changing the extension. Both are added to the diagrameditor resourceset.
Meanwhile, it is created the diagram and added to the respective resource, And the same way as it is in tutorial I dark-process my model elements. The diagram opens with everything but when I save it becomes zombie.


The content of the files is alright.

I could notice that I cannot do updates or layouts during dark-processing.

The dtp that I use for darkprocessing is not the one of the editor, because editor gives me a null DTP. So I create a new one via Graphiti API.

Thanks again





Re: Diagram disappears after saving when one tries to edit [message #1046862 is a reply to message #1042614] Mon, 22 April 2013 13:22 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Rui,

not sure, but maybe the creation of the diagraminput is the issue. There you
might need to distinguish between creating a new diagram and opening an
existing one?

Michael
Previous Topic:Problems using our own Meta-Model
Next Topic:Graphiti opens multiple tabs for the same file
Goto Forum:
  


Current Time: Fri Apr 19 03:18:10 GMT 2024

Powered by FUDForum. Page generated in 0.02044 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top