rearrange target of procedures of library instance selection.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1402 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jlin16 2006-08-29 09:18:39 +00:00
parent c60019f637
commit a094728fa7
2 changed files with 24 additions and 25 deletions

View File

@ -631,25 +631,18 @@ public class FpdFileContents {
if (moduleSA.getPcdBuildDefinition() != null) {
XmlCursor cursor = moduleSA.getPcdBuildDefinition().newCursor();
if (cursor.toFirstChild()) {
PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData pcdData = (PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData) cursor
.getObject();
if (msaPcd.getCName().equals(pcdData.getCName())
&& msaPcd.getTokenSpaceGuidCName().equals(pcdData.getTokenSpaceGuidCName())) {
maintainDynPcdMap(pcdData.getCName() + " " + pcdData.getTokenSpaceGuidCName(), moduleKey);
cursor.removeXml();
break;
}
while (cursor.toNextSibling()) {
pcdData = (PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData) cursor.getObject();
do {
PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData pcdData = (PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData) cursor
.getObject();
if (msaPcd.getCName().equals(pcdData.getCName())
&& msaPcd.getTokenSpaceGuidCName().equals(pcdData.getTokenSpaceGuidCName())) {
maintainDynPcdMap(pcdData.getCName() + " " + pcdData.getTokenSpaceGuidCName(),
moduleKey);
cursor.removeXml();
break;
}
}
} while (cursor.toNextSibling());
}
cursor.dispose();
}

View File

@ -192,10 +192,9 @@ public class FpdModuleSA extends JDialog implements ActionListener {
resolveLibraryInstances(saa[i][1] + " " + saa[i][2] + " " + saa[i][3] + " " + saa[i][4]);
selectedInstancesTableModel.addRow(saa[i]);
}
}
}
showClassToResolved();
}
public void initFvInfo (String key) {
@ -286,7 +285,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
}
showClassToResolved();
// showClassToResolved();
}
catch(Exception e) {
e.printStackTrace();
@ -418,6 +417,21 @@ public class FpdModuleSA extends JDialog implements ActionListener {
}
libInstanceTableModel.setRowCount(0);
}
private void addLibInstance (ModuleIdentification libMi) {
ffc.genLibraryInstance(libMi, moduleKey);
//
// Add pcd information of selected instance to current moduleSA
//
try{
ffc.addFrameworkModulesPcdBuildDefs(libMi, null, ffc.getModuleSA(moduleKey));
}
catch (Exception exception) {
JOptionPane.showMessageDialog(frame, "Adding Instance" + libMi.getName() + ": "+ exception.getMessage());
}
}
/**
* This method initializes this
*
@ -994,17 +1008,9 @@ public class FpdModuleSA extends JDialog implements ActionListener {
libInstanceTableModel.getValueAt(row, 3) + " " +
libInstanceTableModel.getValueAt(row, 4);
ModuleIdentification libMi = WorkspaceProfile.getModuleId(instanceValue);
ffc.genLibraryInstance(libMi, moduleKey);
//
// Add pcd information of selected instance to current moduleSA
//
try{
ffc.addFrameworkModulesPcdBuildDefs(libMi, null, ffc.getModuleSA(moduleKey));
}
catch (Exception exception) {
JOptionPane.showMessageDialog(frame, "Adding Instance" + s[0] + ": "+ exception.getMessage());
}
addLibInstance (libMi);
resolveLibraryInstances(instanceValue);
showClassToResolved();
}
});
}