diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java index 1c41daf1fe..f7de3a7388 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java @@ -1345,7 +1345,7 @@ public class FpdFileContents { fpdPcd.setDatumType(PcdDataTypes.Enum.forString(dataType)); fpdPcd.setItemType(PcdItemTypes.Enum.forString(itemType)); - if (defaultVal != null){ + if (defaultVal != null && defaultVal.length() > 0){ fpdPcd.setValue(defaultVal); } else { @@ -1356,7 +1356,7 @@ public class FpdFileContents { fpdPcd.setValue("FALSE"); } if (dataType.equals("VOID*")) { - fpdPcd.setValue(""); + fpdPcd.setValue("L\"\""); } } // diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java index e415d22e43..1f1bf214f3 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java @@ -856,6 +856,7 @@ public class FpdFrameworkModules extends IInternalFrame { Vector vExceptions = new Vector(); if (pcdSync(vExceptions)) { JOptionPane.showMessageDialog(frame, "PCD in this platform are synchronized with those in MSA files."); + docConsole.setSaved(false); } if (vExceptions.size() > 0) { String errorMsg = ""; diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java index f58c09570d..2f3dec94c8 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java @@ -1786,8 +1786,21 @@ private JButton getJButtonUpdatePcd() { String cName = model.getValueAt(row, 0)+""; String tsGuid = model.getValueAt(row, 1)+""; String oldItemType = model.getValueAt(row, 2)+""; + String dataType = model.getValueAt(row, 5)+""; String newItemType = jComboBoxItemType.getSelectedItem()+""; String newValue = jTextFieldPcdDefault.isVisible()? jTextFieldPcdDefault.getText():jComboBoxFeatureFlagValue.getSelectedItem()+""; + if (newValue.length() == 0){ + + if (dataType.equals("UINT8") || dataType.equals("UINT16") || dataType.equals("UINT32") || dataType.equals("UINT64")) { + newValue = "0"; + } + if (dataType.equals("BOOLEAN")){ + newValue = "FALSE"; + } + if (dataType.equals("VOID*")) { + newValue = "L\"\""; + } + } String[] pcdInfo = {"", "", ""}; Vector validPcdTypes = new Vector();