Modify support module type filter for library instance selection.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2286 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jlin16 2007-01-23 10:00:41 +00:00
parent 9d3d149f81
commit 0202572b06
2 changed files with 8 additions and 3 deletions

View File

@ -93,6 +93,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
private DefaultTableModel optionsTableModel = null;
private FpdFileContents ffc = null;
private String moduleKey = null;
private ModuleIdentification moduleId = null;
private int moduleSaNum = -1;
private HashMap<LibraryClassDescriptor, ArrayList<String>> classInstanceMap = null;
//
@ -198,6 +199,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
libClassTableModel.setRowCount(0);
libInstanceTableModel.setRowCount(0);
selectedInstancesTableModel.setRowCount(0);
moduleId = WorkspaceProfile.getModuleId(moduleKey);
Vector<String> errorMsg = new Vector<String>();
try {
//
@ -353,6 +355,9 @@ public class FpdModuleSA extends JDialog implements ActionListener {
// Get the lib class consumed, produced by this module itself.
//
Vector<LibraryClassDescriptor> vClassConsumed = SurfaceAreaQuery.getLibraryClasses("ALWAYS_CONSUMED", mi);
for (int i = 0; i < vClassConsumed.size(); ++i) {
vClassConsumed.get(i).supModTypes = WorkspaceProfile.getModuleType(moduleId);
}
filterClassConsumedByArch(vClassConsumed);
if (this.classConsumed == null) {
this.classConsumed = new HashMap<LibraryClassDescriptor, ArrayList<String>>();

View File

@ -122,12 +122,12 @@ public class WorkspaceProfile {
return vArchs;
}
public static String getModuleBaseName (ModuleIdentification mi) {
public static String getModuleType (ModuleIdentification mi) {
ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = getModuleXmlObject(mi);
if (msa.getModuleDefinitions() == null || msa.getModuleDefinitions().getOutputFileBasename() == null) {
if (msa.getMsaHeader() == null || msa.getMsaHeader().getModuleType() == null) {
return null;
}
return msa.getModuleDefinitions().getOutputFileBasename();
return msa.getMsaHeader().getModuleType().toString();
}
public static boolean pcdInMsa (String cName, String tsGuid, String supArchList, ModuleIdentification mi) {