]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java
1. Fix EDKT281 there are too many values in the list of Hob's Guid C Name. only the...
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / workspace / WorkspaceTools.java
index f0586b1aa5611f2d149e6438d8aac1aee6a8cab5..4e40d59efc16f54fd5d0db2018ae14ba5be93434 100644 (file)
@@ -416,12 +416,24 @@ public class WorkspaceTools {
      \r
      @return Vector\r
      **/\r
-    public Vector<String> getAllGuidDeclarationsFromPackage(PackageSurfaceArea spd) {\r
+    public Vector<String> getAllGuidDeclarationsFromPackage(PackageSurfaceArea spd, String type) {\r
         Vector<String> vector = new Vector<String>();\r
+        boolean isFound = false;\r
         if (spd.getGuidDeclarations() != null) {\r
             if (spd.getGuidDeclarations().getEntryList().size() > 0) {\r
                 for (int index = 0; index < spd.getGuidDeclarations().getEntryList().size(); index++) {\r
-                    vector.addElement(spd.getGuidDeclarations().getEntryList().get(index).getCName());\r
+                    Vector<String> vArch = Tools.convertListToVector(spd.getGuidDeclarations().getEntryList()\r
+                                                                        .get(index).getGuidTypeList());\r
+                    for (int indexOfArch = 0; indexOfArch < vArch.size(); indexOfArch++) {\r
+                        if (vArch.get(indexOfArch).equals(type)) {\r
+                            isFound = true;\r
+                            break;\r
+                        }\r
+                    }\r
+                    if ((isFound) || (vArch == null) || (vArch.size() < 1)) {\r
+                        vector.addElement(spd.getGuidDeclarations().getEntryList().get(index).getCName());\r
+                        isFound = false;\r
+                    }\r
                 }\r
             }\r
         }\r
@@ -539,12 +551,14 @@ public class WorkspaceTools {
         return vector;\r
     }\r
 \r
-    public Vector<String> getAllGuidDeclarationsFromWorkspace() {\r
+    public Vector<String> getAllGuidDeclarationsFromWorkspace(String type) {\r
         Vector<String> vector = new Vector<String>();\r
         for (int index = 0; index < GlobalData.vPackageList.size(); index++) {\r
-            Vector<String> v = getAllGuidDeclarationsFromPackage(GlobalData.openingPackageList\r
+            Vector<String> v = getAllGuidDeclarationsFromPackage(\r
+                                                                 GlobalData.openingPackageList\r
                                                                                               .getPackageSurfaceAreaFromId(GlobalData.vPackageList\r
-                                                                                                                                                  .get(index)));\r
+                                                                                                                                                  .get(index)),\r
+                                                                 type);\r
             if (v != null && v.size() > 0) {\r
                 vector.addAll(v);\r
             }\r
@@ -554,12 +568,14 @@ public class WorkspaceTools {
         return vector;\r
     }\r
 \r
-    public Vector<String> getAllGuidDeclarationsFromPackages(Vector<PackageIdentification> vpid) {\r
+    public Vector<String> getAllGuidDeclarationsFromPackages(Vector<PackageIdentification> vpid, String type) {\r
         Vector<String> vector = new Vector<String>();\r
         for (int index = 0; index < vpid.size(); index++) {\r
-            Vector<String> v = getAllGuidDeclarationsFromPackage(GlobalData.openingPackageList\r
+            Vector<String> v = getAllGuidDeclarationsFromPackage(\r
+                                                                 GlobalData.openingPackageList\r
                                                                                               .getPackageSurfaceAreaFromId(vpid\r
-                                                                                                                               .get(index)));\r
+                                                                                                                               .get(index)),\r
+                                                                 type);\r
             if (v != null && v.size() > 0) {\r
                 vector.addAll(v);\r
             }\r