changeset 7917:c157e2f9a534

[SCENEBUILDER] Fix latent bug in row/column jobs by using a LinkedHashSet instead of unsorted HashSet. This should fix the SB unit tests instability.
author slions
date Fri, 29 Aug 2014 15:54:49 +0200
parents 4c3674e9ab57
children 8a83d139c837
files apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddColumnConstraintsJob.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddColumnJob.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddRowConstraintsJob.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddRowJob.java
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddColumnConstraintsJob.java	Fri Aug 29 09:37:30 2014 -0400
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddColumnConstraintsJob.java	Fri Aug 29 15:54:49 2014 +0200
@@ -46,7 +46,7 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask;
 import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
 import java.util.ArrayList;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -101,7 +101,7 @@
             final FXOMInstance targetGridPane,
             final Set<Integer> targetIndexes) {
 
-        final Set<Job> result = new HashSet<>();
+        final Set<Job> result = new LinkedHashSet<>();
         final FXOMDocument fxomDocument = getEditorController().getFxomDocument();
 
         // Retrieve the constraints property for the specified target GridPane
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddColumnJob.java	Fri Aug 29 09:37:30 2014 -0400
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddColumnJob.java	Fri Aug 29 15:54:49 2014 +0200
@@ -45,8 +45,8 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -210,7 +210,7 @@
         final Selection selection = editorController.getSelection();
         final AbstractSelectionGroup asg = selection.getGroup();
 
-        final Set<Integer> result = new HashSet<>();
+        final Set<Integer> result = new LinkedHashSet<>();
 
         // Selection == GridPane columns
         // => return the list of selected columns
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddRowConstraintsJob.java	Fri Aug 29 09:37:30 2014 -0400
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddRowConstraintsJob.java	Fri Aug 29 15:54:49 2014 +0200
@@ -46,7 +46,7 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask;
 import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
 import java.util.ArrayList;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -101,7 +101,7 @@
             final FXOMInstance targetGridPane,
             final Set<Integer> targetIndexes) {
 
-        final Set<Job> result = new HashSet<>();
+        final Set<Job> result = new LinkedHashSet<>();
         final FXOMDocument fxomDocument = getEditorController().getFxomDocument();
 
         // Retrieve the constraints property for the specified target GridPane
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddRowJob.java	Fri Aug 29 09:37:30 2014 -0400
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/AddRowJob.java	Fri Aug 29 15:54:49 2014 +0200
@@ -45,8 +45,8 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -211,7 +211,7 @@
         final Selection selection = editorController.getSelection();
         final AbstractSelectionGroup asg = selection.getGroup();
 
-        final Set<Integer> result = new HashSet<>();
+        final Set<Integer> result = new LinkedHashSet<>();
 
         // Selection == GridPane rows
         // => return the list of selected rows