diff options
author | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-14 03:19:42 +0000 |
---|---|---|
committer | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-14 03:19:42 +0000 |
commit | f893f7562bd8ca68f04863bf45f3f5754f281ecf (patch) | |
tree | 8e79a3ffea33c6f2d9f7ced068834741b75cf8ee /Tools | |
parent | 5ab95f33d1a22fbb28697d559eb04c916d83743d (diff) | |
download | edk2-platforms-f893f7562bd8ca68f04863bf45f3f5754f281ecf.tar.xz |
Fix the bug of Pcd value update in FrameworkModule settings. remove the curious warning message of pcd type can not be changed.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1942 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
3 files changed, 16 insertions, 11 deletions
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java index 1abfe14032..b6de4eb7d0 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java @@ -313,6 +313,7 @@ public class FpdBuildOptions extends IInternalFrame { private final int argWidth = 400;
private boolean ffsSelection = false;
+ private int selectedFfsTableRow = -1;
/**
* This method initializes jPanel
@@ -812,6 +813,7 @@ public class FpdBuildOptions extends IInternalFrame { ffc.getBuildOptionsFfs(row, sArray, lhm, alSections, alSection);
ffsSelection = true;
jTextFieldEncapType.setText(sArray[1]);
+ ffsSelection = false;
for (int i = 0; i < alSection.size(); ++i) {
String[] sectionRow = { alSection.get(i) };
sectionTableModel.addRow(sectionRow);
@@ -830,6 +832,7 @@ public class FpdBuildOptions extends IInternalFrame { String[] attribRow = { key, lhm.get(key) };
ffsAttributesTableModel.addRow(attribRow);
}
+ selectedFfsTableRow = row;
}
}
});
@@ -995,7 +998,7 @@ public class FpdBuildOptions extends IInternalFrame { public void insertUpdate(DocumentEvent arg0) {
if (ffsSelection) {
- ffsSelection = false;
+// ffsSelection = false;
return;
}
if (docConsole != null) {
@@ -1005,7 +1008,7 @@ public class FpdBuildOptions extends IInternalFrame { public void removeUpdate(DocumentEvent arg0) {
if (ffsSelection) {
- ffsSelection = false;
+// ffsSelection = false;
return;
}
if (docConsole != null) {
@@ -1021,10 +1024,10 @@ public class FpdBuildOptions extends IInternalFrame { });
jTextFieldEncapType.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent e) {
- if (jTableFfs.getSelectedRow() < 0) {
+ if (selectedFfsTableRow < 0) {
return;
}
- ffc.updateBuildOptionsFfsSectionsType(jTableFfs.getSelectedRow(), jTextFieldEncapType.getText());
+ ffc.updateBuildOptionsFfsSectionsType(selectedFfsTableRow, jTextFieldEncapType.getText());
}
});
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFvOptions.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFvOptions.java index 00ecad69a1..186daa44db 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFvOptions.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFvOptions.java @@ -121,7 +121,7 @@ public class FpdFvOptions extends JDialog { */
private void initialize() {
this.setSize(650, 400);
-// this.setModal(true);
+ this.setModal(true);
this.setTitle("FV Options");
this.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
this.setContentPane(getJContentPane());
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 96d2ccf3b2..f58c09570d 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 @@ -1787,24 +1787,23 @@ private JButton getJButtonUpdatePcd() { String tsGuid = model.getValueAt(row, 1)+"";
String oldItemType = model.getValueAt(row, 2)+"";
String newItemType = jComboBoxItemType.getSelectedItem()+"";
-
- model.setValueAt(jTextFieldPcdDefault.isVisible()? jTextFieldPcdDefault.getText():jComboBoxFeatureFlagValue.getSelectedItem(), row, 6);
+ String newValue = jTextFieldPcdDefault.isVisible()? jTextFieldPcdDefault.getText():jComboBoxFeatureFlagValue.getSelectedItem()+"";
String[] pcdInfo = {"", "", ""};
Vector<String> validPcdTypes = new Vector<String>();
getPcdInfo (moduleKey, cName, tsGuid, pcdInfo, validPcdTypes);
if (pcdInfo[1].equals("FIXED_AT_BUILD") && model.getValueAt(row, 5).equals("VOID*")) {
try {
- jTextFieldMaxDatumSize.setText(ffc.setMaxSizeForPointer(model.getValueAt(row, 6)+"")+"");
+ jTextFieldMaxDatumSize.setText(ffc.setMaxSizeForPointer(newValue)+"");
}
catch (Exception exp) {
JOptionPane.showMessageDialog(frame, "PCD Value MalFormed: " + exp.getMessage());
return;
}
}
- model.setValueAt(jTextFieldMaxDatumSize.getText(), row, 4);
+ String newMaxDatumSize = jTextFieldMaxDatumSize.getText();
- if (newItemType != oldItemType) {
+ if (!newItemType.equals(oldItemType)) {
Vector<ModuleIdentification> moduleInfo = new Vector<ModuleIdentification>();
try {
boolean changable = itemTypeCouldBeChanged (cName, tsGuid, newItemType, moduleInfo);
@@ -1830,8 +1829,11 @@ private JButton getJButtonUpdatePcd() { model.setValueAt(newItemType, row, 2);
}
- ffc.updatePcdData(moduleKey, cName, tsGuid, model.getValueAt(row, 2)+"", model.getValueAt(row, 4)+"", model.getValueAt(row, 6)+"");
+ ffc.updatePcdData(moduleKey, cName, tsGuid, model.getValueAt(row, 2)+"", newMaxDatumSize, newValue);
docConsole.setSaved(false);
+ model.setValueAt(newValue, row, 6);
+ model.setValueAt(newMaxDatumSize, row, 4);
+
}
});
}
|