SHOWSTOPPER TEMPORARY FIX EDK131 was reclassified to SHOWSTOPPER
authorlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 15 Jul 2006 14:54:50 +0000 (14:54 +0000)
committerlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 15 Jul 2006 14:54:50 +0000 (14:54 +0000)
Temporary fix until we can figure out how to handle Recommended Instances in SPD files.  Right now, commented out code that was breaking SPD files, by having RecommendedInstanceGuid="" and RecommendedInstanceVersion="" which is not valid!

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

Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdFileContents.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdLibClassDecls.java

index 331babb..ca3a4dc 100644 (file)
@@ -579,8 +579,13 @@ public class SpdFileContents {
                 libClass[i][0] = lc.getName();\r
                 libClass[i][1] = lc.getIncludeHeader();\r
                 libClass[i][2] = lc.getHelpText();\r
-                libClass[i][3] = lc.getRecommendedInstanceGuid();\r
-                libClass[i][4] = lc.getRecommendedInstanceVersion();\r
+// LAH added logic so you cannot set the version unless the GUID is defined.\r
+                if (lc.getRecommendedInstanceGuid() != null) {\r
+                  libClass[i][3] = lc.getRecommendedInstanceGuid();\r
+                  if (lc.getRecommendedInstanceVersion() != null) {\r
+                    libClass[i][4] = lc.getRecommendedInstanceVersion();\r
+                  }\r
+                }\r
                 if (lc.getSupArchList() != null) {\r
                     libClass[i][5] = listToString(lc.getSupArchList());\r
                 }\r
@@ -961,8 +966,13 @@ public class SpdFileContents {
         lc.setName(clsName);\r
         lc.setIncludeHeader(clsIncludeFile);\r
         lc.setHelpText(help);\r
-        lc.setRecommendedInstanceGuid(clsUsage);\r
-        lc.setRecommendedInstanceVersion(instanceVer);\r
+// LAH added logic so you cannot set the version unless the GUID is defined.\r
+        if (clsUsage != null) {\r
+          lc.setRecommendedInstanceGuid(clsUsage);\r
+          if (instanceVer != null) {\r
+            lc.setRecommendedInstanceVersion(instanceVer);\r
+          }\r
+        }\r
         if (hdrAttribArch != null) {\r
             lc.setSupArchList(stringToList(hdrAttribArch));\r
         }\r
index eca4073..e5336c2 100644 (file)
@@ -103,7 +103,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
     \r
     private OpeningPackageType docConsole = null;\r
 \r
-    private JLabel jLabel1 = null;\r
+    private JLabel jLabel1ClassName = null;\r
     \r
     private JScrollPane topScrollPane = null;  //  @jve:decl-index=0:visual-constraint="10,53"\r
     \r
@@ -111,21 +111,21 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
 \r
     private StarLabel starLabel = null;\r
 \r
-    private JLabel jLabel2 = null;\r
+    private JLabel jLabel2HelpText = null;\r
 \r
     private JTextField jTextFieldHelp = null;\r
 \r
-    private JLabel jLabel3 = null;\r
+    private JLabel jLabel3RecInstName = null;\r
 \r
-    private JTextField jTextField1 = null;\r
+    private JTextField jTextField1RecInstName = null;\r
 \r
-    private JLabel jLabel4 = null;\r
+    private JLabel jLabel4RecInstVer = null;\r
 \r
-    private JTextField jTextField2 = null;\r
+    private JTextField jTextField2RecInstVer = null;\r
 \r
-    private JLabel jLabel5 = null;\r
+    private JLabel jLabel5SupArchList = null;\r
 \r
-    private JLabel jLabel6 = null;\r
+    private JLabel jLabel6SupModList = null;\r
     \r
     private JScrollPane jScrollPaneArch = null;\r
     \r
@@ -207,13 +207,13 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
            jTable = new JTable(model);\r
            jTable.setRowHeight(20);\r
            jTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\r
-           model.addColumn("LibraryClass");\r
-           model.addColumn("IncludeHeader");\r
+           model.addColumn("Library Class");\r
+           model.addColumn("Include Header");\r
            model.addColumn("HelpText");\r
-           model.addColumn("RecommendedInstance");\r
-           model.addColumn("InstanceVersion");\r
-           model.addColumn("SupportedArch");\r
-           model.addColumn("SupportedModule");\r
+           model.addColumn("Recommended Instance");\r
+           model.addColumn("Version");\r
+           model.addColumn("Supported Arch");\r
+           model.addColumn("Supported Module");\r
            \r
            Vector<String> vArch = new Vector<String>();\r
            vArch.add("IA32");\r
@@ -236,6 +236,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
            vModule.add("DXE_SMM_DRIVER");\r
            vModule.add("UEFI_DRIVER");\r
            vModule.add("UEFI_APPLICATION");\r
+           vModule.add("TOOLS");\r
            vModule.add("USER_DEFINED");\r
            jTable.getColumnModel().getColumn(6).setCellEditor(new ListEditor(vModule));\r
           \r
@@ -417,30 +418,30 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
      **/\r
     private JPanel getJContentPane1() {\r
         if (jContentPane == null) {\r
-            jLabel6 = new JLabel();\r
-            jLabel6.setBounds(new java.awt.Rectangle(16,252,108,16));\r
-            jLabel6.setText("Supported Module");\r
-            jLabel6.setEnabled(true);\r
-            jLabel5 = new JLabel();\r
-            jLabel5.setBounds(new java.awt.Rectangle(15,169,93,16));\r
-            jLabel5.setText("Supported Arch");\r
-            jLabel5.setEnabled(true);\r
-            jLabel4 = new JLabel();\r
-            jLabel4.setBounds(new java.awt.Rectangle(16,138,196,16));\r
-            jLabel4.setEnabled(true);\r
-            jLabel4.setText("Recommended Instance Version");\r
-            jLabel3 = new JLabel();\r
-            jLabel3.setBounds(new java.awt.Rectangle(17,112,195,16));\r
-            jLabel3.setEnabled(true);\r
-            jLabel3.setText("Recommended Instance Name");\r
-            jLabel2 = new JLabel();\r
-            jLabel2.setBounds(new java.awt.Rectangle(16,33,82,20));\r
-            jLabel2.setText("Help Text");\r
+            jLabel6SupModList = new JLabel();\r
+            jLabel6SupModList.setBounds(new java.awt.Rectangle(16,252,108,16));\r
+            jLabel6SupModList.setText("Supported Module");\r
+            jLabel6SupModList.setEnabled(true);\r
+            jLabel5SupArchList = new JLabel();\r
+            jLabel5SupArchList.setBounds(new java.awt.Rectangle(15,169,93,16));\r
+            jLabel5SupArchList.setText("Supported Arch");\r
+            jLabel5SupArchList.setEnabled(true);\r
+            jLabel4RecInstVer = new JLabel();\r
+            jLabel4RecInstVer.setBounds(new java.awt.Rectangle(16,138,196,16));\r
+            jLabel4RecInstVer.setEnabled(true);\r
+            jLabel4RecInstVer.setText("Recommended Instance Version");\r
+            jLabel3RecInstName = new JLabel();\r
+            jLabel3RecInstName.setBounds(new java.awt.Rectangle(17,112,195,16));\r
+            jLabel3RecInstName.setEnabled(true);\r
+            jLabel3RecInstName.setText("Recommended Instance Name");\r
+            jLabel2HelpText = new JLabel();\r
+            jLabel2HelpText.setBounds(new java.awt.Rectangle(16,33,82,20));\r
+            jLabel2HelpText.setText("Help Text");\r
             starLabel = new StarLabel();\r
             starLabel.setBounds(new java.awt.Rectangle(1,33,10,20));\r
-            jLabel1 = new JLabel();\r
-            jLabel1.setBounds(new java.awt.Rectangle(16,6,82,20));\r
-            jLabel1.setText("Library Class");\r
+            jLabel1ClassName = new JLabel();\r
+            jLabel1ClassName.setBounds(new java.awt.Rectangle(16,6,82,20));\r
+            jLabel1ClassName.setText("Library Class");\r
             jStarLabel1 = new StarLabel();\r
             jStarLabel1.setLocation(new java.awt.Point(1,7));\r
             jStarLabel2 = new StarLabel();\r
@@ -464,20 +465,21 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
             \r
             jContentPane.add(getJTextField(), null);\r
             jContentPane.add(getJButtonBrowse(), null);\r
-            jContentPane.add(jLabel1, null);\r
+            jContentPane.add(jLabel1ClassName, null);\r
             jContentPane.add(starLabel, null);\r
-            jContentPane.add(jLabel2, null);\r
+            jContentPane.add(jLabel2HelpText, null);\r
             jContentPane.add(getJTextFieldHelp(), null);\r
-            jContentPane.add(jLabel3, null);\r
-            jContentPane.add(getJTextField1(), null);\r
-            jContentPane.add(jLabel4, null);\r
-            jContentPane.add(getJTextField2(), null);\r
-            jContentPane.add(jLabel5, null);\r
-            jContentPane.add(jLabel6, null);\r
+// LAH Removed until we can fix permanently\r
+//            jContentPane.add(jLabel3RecInstName, null);\r
+//            jContentPane.add(getJTextField1RecInstName(), null);\r
+//            jContentPane.add(jLabel4RecInstVer, null);\r
+//            jContentPane.add(getJTextField2RecInstVer(), null);\r
+            jContentPane.add(jLabel5SupArchList, null);\r
+            jContentPane.add(jLabel6SupModList, null);\r
             \r
             jContentPane.add(getJScrollPaneArch(), null);\r
             jContentPane.add(getJScrollPane1(), null);\r
-            jContentPane.add(getJComboBox(), null);\r
+// LAH            jContentPane.add(getJComboBox(), null);\r
             \r
         }\r
         \r
@@ -537,7 +539,8 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
         if (arg0.getSource() == jButtonAdd) {\r
             \r
             //ToDo: check before add\r
-            String[] row = {null, null, null, jComboBox.getSelectedItem()+"", jTextField2.getText(), null, null};\r
+            // LAH WAS String[] row = {null, null, null, jComboBox.getSelectedItem()+"", jTextField2RecInstVer.getText(), null, null};\r
+            String[] row = {null, null, null, null, null, null, null};\r
             row[0] = jTextFieldAdd.getText();\r
             row[1] = jTextField.getText().replace('\\', '/');\r
             row[2] = jTextFieldHelp.getText();\r
@@ -559,8 +562,11 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
             //convert to GUID before storing recommended lib instance.\r
             //\r
             getLibInstances(row[0]);\r
-            String recommendGuid = nameToGuid(row[3]);\r
-            sfc.genSpdLibClassDeclarations(row[0], recommendGuid, row[1], row[2], row[5], null, null, row[4], null, row[6]);\r
+\r
+// LAH            recommendGuid = nameToGuid(row[3]);\r
+\r
+// LAH WAS             sfc.genSpdLibClassDeclarations(row[0], recommendGuid, row[1], row[2], row[5], null, null, row[4], null, row[6]);\r
+            sfc.genSpdLibClassDeclarations(row[0], null, row[1], row[2], row[5], null, null, row[4], null, row[6]);\r
             \r
         }\r
         //\r
@@ -700,32 +706,32 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
     }\r
 \r
     /**\r
-     * This method initializes jTextField1     \r
+     * This method initializes jTextField1RecInstName  \r
      *         \r
      * @return javax.swing.JTextField  \r
      */\r
-    private JTextField getJTextField1() {\r
-        if (jTextField1 == null) {\r
-            jTextField1 = new JTextField();\r
-            jTextField1.setBounds(new java.awt.Rectangle(218,110,291,20));\r
-            jTextField1.setEnabled(true);\r
-            jTextField1.setVisible(false);\r
+    private JTextField getJTextField1RecInstName() {\r
+        if (jTextField1RecInstName == null) {\r
+            jTextField1RecInstName = new JTextField();\r
+            jTextField1RecInstName.setBounds(new java.awt.Rectangle(218,110,291,20));\r
+            jTextField1RecInstName.setEnabled(true);\r
+            jTextField1RecInstName.setVisible(false);\r
         }\r
-        return jTextField1;\r
+        return jTextField1RecInstName;\r
     }\r
 \r
     /**\r
-     * This method initializes jTextField2     \r
+     * This method initializes jTextField2RecInstVer   \r
      *         \r
      * @return javax.swing.JTextField  \r
      */\r
-    private JTextField getJTextField2() {\r
-        if (jTextField2 == null) {\r
-            jTextField2 = new JTextField();\r
-            jTextField2.setBounds(new java.awt.Rectangle(218,135,292,20));\r
-            jTextField2.setEnabled(true);\r
+    private JTextField getJTextField2RecInstVer() {\r
+        if (jTextField2RecInstVer == null) {\r
+            jTextField2RecInstVer = new JTextField();\r
+            jTextField2RecInstVer.setBounds(new java.awt.Rectangle(218,135,292,20));\r
+            jTextField2RecInstVer.setEnabled(true);\r
         }\r
-        return jTextField2;\r
+        return jTextField2RecInstVer;\r
     }\r
 \r
     private JScrollPane getJScrollPaneArch() {\r