1. Fix bug EDKT241 "If and MSA file is missing, the Wizard gives a NULL Pointer Excep...
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 5 Sep 2006 02:12:02 +0000 (02:12 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 5 Sep 2006 02:12:02 +0000 (02:12 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1444 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/GlobalData.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java

index 4c17992..a50d2f1 100644 (file)
@@ -93,10 +93,13 @@ public class GlobalData {
 \r
                     } catch (IOException e) {\r
                         Log.err("Open Module Surface Area " + modulePath, e.getMessage());\r
+                        continue;\r
                     } catch (XmlException e) {\r
                         Log.err("Open Module Surface Area " + modulePath, e.getMessage());\r
+                        continue;\r
                     } catch (Exception e) {\r
                         Log.err("Open Module Surface Area " + modulePath, "Invalid file type");\r
+                        continue;\r
                     }\r
                     id = Tools.getId(modulePath, msa);\r
                     mid = new ModuleIdentification(id, vPackageList.elementAt(indexI));\r
@@ -122,10 +125,13 @@ public class GlobalData {
                     spd = OpenFile.openSpdFile(path);\r
                 } catch (IOException e) {\r
                     Log.err("Open Package Surface Area " + path, e.getMessage());\r
+                    continue;\r
                 } catch (XmlException e) {\r
                     Log.err("Open Package Surface Area " + path, e.getMessage());\r
+                    continue;\r
                 } catch (Exception e) {\r
                     Log.err("Open Package Surface Area " + path, "Invalid file type");\r
+                    continue;\r
                 }\r
                 id = Tools.getId(path, spd);\r
                 vPackageList.addElement(id);\r
@@ -150,10 +156,13 @@ public class GlobalData {
                     fpd = OpenFile.openFpdFile(path);\r
                 } catch (IOException e) {\r
                     Log.err("Open Platform Surface Area " + path, e.getMessage());\r
+                    continue;\r
                 } catch (XmlException e) {\r
                     Log.err("Open Platform Surface Area " + path, e.getMessage());\r
+                    continue;\r
                 } catch (Exception e) {\r
                     Log.err("Open Platform Surface Area " + path, "Invalid file type");\r
+                    continue;\r
                 }\r
                 id = Tools.getId(path, fpd);\r
                 vPlatformList.addElement(new PlatformIdentification(id));\r
index 9c8368b..10b8aee 100644 (file)
@@ -294,8 +294,9 @@ public class WorkspaceTools {
         for (int index = 0; index < modulePaths.size(); index++) {\r
             modulePath = modulePaths.get(index);\r
             ModuleIdentification id = GlobalData.openingModuleList.getIdByPath(modulePath);\r
-\r
-            v.addElement(id);\r
+            if (id != null) {\r
+                v.addElement(id);    \r
+            }\r
         }\r
         Sort.sortModules(v, DataType.SORT_TYPE_ASCENDING);\r
         return v;\r