1. Enhance Source Files selection in msa:
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 21 Jul 2006 02:56:30 +0000 (02:56 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 21 Jul 2006 02:56:30 +0000 (02:56 +0000)
   a. Can select multiple files one time
   b. Totally same file can be added once
2. Separate sort functions from Tools.java to Sort.java
3. Fix a bug of new function: to create directory first if the file's directory doesn't exist
4. Adjust some file's coding style

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1058 6f19259b-4bc3-4df7-8a09-765794883524

13 files changed:
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/About.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/Identification.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/SaveFile.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Sort.java [new file with mode: 0644]
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdVector.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesIdentification.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesVector.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/MsaHeader.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SourceFilesDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java

index 8a2c682..fe97d8a 100644 (file)
@@ -63,7 +63,7 @@ public class About extends IDialog {
     private JButton getJButtonOK() {\r
         if (jButtonOK == null) {\r
             jButtonOK = new JButton();\r
-            jButtonOK.setBounds(new java.awt.Rectangle(115,200,90,20));\r
+            jButtonOK.setBounds(new java.awt.Rectangle(115, 200, 90, 20));\r
             jButtonOK.setText("OK");\r
             jButtonOK.addActionListener(this);\r
         }\r
@@ -83,15 +83,15 @@ public class About extends IDialog {
         super();\r
         init();\r
     }\r
-    \r
+\r
     /**\r
-    This is the default constructor\r
-    \r
-    **/\r
-   public About(IFrame parentFrame, boolean modal) {\r
-       super(parentFrame, modal);\r
-       init();\r
-   }\r
+     This is the default constructor\r
+     \r
+     **/\r
+    public About(IFrame parentFrame, boolean modal) {\r
+        super(parentFrame, modal);\r
+        init();\r
+    }\r
 \r
     /**\r
      This method initializes this\r
@@ -114,25 +114,25 @@ public class About extends IDialog {
     private JPanel getJContentPane() {\r
         if (jContentPane == null) {\r
             jLabelImage = new JLabel();\r
-            jLabelImage.setBounds(new java.awt.Rectangle(63,20,193,58));\r
+            jLabelImage.setBounds(new java.awt.Rectangle(63, 20, 193, 58));\r
             jLabelImage.setIcon(new ImageIcon(getClass().getResource("/resources/images/logo.gif")));\r
-            \r
+\r
             jLabel2 = new JLabel();\r
-            jLabel2.setBounds(new java.awt.Rectangle(25,160,270,20));\r
+            jLabel2.setBounds(new java.awt.Rectangle(25, 160, 270, 20));\r
             jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r
             jLabel2.setText("All rights reserved");\r
             jLabel1 = new JLabel();\r
-            jLabel1.setBounds(new java.awt.Rectangle(25,130,270,20));\r
+            jLabel1.setBounds(new java.awt.Rectangle(25, 130, 270, 20));\r
             jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r
             jLabel1.setText("Copyright (c) 2006, Intel Corporation");\r
             jLabel = new JLabel();\r
             jLabel.setToolTipText("");\r
-            jLabel.setBounds(new java.awt.Rectangle(25,90,270,20));\r
+            jLabel.setBounds(new java.awt.Rectangle(25, 90, 270, 20));\r
             jLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r
             jLabel.setText(DataType.PROJECT_NAME + " " + DataType.PROJECT_VERSION);\r
             jContentPane = new JPanel();\r
             jContentPane.setLayout(null);\r
-            jContentPane.setSize(new java.awt.Dimension(320,235));\r
+            jContentPane.setSize(new java.awt.Dimension(320, 235));\r
             jContentPane.add(jLabel, null);\r
             jContentPane.add(jLabel1, null);\r
             jContentPane.add(jLabel2, null);\r
index a03dfac..bf050e0 100644 (file)
@@ -307,7 +307,7 @@ public class EnumerationData {
         vModuleType.addElement("UEFI_DRIVER");\r
         vModuleType.addElement("UEFI_APPLICATION");\r
         vModuleType.addElement("USER_DEFINED");\r
-        Tools.sortVectorString(vModuleType, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortVectorString(vModuleType, DataType.SORT_TYPE_ASCENDING);\r
     }\r
     \r
 //    private void initComponentType() {\r
@@ -363,7 +363,7 @@ public class EnumerationData {
         vFrameworkModuleTypes.addElement("UEFI_DRIVER");\r
         vFrameworkModuleTypes.addElement("UEFI_APPLICATION");\r
         vFrameworkModuleTypes.addElement("USER_DEFINED");\r
-        Tools.sortVectorString(vFrameworkModuleTypes, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortVectorString(vFrameworkModuleTypes, DataType.SORT_TYPE_ASCENDING);\r
     }\r
 \r
     private void initLibClassDef() {\r
index 4affb03..bc29647 100644 (file)
@@ -17,69 +17,65 @@ package org.tianocore.frameworkwizard.common.Identifications;
 \r
 public class Identification {\r
 \r
-       ///\r
-       /// Define class members\r
-       ///\r
+    ///\r
+    /// Define class members\r
+    ///\r
     private String name;\r
-    \r
+\r
     private String guid;\r
-    \r
+\r
     private String version;\r
-    \r
+\r
     private String path;\r
-    \r
+\r
     public Identification(String name, String guid, String version) {\r
         this.name = name;\r
         this.guid = guid;\r
         this.version = version;\r
     }\r
-    \r
+\r
     public Identification() {\r
-       \r
+\r
     }\r
-    \r
+\r
     public Identification(String name, String guid, String version, String path) {\r
-       this.name = name;\r
+        this.name = name;\r
         this.guid = guid;\r
         this.version = version;\r
         this.path = path;\r
     }\r
-    \r
+\r
     public boolean equals(Object obj) {\r
-      if (obj instanceof Identification) {\r
-          Identification id = (Identification)obj;\r
-          if (path.equals(id.path)) {\r
-          //if ( name.equals(id.name) && guid.equals(id.guid) && version.equals(id.version)) {\r
-              return true;\r
-          }\r
-          return false;\r
-      }\r
-      else {\r
-          return super.equals(obj);\r
-      }\r
-  }\r
-    \r
+        if (obj instanceof Identification) {\r
+            Identification id = (Identification) obj;\r
+            if (path.equals(id.path)) {\r
+                //if ( name.equals(id.name) && guid.equals(id.guid) && version.equals(id.version)) {\r
+                return true;\r
+            }\r
+            return false;\r
+        } else {\r
+            return super.equals(obj);\r
+        }\r
+    }\r
+\r
     public boolean equalsWithGuid(Object obj) {\r
-      if (obj instanceof Identification) {\r
-          Identification id = (Identification)obj;\r
-          if ( guid.equalsIgnoreCase(id.guid)) {\r
-              if (version == null || id.version == null) {\r
-                  return true;\r
-              }\r
-              else if (version.trim().equalsIgnoreCase("") || id.version.trim().equalsIgnoreCase("")){\r
-                  return true;\r
-              }\r
-              else if (version.equalsIgnoreCase(id.version)) {\r
-                  return true;\r
-              }\r
-          }\r
-          return false;\r
-      }\r
-      else {\r
-          return super.equals(obj);\r
-      }\r
-   }\r
-    \r
+        if (obj instanceof Identification) {\r
+            Identification id = (Identification) obj;\r
+            if (guid.equalsIgnoreCase(id.guid)) {\r
+                if (version == null || id.version == null) {\r
+                    return true;\r
+                } else if (version.trim().equalsIgnoreCase("") || id.version.trim().equalsIgnoreCase("")) {\r
+                    return true;\r
+                } else if (version.equalsIgnoreCase(id.version)) {\r
+                    return true;\r
+                }\r
+            }\r
+            return false;\r
+        } else {\r
+            return super.equals(obj);\r
+        }\r
+    }\r
+\r
     public void setName(String name) {\r
         this.name = name;\r
     }\r
@@ -91,10 +87,10 @@ public class Identification {
     public void setVersion(String version) {\r
         this.version = version;\r
     }\r
-    \r
-       public void setPath(String path) {\r
-               this.path = path;\r
-       }\r
+\r
+    public void setPath(String path) {\r
+        this.path = path;\r
+    }\r
 \r
     public String getGuid() {\r
         return guid;\r
@@ -108,11 +104,11 @@ public class Identification {
         return version;\r
     }\r
 \r
-       public String getPath() {\r
-               return path;\r
-       }\r
\r
public int hashCode(){\r
-   return guid.toLowerCase().hashCode();\r
- }\r
+    public String getPath() {\r
+        return path;\r
+    }\r
+\r
   public int hashCode() {\r
+        return guid.toLowerCase().hashCode();\r
   }\r
 }\r
index 5d5ab9f..e282522 100644 (file)
@@ -36,8 +36,13 @@ public class SaveFile {
      \r
      **/\r
     public static void main(String[] args) {\r
-        // TODO Auto-generated method stub\r
-\r
+        \r
+    }\r
+    \r
+    private static void createDirectory(String path) throws Exception {\r
+        File f = new File(path);\r
+        path = f.getParent();\r
+        FileOperation.newFolder(path);\r
     }\r
 \r
     /**\r
@@ -45,6 +50,11 @@ public class SaveFile {
      \r
      **/\r
     public static void saveMsaFile(String path, ModuleSurfaceArea msa) throws Exception {\r
+        //\r
+        // Create the file's directory first\r
+        //\r
+        createDirectory(path);\r
+        \r
         //\r
         // Remove all empty top level elements\r
         //\r
@@ -225,6 +235,11 @@ public class SaveFile {
      \r
      **/\r
     public static void saveSpdFile(String path, PackageSurfaceArea spd) throws Exception {\r
+        //\r
+        // Create the file's directory first\r
+        //\r
+        createDirectory(path);\r
+        \r
         PackageSurfaceAreaDocument spdDoc = PackageSurfaceAreaDocument.Factory.newInstance();\r
         File f = new File(path);\r
 \r
@@ -254,6 +269,11 @@ public class SaveFile {
      \r
      **/\r
     public static void saveFpdFile(String path, PlatformSurfaceArea fpd) throws Exception {\r
+        //\r
+        // Create the file's directory first\r
+        //\r
+        createDirectory(path);\r
+        \r
         PlatformSurfaceAreaDocument fpdDoc = PlatformSurfaceAreaDocument.Factory.newInstance();\r
         File f = new File(path);\r
 \r
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Sort.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Sort.java
new file mode 100644 (file)
index 0000000..88fe64e
--- /dev/null
@@ -0,0 +1,239 @@
+/** @file\r
\r
+ The file is used to provide all kinds of sorting method \r
\r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution.  The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
+ **/\r
+\r
+package org.tianocore.frameworkwizard.common;\r
+\r
+import java.util.Vector;\r
+\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
+import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdIdentification;\r
+import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdVector;\r
+import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
+import org.tianocore.frameworkwizard.platform.PlatformIdentification;\r
+\r
+public class Sort {\r
+\r
+    /**\r
+     Sort all elements in the vector as the specific sort type\r
+     \r
+     @param v The vector need to be sorted\r
+     @param mode Sort type DataType.Sort_Type_Ascendin and DataType.Sort_Type_Descending\r
+\r
+     **/\r
+    public static void sortVectorString(Vector<String> v, int mode) {\r
+        if (v != null) {\r
+            for (int indexI = 0; indexI < v.size(); indexI++) {\r
+                for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
+                    if ((v.get(indexJ).compareTo(v.get(indexI)) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
+                        || (v.get(indexI).compareTo(v.get(indexJ)) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
+                        String temp = v.get(indexI);\r
+                        v.setElementAt(v.get(indexJ), indexI);\r
+                        v.setElementAt(temp, indexJ);\r
+                    }\r
+                }\r
+            }\r
+        }\r
+    }\r
+\r
+    /**\r
+     Sort all elements of vector and return sorted sequence\r
+     \r
+     @param v The vector need to be sorted\r
+     @param mode Sort type DataType.Sort_Type_Ascendin and DataType.Sort_Type_Descending\r
+     @return Vector<Integer> The sorted sequence\r
+     \r
+     **/\r
+    public static Vector<Integer> getVectorSortSequence(Vector<String> v, int mode) {\r
+        Vector<Integer> vSequence = new Vector<Integer>();\r
+        //\r
+        // Init sequence\r
+        //\r
+        if (v != null) {\r
+            for (int index = 0; index < v.size(); index++) {\r
+                vSequence.addElement(index);\r
+            }\r
+        }\r
+\r
+        //\r
+        // sort and get new sequence\r
+        //\r
+        for (int indexI = 0; indexI < v.size(); indexI++) {\r
+            for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
+                if ((v.get(indexJ).compareTo(v.get(indexI)) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
+                    || (v.get(indexI).compareTo(v.get(indexJ)) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
+                    //\r
+                    // Swap strings\r
+                    //\r
+                    String tempStr = v.get(indexI);\r
+                    v.setElementAt(v.get(indexJ), indexI);\r
+                    v.setElementAt(tempStr, indexJ);\r
+\r
+                    //\r
+                    // Swap sequences\r
+                    //\r
+                    int tempInt = vSequence.get(indexI);\r
+                    vSequence.setElementAt(vSequence.get(indexJ), indexI);\r
+                    vSequence.setElementAt(tempInt, indexJ);\r
+                }\r
+            }\r
+        }\r
+\r
+        return vSequence;\r
+    }\r
+\r
+    /**\r
+     Sort all elements of vector as input sequence\r
+     \r
+     @param v The vector need to be sorted\r
+     @param vSequence The sort sequence should be followed\r
+     \r
+     **/\r
+    public static void sortVectorString(Vector<String> v, Vector<Integer> vSequence) {\r
+        if (v != null && vSequence != null && v.size() == vSequence.size()) {\r
+            Vector<String> tempV = new Vector<String>();\r
+            for (int index = 0; index < v.size(); index++) {\r
+                tempV.addElement(v.get(index));\r
+            }\r
+            for (int index = 0; index < v.size(); index++) {\r
+                v.setElementAt(tempV.get(vSequence.get(index)), index);\r
+            }\r
+        }\r
+    }\r
+\r
+    /**\r
+     Sort all modules\r
+     \r
+     @param v\r
+     @param mode\r
+     \r
+     **/\r
+    public static void sortModules(Vector<ModuleIdentification> v, int mode) {\r
+        if (v != null) {\r
+            //\r
+            // sort by name\r
+            //\r
+            for (int indexI = 0; indexI < v.size(); indexI++) {\r
+                for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
+                    if ((v.get(indexJ).getName().compareTo(v.get(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
+                        || (v.get(indexI).getName().compareTo(v.get(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
+                        ModuleIdentification temp = v.get(indexI);\r
+                        v.setElementAt(v.get(indexJ), indexI);\r
+                        v.setElementAt(temp, indexJ);\r
+                    }\r
+                }\r
+            }\r
+        }\r
+    }\r
+\r
+    /**\r
+     Sort all packages\r
+     \r
+     @param v\r
+     @param mode\r
+     \r
+     **/\r
+    public static void sortPackages(Vector<PackageIdentification> v, int mode) {\r
+        if (v != null) {\r
+            //\r
+            // sort by name\r
+            //\r
+            for (int indexI = 0; indexI < v.size(); indexI++) {\r
+                for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
+                    if ((v.get(indexJ).getName().compareTo(v.get(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
+                        || (v.get(indexI).getName().compareTo(v.get(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
+                        PackageIdentification temp = v.get(indexI);\r
+                        v.setElementAt(v.get(indexJ), indexI);\r
+                        v.setElementAt(temp, indexJ);\r
+                    }\r
+                }\r
+            }\r
+        }\r
+    }\r
+\r
+    /**\r
+     Sort all platforms\r
+     \r
+     @param v\r
+     @param mode\r
+     \r
+     **/\r
+    public static void sortPlatforms(Vector<PlatformIdentification> v, int mode) {\r
+        if (v != null) {\r
+            //\r
+            // sort by name\r
+            //\r
+            for (int indexI = 0; indexI < v.size(); indexI++) {\r
+                for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
+                    if ((v.get(indexJ).getName().compareTo(v.get(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
+                        || (v.get(indexI).getName().compareTo(v.get(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
+                        PlatformIdentification temp = v.get(indexI);\r
+                        v.setElementAt(v.get(indexJ), indexI);\r
+                        v.setElementAt(temp, indexJ);\r
+                    }\r
+                }\r
+            }\r
+        }\r
+    }\r
+\r
+    /**\r
+     Sort all pcd entries\r
+     \r
+     @param v\r
+     @param mode\r
+     \r
+     **/\r
+    public static void sortPcds(PcdVector v, int mode) {\r
+        if (v != null) {\r
+            //\r
+            // sort by name\r
+            //\r
+            for (int indexI = 0; indexI < v.size(); indexI++) {\r
+                for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
+                    if ((v.getPcd(indexJ).getName().compareTo(v.getPcd(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
+                        || (v.getPcd(indexI).getName().compareTo(v.getPcd(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
+                        PcdIdentification temp = v.getPcd(indexI);\r
+                        v.setPcd(v.getPcd(indexJ), indexI);\r
+                        v.setPcd(temp, indexJ);\r
+                    }\r
+                }\r
+            }\r
+        }\r
+    }\r
+\r
+    /**\r
+     Sort all objects of a vector based on the object's "toString"\r
+     \r
+     @param v\r
+     @param mode\r
+     \r
+     **/\r
+    public static void sortObjectVector(Vector<Object> v, int mode) {\r
+        if (v != null) {\r
+            //\r
+            // sort by name\r
+            //\r
+            for (int indexI = 0; indexI < v.size(); indexI++) {\r
+                for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
+                    if ((v.get(indexJ).toString().compareTo(v.get(indexI).toString()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
+                        || (v.get(indexI).toString().compareTo(v.get(indexJ).toString()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
+                        Object temp = v.get(indexI);\r
+                        v.setElementAt(v.get(indexJ), indexI);\r
+                        v.setElementAt(temp, indexJ);\r
+                    }\r
+                }\r
+            }\r
+        }\r
+    }\r
+}\r
index 0bfca45..26604d0 100644 (file)
@@ -27,12 +27,6 @@ import javax.swing.JComboBox;
 import javax.swing.JList;\r
 import javax.swing.JOptionPane;\r
 \r
-import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
-import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdIdentification;\r
-import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdVector;\r
-import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
-import org.tianocore.frameworkwizard.platform.PlatformIdentification;\r
-\r
 /**\r
  The class is used to provides some useful interfaces  \r
  \r
@@ -342,191 +336,4 @@ public class Tools {
         }\r
         return arg0;\r
     }\r
-\r
-    /**\r
-     Sort all elements in the vector as the specific sort type\r
-     \r
-     @param v The vector need to be sorted\r
-     @param mode Sort type DataType.Sort_Type_Ascendin and DataType.Sort_Type_Descending\r
-\r
-     **/\r
-    public static void sortVectorString(Vector<String> v, int mode) {\r
-        if (v != null) {\r
-            for (int indexI = 0; indexI < v.size(); indexI++) {\r
-                for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
-                    if ((v.get(indexJ).compareTo(v.get(indexI)) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
-                        || (v.get(indexI).compareTo(v.get(indexJ)) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
-                        String temp = v.get(indexI);\r
-                        v.setElementAt(v.get(indexJ), indexI);\r
-                        v.setElementAt(temp, indexJ);\r
-                    }\r
-                }\r
-            }\r
-        }\r
-    }\r
-\r
-    /**\r
-     Sort all elements of vector and return sorted sequence\r
-     \r
-     @param v The vector need to be sorted\r
-     @param mode Sort type DataType.Sort_Type_Ascendin and DataType.Sort_Type_Descending\r
-     @return Vector<Integer> The sorted sequence\r
-     \r
-     **/\r
-    public static Vector<Integer> getVectorSortSequence(Vector<String> v, int mode) {\r
-        Vector<Integer> vSequence = new Vector<Integer>();\r
-        //\r
-        // Init sequence\r
-        //\r
-        if (v != null) {\r
-            for (int index = 0; index < v.size(); index++) {\r
-                vSequence.addElement(index);\r
-            }\r
-        }\r
-\r
-        //\r
-        // sort and get new sequence\r
-        //\r
-        for (int indexI = 0; indexI < v.size(); indexI++) {\r
-            for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
-                if ((v.get(indexJ).compareTo(v.get(indexI)) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
-                    || (v.get(indexI).compareTo(v.get(indexJ)) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
-                    //\r
-                    // Swap strings\r
-                    //\r
-                    String tempStr = v.get(indexI);\r
-                    v.setElementAt(v.get(indexJ), indexI);\r
-                    v.setElementAt(tempStr, indexJ);\r
-\r
-                    //\r
-                    // Swap sequences\r
-                    //\r
-                    int tempInt = vSequence.get(indexI);\r
-                    vSequence.setElementAt(vSequence.get(indexJ), indexI);\r
-                    vSequence.setElementAt(tempInt, indexJ);\r
-                }\r
-            }\r
-        }\r
-\r
-        return vSequence;\r
-    }\r
-\r
-    /**\r
-     Sort all elements of vector as input sequence\r
-     \r
-     @param v The vector need to be sorted\r
-     @param vSequence The sort sequence should be followed\r
-     \r
-     **/\r
-    public static void sortVectorString(Vector<String> v, Vector<Integer> vSequence) {\r
-        if (v != null && vSequence != null && v.size() == vSequence.size()) {\r
-            Vector<String> tempV = new Vector<String>();\r
-            for (int index = 0; index < v.size(); index++) {\r
-                tempV.addElement(v.get(index));\r
-            }\r
-            for (int index = 0; index < v.size(); index++) {\r
-                v.setElementAt(tempV.get(vSequence.get(index)), index);\r
-            }\r
-        }\r
-    }\r
-\r
-    /**\r
-     Sort all modules\r
-     \r
-     @param v\r
-     @param mode\r
-     \r
-     **/\r
-    public static void sortModules(Vector<ModuleIdentification> v, int mode) {\r
-        if (v != null) {\r
-            //\r
-            // sort by name\r
-            //\r
-            for (int indexI = 0; indexI < v.size(); indexI++) {\r
-                for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
-                    if ((v.get(indexJ).getName().compareTo(v.get(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
-                        || (v.get(indexI).getName().compareTo(v.get(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
-                        ModuleIdentification temp = v.get(indexI);\r
-                        v.setElementAt(v.get(indexJ), indexI);\r
-                        v.setElementAt(temp, indexJ);\r
-                    }\r
-                }\r
-            }\r
-        }\r
-    }\r
-\r
-    /**\r
-     Sort all packages\r
-     \r
-     @param v\r
-     @param mode\r
-     \r
-     **/\r
-    public static void sortPackages(Vector<PackageIdentification> v, int mode) {\r
-        if (v != null) {\r
-            //\r
-            // sort by name\r
-            //\r
-            for (int indexI = 0; indexI < v.size(); indexI++) {\r
-                for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
-                    if ((v.get(indexJ).getName().compareTo(v.get(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
-                        || (v.get(indexI).getName().compareTo(v.get(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
-                        PackageIdentification temp = v.get(indexI);\r
-                        v.setElementAt(v.get(indexJ), indexI);\r
-                        v.setElementAt(temp, indexJ);\r
-                    }\r
-                }\r
-            }\r
-        }\r
-    }\r
-\r
-    /**\r
-     Sort all platforms\r
-     \r
-     @param v\r
-     @param mode\r
-     \r
-     **/\r
-    public static void sortPlatforms(Vector<PlatformIdentification> v, int mode) {\r
-        if (v != null) {\r
-            //\r
-            // sort by name\r
-            //\r
-            for (int indexI = 0; indexI < v.size(); indexI++) {\r
-                for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
-                    if ((v.get(indexJ).getName().compareTo(v.get(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
-                        || (v.get(indexI).getName().compareTo(v.get(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
-                        PlatformIdentification temp = v.get(indexI);\r
-                        v.setElementAt(v.get(indexJ), indexI);\r
-                        v.setElementAt(temp, indexJ);\r
-                    }\r
-                }\r
-            }\r
-        }\r
-    }\r
-    \r
-    /**\r
-     Sort all pcd entries\r
-     \r
-     @param v\r
-     @param mode\r
-    \r
-    **/\r
-    public static void sortPcds(PcdVector v, int mode) {\r
-        if (v != null) {\r
-            //\r
-            // sort by name\r
-            //\r
-            for (int indexI = 0; indexI < v.size(); indexI++) {\r
-                for (int indexJ = indexI + 1; indexJ < v.size(); indexJ++) {\r
-                    if ((v.getPcd(indexJ).getName().compareTo(v.getPcd(indexI).getName()) < 0 && mode == DataType.SORT_TYPE_ASCENDING)\r
-                        || (v.getPcd(indexI).getName().compareTo(v.getPcd(indexJ).getName()) < 0 && mode == DataType.SORT_TYPE_DESCENDING)) {\r
-                        PcdIdentification temp = v.getPcd(indexI);\r
-                        v.setPcd(v.getPcd(indexJ), indexI);\r
-                        v.setPcd(temp, indexJ);\r
-                    }\r
-                }\r
-            }\r
-        }\r
-    }\r
 }\r
index 5834744..dd2832e 100644 (file)
@@ -17,9 +17,9 @@ package org.tianocore.frameworkwizard.module.Identifications.PcdCoded;
 import java.util.Vector;\r
 \r
 public class PcdVector {\r
-    \r
+\r
     private Vector<PcdIdentification> vPcd = new Vector<PcdIdentification>();\r
-    \r
+\r
     public int findPcd(PcdIdentification sfi) {\r
         for (int index = 0; index < vPcd.size(); index++) {\r
             if (vPcd.elementAt(index).equals(sfi)) {\r
@@ -86,7 +86,7 @@ public class PcdVector {
     public int size() {\r
         return this.vPcd.size();\r
     }\r
-    \r
+\r
     public void addAll(PcdVector v) {\r
         if (v != null) {\r
             for (int index = 0; index < v.size(); index++) {\r
index 31e9aec..02a9d7f 100644 (file)
@@ -21,17 +21,17 @@ public class SourceFilesIdentification {
     private String filename = null;\r
 \r
     private String tagName = null;\r
-    \r
+\r
     private String toolCode = null;\r
-    \r
+\r
     private String toolChainFamily = null;\r
-    \r
+\r
     private Vector<String> supArchList = null;\r
 \r
     private String featureFlag = null;\r
 \r
-    public SourceFilesIdentification(String strFilename, String strTagName, String strToolCode, String strToolChainFamily,\r
-                                     String strFeatureFlag, Vector<String> arch) {\r
+    public SourceFilesIdentification(String strFilename, String strTagName, String strToolCode,\r
+                                     String strToolChainFamily, String strFeatureFlag, Vector<String> arch) {\r
         this.filename = (strFilename == null ? "" : strFilename);\r
         this.tagName = (strTagName == null ? "" : strTagName);\r
         this.toolCode = (strToolCode == null ? "" : strToolCode);\r
@@ -87,9 +87,12 @@ public class SourceFilesIdentification {
     public void setToolCode(String toolCode) {\r
         this.toolCode = toolCode;\r
     }\r
-    \r
+\r
     public boolean equals(SourceFilesIdentification sfid) {\r
-        if (this.filename.equals(sfid.filename)) {\r
+        if (this.filename.equals(sfid.filename) && this.tagName.equals(sfid.tagName)\r
+            && this.toolCode.equals(sfid.toolCode) && this.toolChainFamily.equals(sfid.toolChainFamily)\r
+            && this.featureFlag.equals(sfid.featureFlag)\r
+            && this.supArchList.toString().equals(sfid.supArchList.toString())) {\r
             return true;\r
         }\r
         return false;\r
index 3e6e98d..c08ae21 100644 (file)
@@ -47,7 +47,9 @@ public class SourceFilesVector {
     }\r
 \r
     public void addSourceFiles(SourceFilesIdentification sfi) {\r
-        vSourceFiles.addElement(sfi);\r
+        if (findSourceFiles(sfi) == -1) {\r
+            vSourceFiles.addElement(sfi);\r
+        }\r
     }\r
 \r
     public void setSourceFiles(SourceFilesIdentification sfi, int index) {\r
index 7dd7d32..eab29be 100644 (file)
@@ -348,9 +348,11 @@ public class ModuleSourceFiles extends IInternalFrame {
         int result = sfd.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
-                this.vSourceFiles.addSourceFiles(sfd.getSfid());\r
+                for (int indexI = 0; indexI < sfd.getSfid().length; indexI++) {\r
+                    this.vSourceFiles.addSourceFiles(sfd.getSfid()[indexI]);\r
+                }\r
             } else {\r
-                this.vSourceFiles.setSourceFiles(sfd.getSfid(), index);\r
+                this.vSourceFiles.setSourceFiles(sfd.getSfid()[0], index);\r
             }\r
             this.showTable();\r
             this.save();\r
index c529bc0..295cde4 100644 (file)
@@ -135,7 +135,7 @@ public class MsaHeader extends IInternalFrame {
     private JScrollPane jScrollPane = null;\r
 \r
     private OpeningModuleType omt = null;\r
-    \r
+\r
     private EnumerationData ed = new EnumerationData();\r
 \r
     /**\r
@@ -221,6 +221,9 @@ public class MsaHeader extends IInternalFrame {
             jTextAreaLicense.setText("");\r
             jTextAreaLicense.setLineWrap(true);\r
             jTextAreaLicense.addFocusListener(this);\r
+            jTextAreaLicense.setWrapStyleWord(true);\r
+            jTextAreaLicense.setSelectionStart(0);\r
+            jTextAreaLicense.setSelectionEnd(0);\r
             jTextAreaLicense.setToolTipText("The License for this file");\r
         }\r
         return jTextAreaLicense;\r
@@ -238,6 +241,7 @@ public class MsaHeader extends IInternalFrame {
             jTextAreaDescription.setLineWrap(true);\r
             jTextAreaDescription.addFocusListener(this);\r
             jTextAreaDescription.setToolTipText("A verbose description of the module");\r
+            jTextAreaDescription.setWrapStyleWord(true);\r
             jTextAreaDescription.setSelectionStart(0);\r
             jTextAreaDescription.setSelectionEnd(0);\r
         }\r
@@ -441,12 +445,13 @@ public class MsaHeader extends IInternalFrame {
         super();\r
         this.omt = inMsa;\r
         this.msa = omt.getXmlMsa();\r
-        \r
+\r
         //      \r
         // Set module definitions default value\r
         //\r
         if (msa.getModuleDefinitions() == null) {\r
-            ModuleDefinitionsDocument.ModuleDefinitions md = ModuleDefinitionsDocument.ModuleDefinitions.Factory.newInstance();\r
+            ModuleDefinitionsDocument.ModuleDefinitions md = ModuleDefinitionsDocument.ModuleDefinitions.Factory\r
+                                                                                                                .newInstance();\r
             md.setOutputFileBasename(msa.getMsaHeader().getModuleName());\r
             md.setBinaryModule(false);\r
             md.setSupportedArchitectures(ed.getVSupportedArchitectures());\r
@@ -815,7 +820,6 @@ public class MsaHeader extends IInternalFrame {
             //            this.msaHeader.setSpecification(this.jTextFieldSpecification.getText());\r
 \r
             msaHeader.setSpecification(this.jTextFieldSpecification.getText());\r
-            msaHeader.setModuleType(ModuleTypeDef.Enum.forString(jComboBoxModuleType.getSelectedItem().toString()));\r
             msa.setMsaHeader(msaHeader);\r
             this.omt.setSaved(false);\r
         } catch (Exception e) {\r
@@ -879,7 +883,7 @@ public class MsaHeader extends IInternalFrame {
         if (this.msaHeader == null) {\r
             msaHeader = MsaHeaderDocument.MsaHeader.Factory.newInstance();\r
         }\r
-        \r
+\r
         //\r
         // Check BaseName\r
         //\r
@@ -894,14 +898,22 @@ public class MsaHeader extends IInternalFrame {
                 //this.jTextFieldBaseName.requestFocus();\r
                 return;\r
             }\r
-            this.msaHeader.setModuleName(this.jTextFieldBaseName.getText());\r
+            if (!this.jTextFieldBaseName.getText().equals(msaHeader.getModuleName())) {\r
+                this.msaHeader.setModuleName(this.jTextFieldBaseName.getText());\r
+            } else {\r
+                return;\r
+            }\r
         }\r
 \r
         //\r
         // Check Module Type\r
         //\r
         if (arg0.getSource() == this.jComboBoxModuleType) {\r
-            //msaHeader.setModuleType(ModuleTypeDef.Enum.forString(jComboBoxModuleType.getSelectedItem().toString()));\r
+            if (!jComboBoxModuleType.getSelectedItem().toString().equals(msaHeader.getModuleType().toString())) {\r
+                msaHeader.setModuleType(ModuleTypeDef.Enum.forString(jComboBoxModuleType.getSelectedItem().toString()));\r
+            } else {\r
+                return;\r
+            }\r
         }\r
 \r
         //\r
@@ -918,14 +930,17 @@ public class MsaHeader extends IInternalFrame {
                 //this.jTextFieldGuid.requestFocus();\r
                 return;\r
             }\r
-            this.msaHeader.setGuidValue(jTextFieldGuid.getText());\r
+            if (!this.jTextFieldGuid.getText().equals(msaHeader.getGuidValue())) {\r
+                this.msaHeader.setGuidValue(this.jTextFieldGuid.getText());\r
+            } else {\r
+                return;\r
+            }\r
         }\r
 \r
         //\r
         // Check Version\r
         //\r
         if (arg0.getSource() == this.jTextFieldVersion) {\r
-\r
             if (isEmpty(this.jTextFieldVersion.getText())) {\r
                 Log.err("Version couldn't be empty");\r
                 //this.jTextFieldVersion.requestFocus();\r
@@ -936,7 +951,11 @@ public class MsaHeader extends IInternalFrame {
                 //this.jTextFieldVersion.requestFocus();\r
                 return;\r
             }\r
-            this.msaHeader.setVersion(this.jTextFieldVersion.getText());\r
+            if (!this.jTextFieldVersion.getText().equals(msaHeader.getVersion())) {\r
+                this.msaHeader.setVersion(this.jTextFieldVersion.getText());\r
+            } else {\r
+                return;\r
+            }\r
         }\r
 \r
         //\r
@@ -953,7 +972,11 @@ public class MsaHeader extends IInternalFrame {
                 //this.jTextFieldAbstract.requestFocus();\r
                 return;\r
             }\r
-            this.msaHeader.setAbstract(this.jTextFieldAbstract.getText());\r
+            if (!this.jTextFieldAbstract.getText().equals(msaHeader.getAbstract())) {\r
+                this.msaHeader.setAbstract(this.jTextFieldAbstract.getText());\r
+            } else {\r
+                return;\r
+            }\r
         }\r
 \r
         //\r
@@ -965,7 +988,11 @@ public class MsaHeader extends IInternalFrame {
                 //this.jTextAreaDescription.requestFocus();\r
                 return;\r
             }\r
-            this.msaHeader.setDescription(this.jTextAreaDescription.getText());\r
+            if (!this.jTextAreaDescription.getText().equals(msaHeader.getDescription())) {\r
+                this.msaHeader.setDescription(this.jTextAreaDescription.getText());\r
+            } else {\r
+                return;\r
+            }\r
         }\r
 \r
         //\r
@@ -977,7 +1004,11 @@ public class MsaHeader extends IInternalFrame {
                 //this.jTextFieldCopyright.requestFocus();\r
                 return;\r
             }\r
-            this.msaHeader.setCopyright(this.jTextFieldCopyright.getText());\r
+            if (!this.jTextFieldCopyright.getText().equals(msaHeader.getCopyright())) {\r
+                this.msaHeader.setCopyright(this.jTextFieldCopyright.getText());\r
+            } else {\r
+                return;\r
+            }\r
         }\r
 \r
         //\r
@@ -990,7 +1021,11 @@ public class MsaHeader extends IInternalFrame {
                 return;\r
             }\r
             if (this.msaHeader.getLicense() != null) {\r
-                this.msaHeader.getLicense().setStringValue(this.jTextAreaLicense.getText());\r
+                if (!this.jTextAreaLicense.getText().equals(msaHeader.getLicense().getStringValue())) {\r
+                    this.msaHeader.getLicense().setStringValue(this.jTextAreaLicense.getText());\r
+                } else {\r
+                    return;\r
+                }\r
             } else {\r
                 License mLicense = License.Factory.newInstance();\r
                 mLicense.setStringValue(this.jTextAreaLicense.getText());\r
@@ -1008,11 +1043,15 @@ public class MsaHeader extends IInternalFrame {
                     mLicense.setURL(this.jTextFieldURL.getText());\r
                     this.msaHeader.setLicense(mLicense);\r
                 } else {\r
-                    this.msaHeader.getLicense().setURL(this.jTextFieldURL.getText());\r
+                    if (!this.jTextFieldURL.getText().equals(msaHeader.getLicense().getURL())) {\r
+                        this.msaHeader.getLicense().setURL(this.jTextFieldURL.getText());\r
+                    } else {\r
+                        return;\r
+                    }\r
                 }\r
             }\r
         }\r
-\r
+        \r
         this.save();\r
     }\r
 }\r
index 53ac9a5..d11c979 100644 (file)
@@ -91,7 +91,7 @@ public class SourceFilesDlg extends IDialog {
     //\r
     // Not used by UI\r
     //\r
-    private SourceFilesIdentification sfid = null;\r
+    private SourceFilesIdentification sfid[] = null;\r
 \r
     private String msaFileName = "";\r
 \r
@@ -268,16 +268,16 @@ public class SourceFilesDlg extends IDialog {
      **/\r
     private void init(SourceFilesIdentification inSourceFilesIdentifications, String fileName) {\r
         init();\r
-        this.sfid = inSourceFilesIdentifications;\r
+        //this.sfid = inSourceFilesIdentifications;\r
         this.msaFileName = fileName;\r
 \r
-        if (this.sfid != null) {\r
-            this.jTextFieldFileName.setText(sfid.getFilename());\r
-            this.jTextFieldTagName.setText(sfid.getTagName());\r
-            this.jTextFieldToolCode.setText(sfid.getToolCode());\r
-            this.jTextFieldToolChainFamily.setText(sfid.getToolChainFamily());\r
-            jTextFieldFeatureFlag.setText(sfid.getFeatureFlag());\r
-            this.jArchCheckBox.setSelectedItems(sfid.getSupArchList());\r
+        if (inSourceFilesIdentifications != null) {\r
+            this.jTextFieldFileName.setText(inSourceFilesIdentifications.getFilename());\r
+            this.jTextFieldTagName.setText(inSourceFilesIdentifications.getTagName());\r
+            this.jTextFieldToolCode.setText(inSourceFilesIdentifications.getToolCode());\r
+            this.jTextFieldToolChainFamily.setText(inSourceFilesIdentifications.getToolChainFamily());\r
+            jTextFieldFeatureFlag.setText(inSourceFilesIdentifications.getFeatureFlag());\r
+            this.jArchCheckBox.setSelectedItems(inSourceFilesIdentifications.getSupArchList());\r
         }\r
     }\r
 \r
@@ -376,14 +376,18 @@ public class SourceFilesDlg extends IDialog {
         }\r
     }\r
 \r
-    private SourceFilesIdentification getCurrentSourceFiles() {\r
+    private SourceFilesIdentification[] getCurrentSourceFiles() {\r
         String name = this.jTextFieldFileName.getText();\r
+        String s[] = name.split(";");\r
         String tagName = this.jTextFieldTagName.getText();\r
         String toolCode = this.jTextFieldToolCode.getText();\r
         String tcf = this.jTextFieldToolChainFamily.getText();\r
         String featureFlag = this.jTextFieldFeatureFlag.getText();\r
         Vector<String> arch = this.jArchCheckBox.getSelectedItemsVector();\r
-        sfid = new SourceFilesIdentification(name, tagName, toolCode, tcf, featureFlag, arch);\r
+        sfid = new SourceFilesIdentification[s.length];\r
+        for (int index = 0; index < s.length; index++) {\r
+            sfid[index] =  new SourceFilesIdentification(s[index], tagName, toolCode, tcf, featureFlag, arch);\r
+        }\r
         return sfid;\r
     }\r
 \r
@@ -457,17 +461,23 @@ public class SourceFilesDlg extends IDialog {
     private void selectFile() {\r
         JFileChooser fc = new JFileChooser();\r
         fc.setCurrentDirectory(new File(Tools.getFilePathOnly(msaFileName)));\r
+        fc.setMultiSelectionEnabled(true);\r
         int result = fc.showOpenDialog(new JPanel());\r
         if (result == JFileChooser.APPROVE_OPTION) {\r
-            this.jTextFieldFileName.setText(fc.getSelectedFile().getName());\r
+            File f[] = fc.getSelectedFiles();\r
+            String s = "";\r
+            for (int index = 0; index < f.length; index++) {\r
+                s = s + f[index].getName() + ";";\r
+            }\r
+            this.jTextFieldFileName.setText(s);\r
         }\r
     }\r
 \r
-    public SourceFilesIdentification getSfid() {\r
+    public SourceFilesIdentification[] getSfid() {\r
         return sfid;\r
     }\r
 \r
-    public void setSfid(SourceFilesIdentification sfid) {\r
+    public void setSfid(SourceFilesIdentification[] sfid) {\r
         this.sfid = sfid;\r
     }\r
 }\r
index 19ed620..16cfaad 100644 (file)
@@ -35,6 +35,7 @@ import org.tianocore.SpdHeaderDocument.SpdHeader;
 import org.tianocore.frameworkwizard.common.DataType;\r
 import org.tianocore.frameworkwizard.common.Log;\r
 import org.tianocore.frameworkwizard.common.SaveFile;\r
+import org.tianocore.frameworkwizard.common.Sort;\r
 import org.tianocore.frameworkwizard.common.Tools;\r
 import org.tianocore.frameworkwizard.common.Identifications.Identification;\r
 import org.tianocore.frameworkwizard.common.Identifications.OpenFile;\r
@@ -285,7 +286,7 @@ public class WorkspaceTools {
 \r
             }\r
         }\r
-        Tools.sortPackages(vPackageList, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortPackages(vPackageList, DataType.SORT_TYPE_ASCENDING);\r
         return vPackageList;\r
     }\r
 \r
@@ -385,7 +386,7 @@ public class WorkspaceTools {
             }\r
             v.addElement(new ModuleIdentification(id, pid));\r
         }\r
-        Tools.sortModules(v, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortModules(v, DataType.SORT_TYPE_ASCENDING);\r
         return v;\r
 \r
     }\r
@@ -428,7 +429,7 @@ public class WorkspaceTools {
                 }\r
             }\r
         }\r
-        Tools.sortModules(vModuleList, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortModules(vModuleList, DataType.SORT_TYPE_ASCENDING);\r
         return vModuleList;\r
     }\r
 \r
@@ -459,7 +460,7 @@ public class WorkspaceTools {
                 Log.err("Open Platform Surface Area " + path, "Invalid file type");\r
             }\r
         }\r
-        Tools.sortPlatforms(vPlatformList, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortPlatforms(vPlatformList, DataType.SORT_TYPE_ASCENDING);\r
         return vPlatformList;\r
     }\r
 \r
@@ -477,7 +478,7 @@ public class WorkspaceTools {
                 }\r
             }\r
         }\r
-        Tools.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
         return vector;\r
     }\r
 \r
@@ -495,7 +496,7 @@ public class WorkspaceTools {
                 }\r
             }\r
         }\r
-        Tools.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
         return vector;\r
     }\r
 \r
@@ -513,7 +514,7 @@ public class WorkspaceTools {
                 }\r
             }\r
         }\r
-        Tools.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
         return vector;\r
     }\r
 \r
@@ -531,7 +532,7 @@ public class WorkspaceTools {
                 }\r
             }\r
         }\r
-        Tools.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
         return vector;\r
     }\r
 \r
@@ -555,7 +556,7 @@ public class WorkspaceTools {
                 }\r
             }\r
         }\r
-        Tools.sortPcds(vector, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortPcds(vector, DataType.SORT_TYPE_ASCENDING);\r
         return vector;\r
     }\r
 \r
@@ -583,7 +584,7 @@ public class WorkspaceTools {
                 // TODO Auto-generated catch block\r
             }\r
         }\r
-        Tools.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
         return vector;\r
     }\r
 \r
@@ -609,7 +610,7 @@ public class WorkspaceTools {
                 // TODO Auto-generated catch block\r
             }\r
         }\r
-        Tools.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
         return vector;\r
     }\r
 \r
@@ -635,7 +636,7 @@ public class WorkspaceTools {
                 // TODO Auto-generated catch block\r
             }\r
         }\r
-        Tools.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
         return vector;\r
     }\r
 \r
@@ -661,7 +662,7 @@ public class WorkspaceTools {
                 // TODO Auto-generated catch block\r
             }\r
         }\r
-        Tools.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
         return vector;\r
     }\r
 \r
@@ -686,7 +687,7 @@ public class WorkspaceTools {
                 // TODO Auto-generated catch block\r
             }\r
         }\r
-        Tools.sortPcds(vector, DataType.SORT_TYPE_ASCENDING);\r
+        Sort.sortPcds(vector, DataType.SORT_TYPE_ASCENDING);\r
         return vector;\r
     }\r
 \r