]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java
merged part of new changes in new schema, and changed genbuild code accordingly
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / autogen / AutoGen.java
index 53f5fa908fcb005c2df47f18da3d619aa2b6abde..482698cbad4b903c65d2e1f94651014d28865b62 100644 (file)
@@ -591,8 +591,7 @@ public class AutoGen {
         // library class name.\r
         //\r
         for (int i = 0; i < libClassList.length; i++) {\r
-            includerName = GlobalData.getLibClassIncluder(libClassList[i]\r
-                    .getStringValue());\r
+            includerName = GlobalData.getLibClassIncluder(getStringValue((XmlObject)libClassList[i]));\r
             if (includerName != null) {\r
                 str = CommonDefinition.include + " " + "<";\r
                 str = str + includerName + ">\r\n";\r
@@ -1095,14 +1094,14 @@ public class AutoGen {
         if (ppiList != null) {\r
             for (int i = 0; i < ppiList.length; i++) {\r
                 isEqual = false;\r
+                String ppiName = getStringValue((XmlObject)ppiList[i]);\r
                 for (int j = 0; j < this.mPpiList.size(); j++) {\r
-                    if (this.mPpiList.get(j).equalsIgnoreCase(\r
-                            ppiList[i].getStringValue())) {\r
+                    if (this.mPpiList.get(j).equalsIgnoreCase(ppiName)) {\r
                         isEqual = true;\r
                     }\r
                 }\r
                 if (!isEqual) {\r
-                    this.mPpiList.add(ppiList[i].getStringValue());\r
+                    this.mPpiList.add(ppiName);\r
                 }\r
             }\r
         }\r
@@ -1112,14 +1111,14 @@ public class AutoGen {
         if (ppiNotifyList != null) {\r
             for (int i = 0; i < ppiNotifyList.length; i++) {\r
                 isEqual = false;\r
+                String ppiNotifyName = getStringValue((XmlObject)ppiNotifyList[i]);\r
                 for (int j = 0; j < this.mPpiList.size(); j++) {\r
-                    if (this.mPpiList.get(j).equalsIgnoreCase(\r
-                            ppiNotifyList[i].getStringValue())) {\r
+                    if (this.mPpiList.get(j).equalsIgnoreCase(ppiNotifyName)) {\r
                         isEqual = true;\r
                     }\r
                 }\r
                 if (!isEqual) {\r
-                    this.mPpiList.add(ppiNotifyList[i].getStringValue());\r
+                    this.mPpiList.add(ppiNotifyName);\r
                 }\r
             }\r
         }\r
@@ -1159,14 +1158,14 @@ public class AutoGen {
         if (protocolList != null) {\r
             for (int i = 0; i < protocolList.length; i++) {\r
                 isEqual = false;\r
+                String protocolName = getStringValue((XmlObject)protocolList[i]);\r
                 for (int j = 0; j < this.mProtocolList.size(); j++) {\r
-                    if (this.mProtocolList.get(j).equalsIgnoreCase(\r
-                            protocolList[i].getStringValue())) {\r
+                    if (this.mProtocolList.get(j).equalsIgnoreCase(protocolName)) {\r
                         isEqual = true;\r
                     }\r
                 }\r
                 if (!isEqual) {\r
-                    this.mProtocolList.add(protocolList[i].getStringValue());\r
+                    this.mProtocolList.add(protocolName);\r
 \r
                 }\r
             }\r
@@ -1177,15 +1176,14 @@ public class AutoGen {
         if (protocolNotifyList != null) {\r
             for (int i = 0; i < protocolNotifyList.length; i++) {\r
                 isEqual = false;\r
+                String protocolNotifyName = getStringValue((XmlObject)protocolNotifyList[i]);\r
                 for (int j = 0; j < this.mProtocolList.size(); j++) {\r
-                    if (this.mProtocolList.get(j).equalsIgnoreCase(\r
-                            protocolNotifyList[i].getStringValue())) {\r
+                    if (this.mProtocolList.get(j).equalsIgnoreCase(protocolNotifyName)) {\r
                         isEqual = true;\r
                     }\r
                 }\r
                 if (!isEqual) {\r
-                    this.mProtocolList.add(protocolNotifyList[i]\r
-                            .getStringValue());\r
+                    this.mProtocolList.add(protocolNotifyName);\r
 \r
                 }\r
             }\r
@@ -1330,66 +1328,56 @@ public class AutoGen {
                         if (ppiList != null) {\r
                             for (index = 0; index < ppiList.length; index++) {\r
                                 isEqual = false;\r
+                                String name = getStringValue((XmlObject)ppiList[index]);\r
                                 for (int j = 0; j < this.mPpiList.size(); j++) {\r
-                                    if (this.mPpiList.get(j).equalsIgnoreCase(\r
-                                            ppiList[index].getStringValue())) {\r
+                                    if (this.mPpiList.get(j).equalsIgnoreCase(name)) {\r
                                         isEqual = true;\r
                                     }\r
                                 }\r
                                 if (!isEqual) {\r
-                                    this.mPpiList.add(ppiList[index]\r
-                                            .getStringValue());\r
+                                    this.mPpiList.add(name);\r
                                 }\r
                             }\r
                         }\r
                         if (ppiNotifyList != null) {\r
                             for (index = 0; index < ppiNotifyList.length; index++) {\r
                                 isEqual = false;\r
+                                String name = getStringValue((XmlObject)ppiNotifyList[index]);\r
                                 for (int j = 0; j < this.mPpiList.size(); j++) {\r
-                                    if (this.mPpiList.get(j).equalsIgnoreCase(\r
-                                            ppiNotifyList[index]\r
-                                                    .getStringValue())) {\r
+                                    if (this.mPpiList.get(j).equalsIgnoreCase(name)) {\r
                                         isEqual = true;\r
                                     }\r
                                 }\r
                                 if (!isEqual) {\r
-                                    this.mPpiList.add(ppiNotifyList[index]\r
-                                            .getStringValue());\r
+                                    this.mPpiList.add(name);\r
                                 }\r
                             }\r
                         }\r
                         if (protocolList != null) {\r
                             for (index = 0; index < protocolList.length; index++) {\r
                                 isEqual = false;\r
+                                String name = getStringValue((XmlObject)protocolList[index]);\r
                                 for (int j = 0; j < this.mProtocolList.size(); j++) {\r
-                                    if (this.mProtocolList.get(j)\r
-                                            .equalsIgnoreCase(\r
-                                                    protocolList[index]\r
-                                                            .getStringValue())) {\r
+                                    if (this.mProtocolList.get(j).equalsIgnoreCase(name)) {\r
                                         isEqual = true;\r
                                     }\r
                                 }\r
                                 if (!isEqual) {\r
-                                    this.mProtocolList.add(protocolList[index]\r
-                                            .getStringValue());\r
+                                    this.mProtocolList.add(name);\r
                                 }\r
                             }\r
                         }\r
                         if (protocolNotifyList != null) {\r
                             for (index = 0; index < protocolNotifyList.length; index++) {\r
                                 isEqual = false;\r
+                                String name = getStringValue((XmlObject)protocolNotifyList[index]);\r
                                 for (int j = 0; j < this.mProtocolList.size(); j++) {\r
-                                    if (this.mProtocolList.get(j)\r
-                                            .equalsIgnoreCase(\r
-                                                    protocolNotifyList[index]\r
-                                                            .getStringValue())) {\r
+                                    if (this.mProtocolList.get(j).equalsIgnoreCase(name)) {\r
                                         isEqual = true;\r
                                     }\r
                                 }\r
                                 if (!isEqual) {\r
-                                    this.mProtocolList\r
-                                            .add(protocolNotifyList[index]\r
-                                                    .getStringValue());\r
+                                    this.mProtocolList.add(name);\r
                                 }\r
                             }\r
                         }\r
@@ -2015,4 +2003,7 @@ public class AutoGen {
 \r
     }\r
 \r
+    private String getStringValue(XmlObject xmlDoc) {\r
+        return xmlDoc.getDomNode().getFirstChild().getNodeValue();\r
+    }\r
 }\r