Bug 549945 - Graph with Single Node Width Error
Summary: Graph with Single Node Width Error
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF Zest (show other bugs)
Version: 5.1.0   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-09 14:22 EDT by Emily Gouge CLA
Modified: 2019-08-09 14:22 EDT (History)
0 users

See Also:


Attachments
Example of Problem (4.68 KB, application/octet-stream)
2019-08-09 14:22 EDT, Emily Gouge CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Gouge CLA 2019-08-09 14:22:22 EDT
Created attachment 279537 [details]
Example of Problem

I am using ZestContentViewer to display a graph structure.  When the graph has multiple nodes (with relationships) this works as expected.  When the graph has a single node I get the error below and nothing is displayed on the screen.

This is only a problem with the 201906180202 build of the GEF libraries.  I reverted back to the 201901221055 builds and everything works fine.

The attached JFaceColorExample.java reproduces the problem.

These are the versions in my target file that cause the problem:
org.eclipse.gef.fx.sdk.feature.group: 5.0.2.201906180202
org.eclipse.gef.geometry.sdk.feature.group: 5.0.2.201906180202
org.eclipse.gef.mvc.sdk.feature.group: 5.1.0.201906180202
org.eclipse.gef.zest.sdk.feature.group: 5.1.0.201906180202
org.eclipse.gef.layout.sdk.feature.group: 5.0.0.201906180202
org.eclipse.gef.graph.sdk.feature.group: 5.1.0.201906180202
org.eclipse.gef.common.sdk.feature.group: 5.0.0.201906180202

StackTrace:
java.lang.IllegalArgumentException: Cannot resize below mininmal width 0.01, so 0.009999999776482582 is no valid width
	at org.eclipse.gef.fx.nodes.GeometryNode.resize(GeometryNode.java:614)
	at org.eclipse.gef.zest.fx.parts.NodePart$2.resize(NodePart.java:276)
	at org.eclipse.gef.zest.fx.parts.NodePart.doRefreshVisual(NodePart.java:450)
	at org.eclipse.gef.zest.fx.parts.NodePart.doRefreshVisual(NodePart.java:1)
	at org.eclipse.gef.mvc.fx.parts.AbstractVisualPart.refreshVisual(AbstractVisualPart.java:657)
	at org.eclipse.gef.zest.fx.behaviors.NodeLayoutBehavior.postLayout(NodeLayoutBehavior.java:71)
	at org.eclipse.gef.zest.fx.behaviors.GraphLayoutBehavior.postLayout(GraphLayoutBehavior.java:333)
	at org.eclipse.gef.zest.fx.behaviors.GraphLayoutBehavior$1.run(GraphLayoutBehavior.java:61)
	at org.eclipse.gef.layout.LayoutContext.postLayout(LayoutContext.java:86)
	at org.eclipse.gef.layout.LayoutContext.applyLayout(LayoutContext.java:75)
	at org.eclipse.gef.zest.fx.behaviors.GraphLayoutBehavior.applyLayout(GraphLayoutBehavior.java:155)
	at org.eclipse.gef.zest.fx.behaviors.GraphLayoutBehavior$5.onChanged(GraphLayoutBehavior.java:93)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:164)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
	at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
	at javafx.base/javafx.collections.FXCollections$UnmodifiableObservableListImpl.lambda$new$0(FXCollections.java:955)
	at javafx.base/javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
	at org.eclipse.gef.common.collections.ListListenerHelperEx.notifyListChangeListeners(ListListenerHelperEx.java:650)
	at org.eclipse.gef.common.collections.ListListenerHelperEx.fireValueChangedEvent(ListListenerHelperEx.java:600)
	at org.eclipse.gef.common.collections.ObservableListWrapperEx.addAll(ObservableListWrapperEx.java:123)
	at org.eclipse.gef.mvc.fx.parts.AbstractVisualPart.addChildren(AbstractVisualPart.java:200)
	at org.eclipse.gef.mvc.fx.behaviors.ContentBehavior.lambda$1(ContentBehavior.java:487)
...