1. Add a function in WorkspaceTools to get all packages which can be repackaged.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1835 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
hche10x 2006-10-24 01:59:27 +00:00
parent d12f87d3b1
commit 0c61f948b2
1 changed files with 27 additions and 0 deletions

View File

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