Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Save gef diagram or view as xml file
Save gef diagram or view as xml file [message #1111415] Wed, 18 September 2013 07:24 Go to next message
vishwa ragha is currently offline vishwa raghaFriend
Messages: 1
Registered: September 2013
Junior Member
Hello,

Can any one please tell me how to save the gef diagram or view as xml file?
and i have attached gef diagram image file.

Thanks in advance,
vishwa
Re: Save gef diagram or view as xml file [message #1121158 is a reply to message #1111415] Mon, 30 September 2013 10:30 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi, you have to save the model of the editor.
Re: Save gef diagram or view as xml file [message #1132487 is a reply to message #1121158] Fri, 11 October 2013 07:19 Go to previous messageGo to next message
Igor Zapletnev is currently offline Igor ZapletnevFriend
Messages: 33
Registered: September 2012
Member
Hi Vishwa,

You don't need save your diagram into xml, it is enought to save your diagram model GraphicalViewer.setContent(... your model here...).
If the model of your editor is EMF model you can serialize your diagram into XMI format. EMF supports this out of box (take a look at XMIResource class).
But if you have your custom model (some java objects) you need to define custom serialization/deserialization.

Thanks,
Igor
Re: Save gef diagram or view as xml file [message #1220844 is a reply to message #1132487] Sat, 14 December 2013 07:08 Go to previous message
hiro nakag is currently offline hiro nakagFriend
Messages: 8
Registered: August 2010
Junior Member
Hi Vishwa,

I am using xstream for serialize my diagram model into XML format.

http://xstream.codehaus.org/

Xstream can serialze your model to XML and back again.
And you don't need to modify your model.
You save your model GraphicalViewer.setContent(new XStream().toXML(your model here)).

Best regards,
nakag
Previous Topic:Palette Entry Selection
Next Topic:Change EditPart figure dynamically
Goto Forum:
  


Current Time: Tue Mar 19 02:59:50 GMT 2024

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

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

Back to the top