Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [Zest] Export Graph or GraphViewer
[Zest] Export Graph or GraphViewer [message #1105173] Mon, 09 September 2013 13:09 Go to next message
Hans Wurst is currently offline Hans WurstFriend
Messages: 3
Registered: September 2013
Junior Member
Hi everybody,

in my application, i have a GraphViewer with a nested Graph that could be modified by the GUI (Nodes can be added and moved). Is it possible to export or save the complete Graph object into a file so that the user can import and visualize the Graph later in the same application?

Thanks a lot!
Re: [Zest] Export Graph or GraphViewer [message #1105702 is a reply to message #1105173] Tue, 10 September 2013 07:21 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
Senior Member
Hi,

this approach is not supported directly by Zest. What you can do as a workaround is the following:

1. Traverse all nodes and connections manually, and save them (in any format of your choosing, you are writing the load/save code), including position and size information
2. Create a new layout algorithm, that utilizes this saved position information, and after loading the graph apply this algorithm. You can use also implement some fallback that in case of layout information is missing, apply another layout.

Hope, the idea is clear,
Zoltán
Re: [Zest] Export Graph or GraphViewer [message #1106024 is a reply to message #1105173] Tue, 10 September 2013 15:28 Go to previous messageGo to next message
Fabian Steeg is currently offline Fabian SteegFriend
Messages: 76
Registered: July 2009
Member
Hi,

two more suggestions:

- Not sure if this would work, but did you consider persisting the Graph object using Java Serialization?
- If the graph is simple, you could consider using the textual DOT representation supported in GEF4

Cheers,
Fabian
Re: [Zest] Export Graph or GraphViewer [message #1112170 is a reply to message #1105173] Thu, 19 September 2013 08:00 Go to previous message
Hans Wurst is currently offline Hans WurstFriend
Messages: 3
Registered: September 2013
Junior Member
Hi,

thanks for your replies. I tried serialization, but i didn't work because the dependencies of graph objects to the framework are to deep.

I've implemented now a simple algorithm that saves only positions, size and other properties within a .xml file. That's enough for me;)

Regards
Previous Topic:move edit parts with key board
Next Topic:[Zest] Editable (movable) connections in ManhattanRouter
Goto Forum:
  


Current Time: Fri Apr 26 16:42:45 GMT 2024

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

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

Back to the top