]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
Add new-line characters in error message to make them shorter in multi-lines.
[mirror_edk2.git] / Tools / Java / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdFileContents.java
index f7de3a738820af06fd3026bb542b78a68cd20359..d08202b94ec9f924c3ed691cffc4e418d6089580 100644 (file)
@@ -62,6 +62,7 @@ import org.tianocore.frameworkwizard.platform.ui.global.WorkspaceProfile;
 import org.tianocore.frameworkwizard.platform.ui.global.SurfaceAreaQuery;\r
 import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
+import org.tianocore.frameworkwizard.workspace.Workspace;\r
 \r
 /**\r
  This class processes fpd file contents such as add remove xml elements. \r
@@ -829,7 +830,7 @@ public class FpdFileContents {
         XmlCursor cursor = instance.newCursor();\r
         try{\r
             String comment = "Pkg: " + pn + " Mod: " + mn \r
-                + " Path: " + libMi.getPath().substring(System.getenv("WORKSPACE").length() + 1);\r
+                + " Path: " + libMi.getPath().substring(Workspace.getCurrentWorkspace().length() + 1);\r
             cursor.insertComment(comment);\r
         }\r
         catch (Exception e){\r
@@ -1183,7 +1184,7 @@ public class FpdFileContents {
                 //\r
                 // ToDo Error \r
                 //\r
-                throw new PcdDeclNotFound("No Declaration for PCD Entry " + msaPcd.getCName() + " used by Module "\r
+                throw new PcdDeclNotFound("No Declaration for PCD Entry " + msaPcd.getCName() + "\n used by Module "\r
                                           + mi.getName() + " or its Library Instances.");\r
             }\r
             //\r
@@ -1232,7 +1233,7 @@ public class FpdFileContents {
         XmlCursor cursor = msa.newCursor();\r
         try{\r
             String comment = "Mod: " + mi.getName() + " Type: " + SurfaceAreaQuery.getModuleType(mi) + " Path: "\r
-                            + mi.getPath().substring(System.getenv("WORKSPACE").length() + 1);\r
+                            + mi.getPath().substring(Workspace.getCurrentWorkspace().length() + 1);\r
             cursor.insertComment(comment);\r
         }\r
         catch(Exception e){\r
@@ -1507,7 +1508,7 @@ public class FpdFileContents {
             saa[i][1] = dynPcd.getToken().toString();\r
             saa[i][2] = dynPcd.getTokenSpaceGuidCName();\r
             saa[i][3] = dynPcd.getMaxDatumSize()+"";\r
-            saa[i][4] = dynPcd.getDatumType().toString();\r
+            saa[i][4] = dynPcd.getDatumType()+"";\r
             \r
             ++i;\r
         }\r
@@ -1732,9 +1733,10 @@ public class FpdFileContents {
                 return;\r
             }\r
             else {\r
-                QName qSkuInfo = new QName(xmlNs, "SkuInfo");\r
-                cursor.toChild(qSkuInfo);\r
-                cursor.removeXml();\r
+               pcdData.getSkuInfoList().clear();\r
+//                QName qSkuInfo = new QName(xmlNs, "SkuInfo");\r
+//                cursor.toChild(qSkuInfo);\r
+//                cursor.removeXml();\r
             }\r
         }\r
         cursor.dispose();\r
@@ -3701,10 +3703,10 @@ class PcdItemTypeConflictException extends Exception {
     PcdItemTypeConflictException (String pcdName, String info) {\r
         ModuleIdentification mi = WorkspaceProfile.getModuleId(info);\r
         if (mi != null) {\r
-            details = pcdName + " ItemType Conflicts with " + mi.getName() + " in Pkg " + mi.getPackageId().getName();    \r
+            details = pcdName + " ItemType Conflicts with " + mi.getName() + "\n in Pkg " + mi.getPackageId().getName();    \r
         }\r
         else {\r
-            details = pcdName + " ItemType Conflicts with " + info;\r
+            details = pcdName + " ItemType Conflicts with \n" + info;\r
         }\r
     }\r
     \r
@@ -3727,7 +3729,7 @@ class PcdItemTypeConflictException extends Exception {
             moduleInfo2 = info2;\r
         }\r
         \r
-        details = pcdName + " ItemType Conflicts in " + moduleInfo1 + " and " + moduleInfo2;\r
+        details = pcdName + " ItemType Conflicts in \n" + moduleInfo1 + "\n and " + moduleInfo2;\r
     }\r
     \r
     public String getMessage() {\r