]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Add a function in WorkspaceTools to get all packages which can be repackaged.
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 24 Oct 2006 01:59:27 +0000 (01:59 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 24 Oct 2006 01:59:27 +0000 (01:59 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1835 6f19259b-4bc3-4df7-8a09-765794883524

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

index 1969d07503f12e215ae13791c8d9b3be982fba5b..a90ec26955e5d24908af82ae8a0d78ce962adec2 100644 (file)
@@ -39,6 +39,7 @@ import org.tianocore.frameworkwizard.common.SaveFile;
 import org.tianocore.frameworkwizard.common.Sort;\r
 import org.tianocore.frameworkwizard.common.Tools;\r
 import org.tianocore.frameworkwizard.common.Identifications.Identification;\r
 import org.tianocore.frameworkwizard.common.Sort;\r
 import org.tianocore.frameworkwizard.common.Tools;\r
 import org.tianocore.frameworkwizard.common.Identifications.Identification;\r
+import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageType;\r
 import org.tianocore.frameworkwizard.far.FarHeader;\r
 import org.tianocore.frameworkwizard.far.FarIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.far.FarHeader;\r
 import org.tianocore.frameworkwizard.far.FarIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
@@ -219,6 +220,32 @@ public class WorkspaceTools {
         return GlobalData.vPackageList;\r
     }\r
 \r
         return GlobalData.vPackageList;\r
     }\r
 \r
+    /**\r
+     Get all package which match parameter isRepackagable\r
+     \r
+     @param isRepackagable\r
+     @return\r
+     \r
+     **/\r
+    public Vector<PackageIdentification> getAllRepackagbalePackages() {\r
+        Vector<PackageIdentification> v = new Vector<PackageIdentification>();\r
+        for (int index = 0; index < GlobalData.openingPackageList.size(); index++) {\r
+            OpeningPackageType opt = GlobalData.openingPackageList.getOpeningPackageByIndex(index);\r
+            if (opt.getXmlSpd() != null) {\r
+                if (opt.getXmlSpd().getPackageDefinitions() != null) {\r
+                    if (opt.getXmlSpd().getPackageDefinitions().getRePackage()) {\r
+                        v.addElement(opt.getId());\r
+                    }\r
+                } else {\r
+                    v.addElement(opt.getId());\r
+                }\r
+            } else {\r
+                v.addElement(opt.getId());\r
+            }\r
+        }\r
+        return v;\r
+    }\r
+\r
     public Vector<FarIdentification> getAllFars() {\r
 \r
         Vector<FarIdentification> v = new Vector<FarIdentification>();\r
     public Vector<FarIdentification> getAllFars() {\r
 \r
         Vector<FarIdentification> v = new Vector<FarIdentification>();\r