no display "null" if no recommended instance specified in library class declaration.
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 7 Aug 2006 08:47:34 +0000 (08:47 +0000)
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 7 Aug 2006 08:47:34 +0000 (08:47 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1202 6f19259b-4bc3-4df7-8a09-765794883524

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

index 5c3260d..0ed5768 100644 (file)
@@ -310,6 +310,10 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
             if (name != null && name.length() > 0) {\r
                 getLibInstances(lib);\r
                 guid = nameToGuid(name);\r
+                if (guid == null){\r
+                  JOptionPane.showMessageDialog(frame, "Recommended Instance NOT exists.");\r
+                  return;\r
+                }\r
             }\r
             \r
             String[] sa = new String[7];\r
@@ -618,6 +622,15 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
             //\r
             getLibInstances(row[cnClassName]);\r
             String recommendGuid = nameToGuid(row[cnRecInstName]);\r
+            if (row[cnRecInstName].equals("null")) {\r
+                row[cnRecInstName] = null;\r
+            }\r
+            else{\r
+                if (recommendGuid == null) {\r
+                  JOptionPane.showMessageDialog(frame, "Recommended Instance NOT exists.");\r
+                  return;\r
+                }\r
+            }\r
 \r
             sfc.genSpdLibClassDeclarations(row[cnClassName], recommendGuid, row[cnHdrFile], row[cnHelpText], row[cnSupArch], null, null, row[cnRecInstVer], null, row[cnSupMod]);\r
             model.addRow(row);\r
@@ -939,7 +952,6 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
     private String nameToGuid(String name) {\r
         String s = null;\r
         if (!libNameGuidMap.containsKey(name)) {\r
-            JOptionPane.showMessageDialog(frame, "Recommended Instance NOT exists.");\r
             return s;\r
         }\r
         \r