Community
Participate
Working Groups
Created attachment 113228 [details] image of correct and buggy graph display Build ID: I20080617-2000 Steps To Reproduce: 1. Create a 'Hello World' RCP app 2. Create a view using a Zest GraphViewer and add this view to the perspective so that it will be displayed on start up. 3. For the content provider to the viewer, create a graph with 1 central node connected by to four others. (i.e., 5 nodes, 4 edges). 4. Run the RCP app - sometimes the graph displays properly, sometimes nodes and edges are missing. More information: This is from GEF newsgroup thread 'Re: strange zest rendering in RCP?' started 12/9/08. I have discovered that it only seems to happen when the view appears from application startup. I have added a Window->ShowView action to the menubar, and if I close the graphview, and reopen it, the graph appears fine. The model is 4 source nodes connected to a central destination node Node1 | | | Node2 ----> CentralNode<------Node 3 | | | Node4 When running from start up, the central node, 1 edge, and and 1 source node appear in the view, and another node with a self edge but no label. Two nodes are missing completely. I.e., A node -------------> CentralNode Another_unconnected_node This is actually pretty consistent - so the central node always appears, and 2 others. This is using the 'GraphViewer' class in a custom view class that extends ViewPart, and is contributed via the plugin.xml, in exactly the same way as the 'Hello World' RCP view. The 'createPartControl' method of the view: public void createPartControl(Composite parent) { viewer = new GraphViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new MyLabelProvider()); viewer.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED); viewer.setLayoutAlgorithm(new SpringLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING)); viewer.setInput(getInput()); // hardcoded test model data getSite().setSelectionProvider(viewer); setPartName("SBML view"); } MyLabelProvider is a simple implementation of IEntityStyleProvider ViewContentProvider implements IGraphContentPRovider and returns a hardcoded content.
Re-assigning back to inbox, as Ian is no longer active committer.