Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Save and Restore Models to file
Save and Restore Models to file [message #1799823] Fri, 14 December 2018 09:27 Go to next message
cenk Mising name is currently offline cenk Mising nameFriend
Messages: 159
Registered: July 2009
Senior Member
On gef5
What is best way to store/restore to file all contents defined on contentviewer.
I want to save and open graphics editor.

On gef3 we have used "public void doSave(IProgressMonitor monitor)" method of GraphicalEditorWithFlyoutPalette

What is best solution for Gef5

Thank you

Re: Save and Restore Models to file [message #1799917 is a reply to message #1799823] Mon, 17 December 2018 13:12 Go to previous message
Patrick Muscat is currently offline Patrick MuscatFriend
Messages: 14
Registered: May 2018
Junior Member

GEF5 main goal is the representation of the model. Changes on the model are made through doAdd/RemoveContent for children (the Parts) and doAdd/RemoveAnchorage for connections. These methods can apply changes immediatly or in a "transaction" which can be commited at user will (Ctrl-S or save button).

So it is the model responsibility to persist its state and GEF5 is completly independant, even for the "save" request handling. In our case, the model is hosted by EMF, the "save" shortcut and toolbar for the save button (undo, ...) are managed by E4. Save action just commits an EMF transaction, GEF5 is not involved.

It should be pretty easy to let the GEF5 diagram container provide the save button and handle save action since the data modeled by GEF5 is available for the container.
Previous Topic:How create shortcut key for zoom in/out
Next Topic:[Zest] Layout implementations and node overlapping
Goto Forum:

Current Time: Sat Jul 13 06:55:34 GMT 2024

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

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

Back to the top