changeset 7986:1ee3a7bd1e00

[SCENEBUILDER] Remove no more needed call to UpdateSelection/ClearSelection sub jobs
author slions
date Fri, 05 Sep 2014 10:33:31 +0200
parents a2948aa2ab67
children 58cf377bf093
files apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/ModifySelectionJob.java
diffstat 1 files changed, 6 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/ModifySelectionJob.java	Fri Sep 05 10:11:40 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/ModifySelectionJob.java	Fri Sep 05 10:33:31 2014 +0200
@@ -34,8 +34,6 @@
 import com.oracle.javafx.scenebuilder.kit.editor.job.atomic.ModifyObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
 import com.oracle.javafx.scenebuilder.kit.editor.i18n.I18N;
-import com.oracle.javafx.scenebuilder.kit.editor.job.atomic.BackupSelectionJob;
-import com.oracle.javafx.scenebuilder.kit.editor.job.atomic.UpdateSelectionJob;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.GridSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.ObjectSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.Selection;
@@ -99,7 +97,7 @@
             assert selection.getGroup() == null : "Add implementation for " + selection.getGroup();
         }
 
-        // First add ModifyObject jobs
+        // Add ModifyObject jobs
         for (FXOMInstance fxomInstance : candidates) {
             final ModifyObjectJob subJob = new ModifyObjectJob(
                     fxomInstance, propertyMetadata, newValue, getEditorController());
@@ -107,14 +105,7 @@
                 result.add(subJob);
             }
         }
-
-        // If the list of ModifyObject jobs is not empty,
-        // then add selection specific jobs
-        if (result.isEmpty() == false) {
-            result.add(0, new BackupSelectionJob(getEditorController()));
-            result.add(new UpdateSelectionJob(selection.getGroup(), getEditorController()));
-        }
-
+        
         return result;
     }
 
@@ -123,22 +114,21 @@
         final String result;
         final List<Job> subJobs = getSubJobs();
         final int subJobCount = subJobs.size();
-        assert (subJobCount == 0) || (subJobCount >= 3);
 
         switch (subJobCount) {
             case 0:
                 result = "Unexecutable Set"; //NOI18N
                 break;
-            case 3: // BackupSelection + 1 ModifyObject + UpdateSelection
-                result = subJobs.get(1).getDescription();
+            case 1: // Single selection
+                result = subJobs.get(0).getDescription();
                 break;
             default:
                 result = I18N.getString("label.action.edit.set.n",
                         propertyMetadata.getName().toString(),
-                        subJobCount - 2); // Remove 2 selection jobs (BackupSelection + UpdateSelection) 
+                        subJobCount);
                 break;
         }
-
+        
         return result;
     }
 }