]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
Fix the problem of not displaying library instances for multiple archs in supArchList.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdFileContents.java
index 00371cdc97ccb3aecd6a9eb07aba78db122af4be..9c60f15dacecc2b809c720011681b099bd764306 100644 (file)
@@ -251,12 +251,22 @@ public class FpdFileContents {
     }\r
     \r
     public ModuleSADocument.ModuleSA getModuleSA(String key) {\r
-        String[] s = key.split(" ");\r
+        \r
         if (getfpdFrameworkModules().getModuleSAList() == null || getfpdFrameworkModules().getModuleSAList().size() == 0) {\r
             removeElement(getfpdFrameworkModules());\r
             fpdFrameworkModules = null;\r
             return null;\r
         }\r
+        String[] s = key.split(" ");\r
+        String archsInKey = "";\r
+        if (s.length > 4) {\r
+            for (int i = 4; i < s.length; ++i) {\r
+                archsInKey += s[i];\r
+                archsInKey += " ";\r
+            }\r
+            archsInKey = archsInKey.trim();\r
+        }\r
+        \r
         ListIterator li = getfpdFrameworkModules().getModuleSAList().listIterator();\r
         while(li.hasNext()) {\r
             ModuleSADocument.ModuleSA moduleSa = (ModuleSADocument.ModuleSA)li.next();\r
@@ -271,13 +281,17 @@ public class FpdFileContents {
                         continue;\r
                     }\r
                 }\r
-                //ToDo add arch check for s[4]\r
+                //ToDo add arch check .\r
                 if (moduleSa.getSupArchList() != null) {\r
-                    if (!listToString(moduleSa.getSupArchList()).equals(s[4])) {\r
-                        continue;\r
+                    if (listToString(moduleSa.getSupArchList()).equals(archsInKey)) {\r
+                        return moduleSa;\r
+                    }\r
+                }\r
+                else {\r
+                    if (archsInKey.length() == 0) {\r
+                        return moduleSa;\r
                     }\r
                 }\r
-                return moduleSa;\r
             }\r
         }\r
         return null;\r