1. Fix EDKT319 "Can't save when changing value of "PCD Is Driver" on MsaHeader page"
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 22 Sep 2006 02:12:53 +0000 (02:12 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 22 Sep 2006 02:12:53 +0000 (02:12 +0000)
2. Fix EDKT322 "Remove "Default" from usage to sync with the latest schema"
3. Fix EDKT286 "A rare display mistake in error message dialog box"

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1592 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Log.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/MsaHeader.java

index 680bd65..3ee49a4 100644 (file)
@@ -353,7 +353,6 @@ public class EnumerationData {
         vLibraryUsage.addElement("SOMETIMES_CONSUMED");\r
         vLibraryUsage.addElement("ALWAYS_PRODUCED");\r
         vLibraryUsage.addElement("SOMETIMES_PRODUCED");\r
-        vLibraryUsage.addElement("DEFAULT");\r
         vLibraryUsage.addElement("PRIVATE");\r
     }\r
     \r
@@ -516,7 +515,6 @@ public class EnumerationData {
         vPackageUsage.removeAllElements();\r
         vPackageUsage.addElement("ALWAYS_CONSUMED");\r
         vPackageUsage.addElement("ALWAYS_PRODUCED");\r
-        vPackageUsage.addElement("DEFAULT");\r
     }\r
     \r
     private void initProtocolUsage() {\r
@@ -618,7 +616,6 @@ public class EnumerationData {
         vBootModeNames.addElement("MINIMAL");\r
         vBootModeNames.addElement("NO_CHANGE");\r
         vBootModeNames.addElement("DIAGNOSTICS");\r
-        vBootModeNames.addElement("DEFAULT");\r
         vBootModeNames.addElement("S2_RESUME");\r
         vBootModeNames.addElement("S3_RESUME");\r
         vBootModeNames.addElement("S4_RESUME");\r
@@ -666,7 +663,6 @@ public class EnumerationData {
         vGuidUsage.addElement("SOMETIMES_CONSUMED");\r
         vGuidUsage.addElement("ALWAYS_PRODUCED");\r
         vGuidUsage.addElement("SOMETIMES_PRODUCED");\r
-        vGuidUsage.addElement("DEFAULT");\r
         vGuidUsage.addElement("PRIVATE");\r
     }\r
     \r
@@ -678,24 +674,6 @@ public class EnumerationData {
         vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER);\r
         vExternTypes.addElement(EnumerationData.EXTERNS_LIBRARY);\r
         vExternTypes.addElement(EnumerationData.EXTERNS_CALL_BACK);\r
-        \r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_PCD_IS_DRIVER);\r
-//\r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_SPECIFICATION);\r
-//        \r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_MODULE_ENTRY_POINT);\r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_MODULE_UNLOAD_IMAGE);\r
-//        \r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_CONSTRUCTOR);\r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_DESTRUCTOR);\r
-        \r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER_BINDING);\r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_COMPONENT_NAME);\r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER_CONFIG);\r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER_DIAG);\r
-//        \r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_SET_VIRTUAL_ADDRESS_MAP_CALL_BACK);\r
-//        vExternTypes.addElement(EnumerationData.EXTERNS_EXIT_BOOT_SERVICES_CALL_BACK);\r
     }\r
     \r
     private void initPcdDriverTypes() {\r
@@ -719,7 +697,6 @@ public class EnumerationData {
         vPcdUsage.addElement("SOMETIMES_CONSUMED");\r
         vPcdUsage.addElement("ALWAYS_PRODUCED");\r
         vPcdUsage.addElement("SOMETIMES_PRODUCED");\r
-        vPcdUsage.addElement("DEFAULT");\r
     }\r
     \r
     public Vector<String> getvCompontentType() {\r
index 0de6aa7..0607658 100644 (file)
@@ -68,11 +68,9 @@ public class Log {
         try {\r
             //Log.log("Test", "test");\r
             //Log.err("Test1", "test1");\r
-            Log.wrn("1");\r
             Log\r
-               .wrn(\r
-                    "aaa bbbbbb cccccccccccc ddddddddddd eeeeeeeeee fffffffffff gggggggggggggggggg hhhhhhhhhhhhhhhhhhhhhhhhhhhhh",\r
-                    "iiiiii jjjj kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk lll mmm nn poooooooooooooooooooooooooooooooooooooooooooop");\r
+               .wrn("aaa bbbbbb cccccccccccc ddddddddddd eeeeeeeeee fffffffffff gggggggggggggggggg hhhhhhhhhhhhhhhhhhhhhhhhhhhhh iiiii jjjj kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk lll mmm nn poooooooooooooooooooooooooooooooooooooooooooop");\r
+            Log.wrn("Incorrect data type for ModuleEntryPoint");\r
         } catch (Exception e) {\r
             e.printStackTrace();\r
         }\r
@@ -176,7 +174,8 @@ public class Log {
      **/\r
     private static void showWrnMessage(String strErr) {\r
         String strReturn = Tools.wrapStringByWord(strErr);\r
-        JOptionPane.showConfirmDialog(null, strReturn, "Warning", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);\r
+        JOptionPane\r
+                   .showConfirmDialog(null, strReturn, "Warning", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);\r
     }\r
 \r
     /**\r
index e6647d2..33dc521 100644 (file)
@@ -354,7 +354,7 @@ public class Tools {
                 // Finish previous line\r
                 //\r
                 if (!isCopied) {\r
-                    strReturn = strReturn + strTemp + DataType.UNIX_LINE_SEPARATOR;\r
+                    strReturn = strReturn + strTemp + DataType.LINE_SEPARATOR;\r
                     strTemp = "";\r
                 }\r
                 //\r
@@ -376,8 +376,12 @@ public class Tools {
                     strTemp = strTemp + " " + ss;\r
                     continue;\r
                 } else {\r
-                    strReturn = strReturn + strTemp + DataType.UNIX_LINE_SEPARATOR;\r
-                    strTemp = ss + " ";\r
+                    strReturn = strReturn + strTemp + DataType.LINE_SEPARATOR;\r
+                    if ((index == s.length - 1) && (!ss.equals(""))) {\r
+                        strReturn = strReturn + ss;\r
+                    } else {\r
+                        strTemp = ss + " ";\r
+                    }\r
                     isCopied = true;\r
                 }\r
             }\r
@@ -632,7 +636,7 @@ public class Tools {
         count = wholeString.split(searchString).length;\r
         return count;\r
     }\r
-    \r
+\r
     /**\r
      * Check the input data is empty or not\r
      * \r
index 70e2166..fddf763 100644 (file)
@@ -640,6 +640,7 @@ public class MsaHeader extends IInternalFrame {
             jComboBoxPcdIsDriver.setPreferredSize(new java.awt.Dimension(320, 20));\r
             jComboBoxPcdIsDriver.setBounds(new java.awt.Rectangle(160, 530, 320, 20));\r
             jComboBoxPcdIsDriver.addItemListener(this);\r
+            jComboBoxPcdIsDriver.addFocusListener(this);\r
             jComboBoxPcdIsDriver.setEnabled(false);\r
             Tools.generateComboBoxByVector(jComboBoxPcdIsDriver, ed.getVPcdDriverTypes());\r
         }\r
@@ -889,7 +890,6 @@ public class MsaHeader extends IInternalFrame {
             jContentPane.add(jLabelLicense, null);\r
             jContentPane.add(jLabelCopyright, null);\r
             jContentPane.add(jLabelDescription, null);\r
-            //            jContentPane.add(jLabelSpecification, null);\r
             jContentPane.add(getJTextFieldSpecification(), null);\r
             jContentPane.add(getJButtonOk(), null);\r
             jContentPane.add(getJButtonCancel(), null);\r
@@ -929,8 +929,6 @@ public class MsaHeader extends IInternalFrame {
             jStarLabel13.setLocation(new java.awt.Point(0, 480));\r
             jStarLabel14 = new StarLabel();\r
             jStarLabel14.setLocation(new java.awt.Point(0, 505));\r
-            //            jStarLabel15 = new StarLabel();\r
-            //            jStarLabel15.setLocation(new java.awt.Point(0, 530));\r
 \r
             jContentPane.add(jStarLabel1, null);\r
             jContentPane.add(jStarLabel2, null);\r
@@ -943,7 +941,6 @@ public class MsaHeader extends IInternalFrame {
             jContentPane.add(jStarLabel12, null);\r
             jContentPane.add(jStarLabel13, null);\r
             jContentPane.add(jStarLabel14, null);\r
-            //            jContentPane.add(jStarLabel15, null);\r
             jContentPane.add(getJScrollPaneCopyright(), null);\r
 \r
             jContentPane.add(getJCheckBoxIa32(), null);\r
@@ -1411,21 +1408,17 @@ public class MsaHeader extends IInternalFrame {
         //\r
         // Check Pcd is Driver\r
         //\r
-        if (arg0.getSource() == this.jCheckBoxPcd) {\r
+        if (arg0.getSource() == this.jCheckBoxPcd || arg0.getSource() == this.jComboBoxPcdIsDriver) {\r
             if ((this.ex == null) && this.jCheckBoxPcd.isSelected()) {\r
                 this.ex = ExternsDocument.Externs.Factory.newInstance();\r
                 this.ex.setPcdIsDriver(PcdDriverTypes.Enum.forString(this.jComboBoxPcdIsDriver.getSelectedItem()\r
                                                                                               .toString()));\r
                 this.msa.setExterns(this.ex);\r
-            }\r
-\r
-            if ((this.ex != null) && (this.ex.getPcdIsDriver() == null) && this.jCheckBoxPcd.isSelected()) {\r
+            } else if ((this.ex != null) && (this.ex.getPcdIsDriver() == null) && this.jCheckBoxPcd.isSelected()) {\r
                 this.ex.setPcdIsDriver(PcdDriverTypes.Enum.forString(this.jComboBoxPcdIsDriver.getSelectedItem()\r
                                                                                               .toString()));\r
                 this.msa.setExterns(this.ex);\r
-            }\r
-\r
-            if ((this.ex != null) && (this.ex.getPcdIsDriver() != null)) {\r
+            } else if ((this.ex != null) && (this.ex.getPcdIsDriver() != null)) {\r
                 if (this.jCheckBoxPcd.isSelected()\r
                     && !this.jComboBoxPcdIsDriver.getSelectedItem().toString().equals(\r
                                                                                       this.ex.getPcdIsDriver()\r
@@ -1465,14 +1458,10 @@ public class MsaHeader extends IInternalFrame {
                 this.ex = ExternsDocument.Externs.Factory.newInstance();\r
                 this.ex.setTianoR8FlashMapH(this.jCheckBoxFlashMap.isSelected());\r
                 this.msa.setExterns(this.ex);\r
-            }\r
-\r
-            if ((this.ex != null) && this.jCheckBoxFlashMap.isSelected()) {\r
+            } else if ((this.ex != null) && this.jCheckBoxFlashMap.isSelected()) {\r
                 this.ex.setTianoR8FlashMapH(this.jCheckBoxFlashMap.isSelected());\r
                 this.msa.setExterns(this.ex);\r
-            }\r
-\r
-            if ((this.ex != null) && !this.jCheckBoxFlashMap.isSelected()) {\r
+            } else if ((this.ex != null) && !this.jCheckBoxFlashMap.isSelected()) {\r
                 ExternsDocument.Externs newEx = ExternsDocument.Externs.Factory.newInstance();\r
                 if (this.ex.getExternList() != null) {\r
                     for (int index = 0; index < this.ex.getExternList().size(); index++) {\r