Community
Participate
Working Groups
Build Identifier: Build id: I20091030-1201 I have created a file using GEF Flow example, When opened using Flow Example editor you can see that the a particular sub graph (parallel flow is not visible fully), I can implemented a flow chart using the same graphlayoutmanager principle in that this type of error occurs frequently. I will attach both files so that you can view them. Reproducible: Always Steps to Reproduce: 1.Take GEF Flow example plugin. 2.Run it as an eclipse application. 3.Open the attached layouterror.flow in GEF FLOW editor. 4.At the end of the diagram you can see a particular subgraph(parallel flow not visible fully)
Created attachment 156483 [details] GEF Flow Editor Example File
Created attachment 156484 [details] Same error visible in my implementation
Created attachment 156485 [details] Same error visible in my implementation
The problems seems to be the subgraphs which has no children.... public void contributeNodesToGraph(CompoundDirectedGraph graph, Subgraph s, Map map) { GraphAnimation.recordInitialState(getContentPane()); Subgraph me = new Subgraph(this, s); // me.rowOrder = getActivity().getSortIndex(); me.outgoingOffset = 5; me.incomingOffset = 5; IFigure fig = getFigure(); if (fig instanceof SubgraphFigure) { me.width = fig.getPreferredSize(me.width, me.height).width; int tagHeight = ((SubgraphFigure) fig).getHeader().getPreferredSize().height; me.insets.top = tagHeight; me.insets.left = 0; me.insets.bottom = tagHeight; } me.innerPadding = INNER_PADDING; me.setPadding(PADDING); map.put(this, me); graph.nodes.add(me); for (int i = 0; i < getChildren().size(); i++) { ActivityPart activity = (ActivityPart) getChildren().get(i); activity.contributeNodesToGraph(graph, me, map); } *if (getChildren().size() == 0) *{ * Object object = new Object(); * Node n = new Node(object, me); * n.outgoingOffset = getAnchorOffset(); * n.incomingOffset = getAnchorOffset(); * n.width = 10; * n.height = 10; * n.setPadding(new Insets(10, 8, 10, 12)); * map.put(object, n); * graph.nodes.add(n); *} } See the * code... if i add these line the result is different..
Any progress on this... will it be fixed or not????
Why do you think it's a CompoundGraphLayout problem? It's just a graph layout, has nothing to do with figure layout, clipping and rendering. The nodes that are clipped (to which connections are going, but nodes themselves don't show) most likely are children of the compartments (editparts other than the diagram editpart) the layout installed on figures of those editparts is not allowing for sizing the figure such that it fits its contents. If you had a ScrollPane than you'd be able to scroll to those editparts. What's the layout constraint for container (or compartment) editparts? (should be a rectangle (x,y,-1,-1))
(In reply to comment #6) > Why do you think it's a CompoundGraphLayout problem? Cuz as specified in comment 4 the problem is fixed when i add a dummy node to the subgraph > It's just a graph layout, has nothing to do with figure layout, clipping and > rendering. The nodes that are clipped (to which connections are going, but > nodes themselves don't show) most likely are children of the compartments > (editparts other than the diagram editpart) the layout installed on figures of > those editparts is not allowing for sizing the figure such that it fits its > contents. If you had a ScrollPane than you'd be able to scroll to those > editparts. What's the layout constraint for container (or compartment) > editparts? (should be a rectangle (x,y,-1,-1)) I have attached flowExample2.flow file which can be opened using GEF Flow editor example,once you open this file you will notice the bug,hence the issue is inherent in CompoundDirectedGraphLayout.some how when some subgraphs are empty or nested the CompoundDirectedGraphLayout fails to calculate the positions relative to subgraps ,instead it calculates them as absolute.
Created attachment 213055 [details] Problematic GEF FlowDiagram Something in the diagram's layout or rendering is not correct. A link is not attached to any visible element in the diagram