Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Directed Graph Problem
Directed Graph Problem [message #503328] Fri, 11 December 2009 22:16 Go to next message
wallross is currently offline wallrossFriend
Messages: 2
Registered: December 2009
Junior Member
Hi,

I'm trying to develop a GEF-based editor for a graph-based model. The editor is running within an RCP application. I've built an application with a
simple file browser. By double-clicking a model file, which contains a
serialized model object, the editor should open and present the
contained model object as a directed graph. At the current state of the
implementation, the model is opened within the editor, but unfortunately not displayed correctly.

The model is simply a graph, represented by its root node. The root node
might have several subnodes, which in turn may have subnodes and so on. I've created edit parts for the graph, the graph nodes and the connections between nodes. Following the flow example, I collect all the model nodes and edges within a CompoundDirectedGraph during the creation of the edit part tree. The CompoundDirectedGraph comprises of the graph's nodes and edges and one Subgraph, which contains all the other nodes and edges of the graph. I use the visit method of CompoundDirectedGraphLayout to arrange the model graph and then update the node and edge figure's location and size accordingly. I tested my implementation with a simple graph comprising of a root and two subnodes. However, when I view the resulting graph I only see the outer subgraph, the root node and one connection (not correctly located), but no other nodes.

As I found out, the edit part tree is created correctly and also the graph node's position and size is determined correctly. The list of nodes contained in the arranged CompoundDirectedGraph and their location and size is a s follows:

Node rootNode: position (74, 33,), size (50, 40), parent N(outerNode)
Node child1: position (33, 105), size (50, 40), parent N(outerNode)
Node child2: position (115, 105), size (50, 40), parent N(outerNode)
Node top(N(outerNode)): position (98, 16), size (5, 1), parent N(outerNode)
Node bottom(N(outerNode)): position (98, 161), size (5, 1), parent N(outerNode)


I have no idea, why only the the root node is displayed. Any suggestion of where the problem might be located is appreciated:(
Re: Directed Graph Problem [message #507416 is a reply to message #503328] Wed, 13 January 2010 12:28 Go to previous message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
Can you pls show a screen shot of the same....

also try without applying any grapf layout...
i.e apply gridlayout on root and subgraps...
to make shure that the problem is specific to DirectedGraphLayout...


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Previous Topic:Layout and Router??
Next Topic:Selection
Goto Forum:
  


Current Time: Thu Apr 25 01:35:21 GMT 2024

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

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

Back to the top