]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java
Modify the way of pcd warning message reporting to be a total in the end.
[mirror_edk2.git] / Tools / Java / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdFrameworkModules.java
index 75f7474a02489437221ef6841b70cf54b30405e2..74b84626e5f98e457366a3528e7cdd0b1bcda2a8 100644 (file)
@@ -672,7 +672,8 @@ public class FpdFrameworkModules extends IInternalFrame {
     \r
     private void showSettingsDlg (int row) {\r
         try {\r
-            if (ffc.adjustPcd(row)) {\r
+            Vector<String> vExceptions = new Vector<String>();\r
+            if (ffc.adjustPcd(row, vExceptions)) {\r
                 JOptionPane.showMessageDialog(frame, "Pcd entries sync. with those in MSA files.");\r
                 docConsole.setSaved(false);\r
             }\r
@@ -852,9 +853,17 @@ public class FpdFrameworkModules extends IInternalFrame {
     public FpdFrameworkModules(OpeningPlatformType opt) {\r
         this(opt.getXmlFpd());\r
         docConsole = opt;\r
-        if (pcdSync()) {\r
+        Vector<String> vExceptions = new Vector<String>();\r
+        if (pcdSync(vExceptions)) {\r
             JOptionPane.showMessageDialog(frame, "PCD in this platform are synchronized with those in MSA files.");    \r
         }\r
+        if (vExceptions.size() > 0) {\r
+            String errorMsg = "";\r
+            for (int i = 0; i < vExceptions.size(); ++i) {\r
+                errorMsg += " " + vExceptions.get(i);\r
+            }\r
+            JOptionPane.showMessageDialog(frame, "Error occurred during synchronization:" + errorMsg);\r
+        }\r
     }\r
 \r
     private void init(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {\r
@@ -916,16 +925,16 @@ public class FpdFrameworkModules extends IInternalFrame {
         \r
     }\r
 \r
-    private boolean pcdSync() {\r
+    private boolean pcdSync(Vector<String> v) {\r
         boolean synced = false;\r
         for (int i = 0; i < jTableFpdModules.getRowCount(); ++i) {\r
             try {\r
-                if (ffc.adjustPcd(i)) {\r
+                if (ffc.adjustPcd(i, v)) {\r
                     synced = true;\r
                 }\r
             }\r
             catch (Exception exp) {\r
-                JOptionPane.showMessageDialog(frame, exp.getMessage());\r
+//                JOptionPane.showMessageDialog(frame, exp.getMessage());\r
                 continue;\r
             }\r
         }\r