diff options
author | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-09-14 07:06:02 +0000 |
---|---|---|
committer | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-09-14 07:06:02 +0000 |
commit | ce32083fca6d876a3d0d0339d2ae2dd40e40d02e (patch) | |
tree | fbc6c7bcedc7d2237ece154c90d8de15ae65f0a2 /Tools | |
parent | 2a9060e2949f6d21da847ba84a894cefff78d949 (diff) | |
download | edk2-platforms-ce32083fca6d876a3d0d0339d2ae2dd40e40d02e.tar.xz |
Add Binary or Source type check before providing PCD item choices when editing platform PCDBuildData.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1533 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
2 files changed, 21 insertions, 9 deletions
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java index b54715b877..946a6b64d9 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java @@ -622,6 +622,7 @@ public class FpdFileContents { //
sa[0] = spdPcd.getHelpText() + msaPcd.getHelpText();
sa[1] = msaPcd.getPcdItemType()+"";
+ sa[2] = msa.getModuleDefinitions().getBinaryModule()+"";
return true;
}
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java index 8cf23681c1..e82ed2df8b 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java @@ -573,17 +573,20 @@ public class FpdModuleSA extends JDialog implements ActionListener { String cName = model.getValueAt(selectedRow, 0)+"";
String tsGuid = model.getValueAt(selectedRow, 1)+"";
String itemType = model.getValueAt(selectedRow, 2)+"";
- String[] pcdInfo = {"", ""};
+ //
+ // array for pcd related information: helpText, itemType, moduleType.
+ //
+ String[] pcdInfo = {"", "", ""};
getPcdInfo(cName, tsGuid, pcdInfo);
jTextAreaPcdHelp.setText(pcdInfo[0]);
- initComboBox(pcdInfo[1]);
+ initComboBox(pcdInfo[1], pcdInfo[2]);
jComboBoxItemType.setSelectedItem(itemType);
jTextFieldMaxDatumSize.setEnabled(true);
jTextFieldMaxDatumSize.setVisible(true);
jTextFieldMaxDatumSize.setText(jTablePcd.getValueAt(selectedRow, 4)+"");
jTextFieldPcdDefault.setEnabled(true);
jTextFieldPcdDefault.setText(jTablePcd.getValueAt(selectedRow, 6)+"");
- if (jTablePcd.getValueAt(selectedRow, 5).equals("VOID*")) {
+ if (model.getValueAt(selectedRow, 5).equals("VOID*")) {
if (pcdInfo[1].equals("FEATURE_FLAG")) {
jTextFieldMaxDatumSize.setVisible(false);
}
@@ -609,7 +612,7 @@ public class FpdModuleSA extends JDialog implements ActionListener { if (model.getValueAt(selectedRow, 2).equals("FEATURE_FLAG")){
jTextFieldPcdDefault.setVisible(false);
jComboBoxFeatureFlagValue.setVisible(true);
- jComboBoxFeatureFlagValue.setSelectedItem(jTablePcd.getValueAt(selectedRow, 6)+"");
+ jComboBoxFeatureFlagValue.setSelectedItem(model.getValueAt(selectedRow, 6)+"");
}
else{
jTextFieldPcdDefault.setVisible(true);
@@ -630,10 +633,10 @@ public class FpdModuleSA extends JDialog implements ActionListener { return jTablePcd;
}
- private void initComboBox(String originalType) {
+ private void initComboBox(String originalType, String mType) {
jComboBoxItemType.removeAllItems();
jComboBoxItemType.addItem(originalType);
- if (originalType.equals("PATCHABLE_IN_MODULE")) {
+ if (originalType.equals("PATCHABLE_IN_MODULE") && mType.equalsIgnoreCase("false")) {
jComboBoxItemType.addItem("FIXED_AT_BUILD");
}
if (originalType.equals("DYNAMIC")) {
@@ -1453,14 +1456,14 @@ private JComboBox getJComboBoxItemType() { }
if (jComboBoxItemType.getItemCount() == 3) {
if (!jComboBoxItemType.getSelectedItem().equals("DYNAMIC")) {
- pcdDynamicToNonDynamic(model.getValueAt(row, 0)+"", model.getValueAt(row, 1)+"");
+
if (jComboBoxItemType.getSelectedItem().equals("FIXED_AT_BUILD")) {
jTextFieldPcdDefault.setText("");
jTextFieldPcdDefault.setEnabled(true);
}
}
else{
- pcdNonDynamicToDynamic(model.getValueAt(row, 0)+"", model.getValueAt(row, 1)+"");
+
}
}
}
@@ -1555,9 +1558,17 @@ private JButton getJButtonUpdatePcd() { return;
}
docConsole.setSaved(false);
- model.setValueAt(jComboBoxItemType.getSelectedItem(), row, 2);
+ String oldItemType = model.getValueAt(row, 2)+"";
+ String newItemType = jComboBoxItemType.getSelectedItem()+"";
+ model.setValueAt(newItemType, row, 2);
model.setValueAt(jTextFieldMaxDatumSize.getText(), row, 4);
model.setValueAt(jTextFieldPcdDefault.isVisible()? jTextFieldPcdDefault.getText():jComboBoxFeatureFlagValue.getSelectedItem(), row, 6);
+ if (oldItemType.equals("DYNAMIC") && !newItemType.equals("DYNAMIC")) {
+ pcdDynamicToNonDynamic(model.getValueAt(row, 0)+"", model.getValueAt(row, 1)+"");
+ }
+ if (!oldItemType.equals("DYNAMIC") && newItemType.equals("DYNAMIC")) {
+ pcdNonDynamicToDynamic(model.getValueAt(row, 0)+"", model.getValueAt(row, 1)+"");
+ }
ffc.updatePcdData(moduleKey, model.getValueAt(row, 0)+"", model.getValueAt(row, 1)+"", model.getValueAt(row, 2)+"", model.getValueAt(row, 4)+"", model.getValueAt(row, 6)+"");
}
});
|