Bug 509561 - only fire one change for all SyncInfos added to the root set

This optimizes the case where many SyncInfos are added to the root set.
Instead of firing a change for every single added SyncInfo (which may
cause many selection changes), just fire one change per batch.
This issue is particularly important when many artifacts under version
control are changed during a build.

Change-Id: I79cdd54d39e53e83e1a7dd994c8d0f3baa3a51ea
Signed-off-by: Julian Honnen <julian.honnen@vector.com>
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java
index aad0687..3195a0a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java
@@ -235,6 +235,7 @@
     }
 
     protected void add(SyncInfo[] infos) {
+    	rootSet.beginInput();
         for (int i = 0; i < infos.length; i++) {
             SyncInfo info = infos[i];
             if (isLocalChange(info) && select(info)) {
@@ -255,6 +256,7 @@
                 }
             }
         }
+        rootSet.endInput(null);
     }
 
     private ChangeSet[] findChangeSets(SyncInfo info) {