Make sure dynamic platforms are reported in alphabetical order to appease tests (and be consistent between Windows and Unix)
authorEd Swartz <ed.swartz@nokia.com>
Fri, 04 Dec 2009 14:46:25 -0600
changeset 633 1bb6b7462d64
parent 632 4a8b1092f0a4
child 634 baa31ffa93b5
Make sure dynamic platforms are reported in alphabetical order to appease tests (and be consistent between Windows and Unix)
core/com.nokia.carbide.cpp.sdk.core.test/src/com/nokia/carbide/cpp/sdk/core/test/SBVCatalogTest.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/BSFCatalog.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBVCatalog.java
--- a/core/com.nokia.carbide.cpp.sdk.core.test/src/com/nokia/carbide/cpp/sdk/core/test/SBVCatalogTest.java	Fri Dec 04 14:38:14 2009 -0600
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/src/com/nokia/carbide/cpp/sdk/core/test/SBVCatalogTest.java	Fri Dec 04 14:46:25 2009 -0600
@@ -148,17 +148,4 @@
 		
 		
 	}
-	
-	/**
-	 * @param built
-	 * @param string
-	 * @return
-	 */
-	private boolean findPlatform(ISBVPlatform[] platforms, String string) {
-		for (ISBVPlatform platform : platforms)
-			if (platform.getName().equalsIgnoreCase(string))
-				return true;
-		return false;
-	}
-
 }
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/BSFCatalog.java	Fri Dec 04 14:38:14 2009 -0600
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/BSFCatalog.java	Fri Dec 04 14:46:25 2009 -0600
@@ -49,6 +49,9 @@
 			return;
 		}
 		
+		// sort by alphabetical order
+		Arrays.sort(bsfFiles); 
+		
 		// gather the individual BSF platforms
 		for (File bsfFile : bsfFiles) {
 			IPath bsfPath = new Path(bsfFile.getAbsolutePath());
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBVCatalog.java	Fri Dec 04 14:38:14 2009 -0600
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBVCatalog.java	Fri Dec 04 14:46:25 2009 -0600
@@ -16,6 +16,7 @@
 import java.io.FilenameFilter;
 import java.text.MessageFormat;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import org.eclipse.core.runtime.IPath;
@@ -50,6 +51,9 @@
 			return;
 		}
 		
+		// sort alphabetically
+		Arrays.sort(sbvFiles);
+		
 		// gather the individual SBV platforms
 		for (File sbvFile : sbvFiles) {
 			IPath sbvPath = new Path(sbvFile.getAbsolutePath());