Changed default MMP selection pattern in the bld.inf import wizard; fix for Bug 9033.
authorstechong
Mon, 18 May 2009 13:55:32 -0500
changeset 158 8c2b8fd0f189
parent 157 d0e39a2b6afc
child 160 a1c84e703e97
child 173 5afc27b54777
Changed default MMP selection pattern in the bld.inf import wizard; fix for Bug 9033.
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/MMPSelectionUI.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/MMPSelectionUI.java	Mon May 18 13:18:25 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/MMPSelectionUI.java	Mon May 18 13:55:32 2009 -0500
@@ -56,6 +56,7 @@
 public class MMPSelectionUI extends Composite implements ISelectionProvider {
 
 	private static final String AUTOTEST_UID = ".uid"; //$NON-NLS-1$
+	private static int MMP_SELECTION_THRESHOLD = 3;
 
 	public final class FileInfo {
     	private int ordinal;
@@ -420,7 +421,12 @@
 		for (TableColumn tableColumn : columns) {
 			tableColumn.pack();
 		}
-		setAllChecked(true);
+		if (data.size() > MMP_SELECTION_THRESHOLD) {
+			setAllChecked(false);
+		}
+		else {
+			setAllChecked(true);
+		}
 	}
 	
     /**
@@ -585,4 +591,14 @@
 		}
 		return null;
 	}
+
+	/**
+	 * Set the MMP selection threshold. When number of MMPs <= threshold, all MMPs are selected by default.
+	 * When number of MMPs > threshold, no MMP is selected by default.
+	 * @param threshold - threshold for MMP selection
+	 */
+	public static void setMMPSelectionThreshold(int threshold) {
+		MMP_SELECTION_THRESHOLD = threshold;
+	}
+
 }