]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the bug of Pcd value update in FrameworkModule settings. remove the curious warni...
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 14 Nov 2006 03:19:42 +0000 (03:19 +0000)
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 14 Nov 2006 03:19:42 +0000 (03:19 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1942 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFvOptions.java
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java

index 1abfe14032c6052b13a539b983bf5928e0cb8ebc..b6de4eb7d0b333a0135feb1e0371b38efdfdace0 100644 (file)
@@ -313,6 +313,7 @@ public class FpdBuildOptions extends IInternalFrame {
     private final int argWidth = 400;\r
     \r
     private boolean ffsSelection = false;\r
+    private int selectedFfsTableRow = -1;\r
 \r
     /**\r
      * This method initializes jPanel  \r
@@ -812,6 +813,7 @@ public class FpdBuildOptions extends IInternalFrame {
                         ffc.getBuildOptionsFfs(row, sArray, lhm, alSections, alSection);\r
                         ffsSelection = true;\r
                         jTextFieldEncapType.setText(sArray[1]);\r
+                        ffsSelection = false;\r
                         for (int i = 0; i < alSection.size(); ++i) {\r
                             String[] sectionRow = { alSection.get(i) };\r
                             sectionTableModel.addRow(sectionRow);\r
@@ -830,6 +832,7 @@ public class FpdBuildOptions extends IInternalFrame {
                             String[] attribRow = { key, lhm.get(key) };\r
                             ffsAttributesTableModel.addRow(attribRow);\r
                         }\r
+                        selectedFfsTableRow = row;\r
                     }\r
                 }\r
             });\r
@@ -995,7 +998,7 @@ public class FpdBuildOptions extends IInternalFrame {
 \r
                 public void insertUpdate(DocumentEvent arg0) {\r
                     if (ffsSelection) {\r
-                        ffsSelection = false;\r
+//                        ffsSelection = false;\r
                         return;\r
                     }\r
                     if (docConsole != null) {\r
@@ -1005,7 +1008,7 @@ public class FpdBuildOptions extends IInternalFrame {
 \r
                 public void removeUpdate(DocumentEvent arg0) {\r
                     if (ffsSelection) {\r
-                        ffsSelection = false;\r
+//                        ffsSelection = false;\r
                         return;\r
                     }\r
                     if (docConsole != null) {\r
@@ -1021,10 +1024,10 @@ public class FpdBuildOptions extends IInternalFrame {
             });\r
             jTextFieldEncapType.addFocusListener(new java.awt.event.FocusAdapter() {\r
                 public void focusLost(java.awt.event.FocusEvent e) {\r
-                    if (jTableFfs.getSelectedRow() < 0) {\r
+                    if (selectedFfsTableRow < 0) {\r
                         return;\r
                     }\r
-                    ffc.updateBuildOptionsFfsSectionsType(jTableFfs.getSelectedRow(), jTextFieldEncapType.getText());\r
+                    ffc.updateBuildOptionsFfsSectionsType(selectedFfsTableRow, jTextFieldEncapType.getText());\r
                     \r
                 }\r
             });\r
index 00ecad69a12466351177d49d806d8b764d6d13f1..186daa44db18be04095f5d88024c35c1ee572b3f 100644 (file)
@@ -121,7 +121,7 @@ public class FpdFvOptions extends JDialog {
      */\r
     private void initialize() {\r
         this.setSize(650, 400);\r
-//        this.setModal(true);\r
+        this.setModal(true);\r
         this.setTitle("FV Options");\r
         this.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\r
         this.setContentPane(getJContentPane());\r
index 96d2ccf3b2f16ed4fd70188f872c87e75b2debc5..f58c09570d4a724b9d4f08ad61eb64f9c879934f 100644 (file)
@@ -1787,24 +1787,23 @@ private JButton getJButtonUpdatePcd() {
                 String tsGuid = model.getValueAt(row, 1)+"";\r
                 String oldItemType = model.getValueAt(row, 2)+"";\r
                 String newItemType = jComboBoxItemType.getSelectedItem()+"";\r
-                \r
-                model.setValueAt(jTextFieldPcdDefault.isVisible()? jTextFieldPcdDefault.getText():jComboBoxFeatureFlagValue.getSelectedItem(), row, 6);\r
+                String newValue = jTextFieldPcdDefault.isVisible()? jTextFieldPcdDefault.getText():jComboBoxFeatureFlagValue.getSelectedItem()+""; \r
                 \r
                 String[] pcdInfo = {"", "", ""};\r
                 Vector<String> validPcdTypes = new Vector<String>();\r
                 getPcdInfo (moduleKey, cName, tsGuid, pcdInfo, validPcdTypes);\r
                 if (pcdInfo[1].equals("FIXED_AT_BUILD") && model.getValueAt(row, 5).equals("VOID*")) {\r
                     try {\r
-                        jTextFieldMaxDatumSize.setText(ffc.setMaxSizeForPointer(model.getValueAt(row, 6)+"")+"");\r
+                        jTextFieldMaxDatumSize.setText(ffc.setMaxSizeForPointer(newValue)+"");\r
                     }\r
                     catch (Exception exp) {\r
                         JOptionPane.showMessageDialog(frame, "PCD Value MalFormed: " + exp.getMessage());\r
                         return;\r
                     }\r
                 }\r
-                model.setValueAt(jTextFieldMaxDatumSize.getText(), row, 4);\r
+                String newMaxDatumSize = jTextFieldMaxDatumSize.getText();\r
                 \r
-                if (newItemType != oldItemType) {\r
+                if (!newItemType.equals(oldItemType)) {\r
                     Vector<ModuleIdentification> moduleInfo = new Vector<ModuleIdentification>();\r
                     try {\r
                         boolean changable = itemTypeCouldBeChanged (cName, tsGuid, newItemType, moduleInfo);\r
@@ -1830,8 +1829,11 @@ private JButton getJButtonUpdatePcd() {
                     model.setValueAt(newItemType, row, 2);\r
                 }\r
                 \r
-                ffc.updatePcdData(moduleKey, cName, tsGuid, model.getValueAt(row, 2)+"", model.getValueAt(row, 4)+"", model.getValueAt(row, 6)+"");\r
+                ffc.updatePcdData(moduleKey, cName, tsGuid, model.getValueAt(row, 2)+"", newMaxDatumSize, newValue);\r
                 docConsole.setSaved(false);\r
+                model.setValueAt(newValue, row, 6);\r
+                model.setValueAt(newMaxDatumSize, row, 4);\r
+                \r
             }\r
         });\r
     }\r