]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
comment out item type checking temporarily when adding module to fpd file.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdFileContents.java
index f730fa2a6ee22cee410c272c63b5138f80e91df3..b8c80b48cc2f5264d6b8f354beedc5040bc4dc29 100644 (file)
@@ -231,7 +231,7 @@ public class FpdFileContents {
         ListIterator li = getfpdFrameworkModules().getModuleSAList().listIterator();\r
         while(li.hasNext()) {\r
             ModuleSADocument.ModuleSA msa = (ModuleSADocument.ModuleSA)li.next();\r
-            if (msa.getModuleGuid().equals(s[0]) && msa.getPackageGuid().equals(s[2])) {\r
+            if (msa.getModuleGuid().equalsIgnoreCase(s[0]) && msa.getPackageGuid().equalsIgnoreCase(s[2])) {\r
                 if (msa.getModuleVersion() != null) {\r
                     if (!msa.getModuleVersion().equals(s[1])) {\r
                         continue;\r
@@ -776,7 +776,7 @@ public class FpdFileContents {
                     //\r
                     // ToDo Error \r
                     //\r
-                    throw new PcdDeclNotFound(mi.getName() + " " + msaPcd.getCName());\r
+                    throw new PcdDeclNotFound("No Declaration for PCD Entry " + msaPcd.getCName() + " in Module " + mi.getName());\r
                 }\r
                 //\r
                 // AddItem to ModuleSA PcdBuildDefinitions\r
@@ -788,7 +788,7 @@ public class FpdFileContents {
             \r
         }\r
         catch (Exception e){\r
-            e.printStackTrace();\r
+            \r
             throw e; \r
         }\r
         \r
@@ -873,16 +873,17 @@ public class FpdFileContents {
         //\r
         // Special dynamic type, if this pcd already exists in other ModuleSA\r
         //\r
+        /* Comment out Item type checking temporarily.\r
         if (itemType.equals("DYNAMIC")) {\r
             \r
             ListIterator li = pcdConsumer.listIterator();\r
             while(li.hasNext()) {\r
                 String value = li.next().toString();\r
                 String[] valuePart= value.split(" ");\r
-                if (!valuePart[4].equals("DYNAMIC")) {\r
+                if (!valuePart[5].equals("DYNAMIC")) {\r
                     //ToDo error for same pcd, other type than dynamic\r
                     pcdConsumer.remove(listValue);\r
-                    throw new PcdItemTypeConflictException(value);\r
+                    throw new PcdItemTypeConflictException(cName, value);\r
                 }\r
             }\r
         }\r
@@ -891,14 +892,14 @@ public class FpdFileContents {
             while(li.hasNext()) {\r
                 String value = li.next().toString();\r
                 String[] valuePart= value.split(" ");\r
-                if (valuePart[4].equals("DYNAMIC")) {\r
+                if (valuePart[5].equals("DYNAMIC")) {\r
                     //ToDo error for same pcd, other type than non-dynamic\r
                     pcdConsumer.remove(listValue);\r
-                    throw new PcdItemTypeConflictException(value);\r
+                    throw new PcdItemTypeConflictException(cName, value);\r
                 }\r
             }\r
         }\r
-        \r
+        */\r
         PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData fpdPcd = moduleSa.getPcdBuildDefinition().addNewPcdData();\r
         fpdPcd.setCName(cName);\r
         fpdPcd.setToken(token);\r
@@ -1030,7 +1031,7 @@ public class FpdFileContents {
     \r
     private ArrayList<String> LookupPlatformPcdData(String pcdKey) {\r
         \r
-        return dynPcdMap.get("pcdKey");\r
+        return dynPcdMap.get(pcdKey);\r
     }\r
     \r
     public int getDynamicPcdBuildDataCount() {\r
@@ -2320,7 +2321,7 @@ public class FpdFileContents {
         if (fpdHdr == null) {\r
             fpdHdr = fpdRoot.addNewPlatformHeader();\r
         }\r
-        genPlatformDefsSkuInfo("0", "DEFAULT");\r
+        \r
         return fpdHdr;\r
     }\r
     \r
@@ -2464,8 +2465,9 @@ class PcdItemTypeConflictException extends Exception {
     private static final long serialVersionUID = 1L;\r
     private String details = null;\r
     \r
-    PcdItemTypeConflictException(String info){\r
-        details = info;\r
+    PcdItemTypeConflictException(String pcdName, String info){\r
+        ModuleIdentification mi = GlobalData.getModuleId(info);\r
+        details = pcdName + " ItemType Conflicts with " + mi.getName() + " in Pkg " + mi.getPackage().getName();\r
     }\r
     \r
     public String getMessage() {\r
@@ -2482,7 +2484,7 @@ class PcdDeclNotFound extends Exception {
     private String details = null;\r
     \r
     PcdDeclNotFound(String info) {\r
-        details = info;\r
+        details = "PcdDeclNotFound: " + info;\r
     }\r
     \r
     public String getMessage() {\r
@@ -2499,7 +2501,7 @@ class PcdValueMalFormed extends Exception {
     private String details = null;\r
     \r
     PcdValueMalFormed(String info) {\r
-        details = info;\r
+        details = "PcdValueMalFormed: " + info;\r
     }\r
     \r
     public String getMessage() {\r