Adjust module order list after specifying FvBinding for ModuleSA.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1756 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jlin16 2006-10-16 08:11:27 +00:00
parent b0a8056223
commit 9d6f6d70da
4 changed files with 75 additions and 2 deletions

View File

@ -307,6 +307,13 @@ public class FpdBuildOptions extends IInternalFrame {
private JLabel jLabelTableOptionsTitle = null;
private final int buildTargetWidth = 150;
private final int toolChainFamilyWidth = 150;
private final int supportArchWidth = 150;
private final int toolCmdCodeWidth = 200;
private final int tagNameWidth = 150;
private final int argWidth = 400;
/**
* This method initializes jPanel
*
@ -1765,6 +1772,13 @@ public class FpdBuildOptions extends IInternalFrame {
optionsTableModel.addColumn("TagName");
optionsTableModel.addColumn("Arguments");
jTableOptions.getColumnModel().getColumn(0).setMinWidth(buildTargetWidth);
jTableOptions.getColumnModel().getColumn(1).setMinWidth(toolChainFamilyWidth);
jTableOptions.getColumnModel().getColumn(2).setMinWidth(supportArchWidth);
jTableOptions.getColumnModel().getColumn(3).setMinWidth(toolCmdCodeWidth);
jTableOptions.getColumnModel().getColumn(4).setMinWidth(tagNameWidth);
jTableOptions.getColumnModel().getColumn(5).setMinWidth(argWidth);
// javax.swing.table.TableColumn toolFamilyCol = jTableOptions.getColumnModel().getColumn(1);
// JComboBox cb = new JComboBox();
// cb.addItem("MSFT");

View File

@ -2039,6 +2039,45 @@ public class FpdFileContents {
}
}
public void addModuleIntoBuildOptionsUserExtensions (String fvName, String moduleGuid, String moduleVersion, String packageGuid, String packageVersion, String arch) {
if (moduleInBuildOptionsUserExtensions (fvName, moduleGuid, moduleVersion, packageGuid, packageVersion, arch)) {
return;
}
ListIterator<UserExtensionsDocument.UserExtensions> li = getfpdBuildOpts().getUserExtensionsList().listIterator();
QName elementIncludeModules = new QName(xmlNs, "IncludeModules");
QName elementModule = new QName(xmlNs, "Module");
while (li.hasNext()) {
UserExtensionsDocument.UserExtensions ues = li.next();
if (!ues.getUserID().equals("IMAGES")) {
continue;
}
XmlCursor cursor = ues.newCursor();
cursor.toFirstChild();
String elementName = cursor.getTextValue();
if (elementName.equals(fvName)) {
cursor.toNextSibling(elementIncludeModules);
cursor.toLastChild();
cursor.toEndToken();
cursor.toNextToken();
cursor.beginElement(elementModule);
cursor.insertAttributeWithValue("ModuleGuid", moduleGuid);
if (!moduleVersion.equals("null") && moduleVersion.length() != 0) {
cursor.insertAttributeWithValue("ModuleVersion", moduleVersion);
}
cursor.insertAttributeWithValue("PackageGuid", packageGuid);
if (!packageVersion.equals("null") && packageVersion.length() != 0) {
cursor.insertAttributeWithValue("PackageVersion", packageVersion);
}
cursor.insertAttributeWithValue("Arch", arch);
cursor.dispose();
return;
}
cursor.dispose();
}
}
public void genBuildOptionsUserDefAntTask (String id, String fileName, String execOrder) {
UserDefinedAntTasksDocument.UserDefinedAntTasks udats = getfpdBuildOpts().getUserDefinedAntTasks();
if (udats == null) {

View File

@ -668,7 +668,7 @@ public class FpdFrameworkModules extends IInternalFrame {
}
catch (Exception exp) {
JOptionPane.showMessageDialog(frame, exp.getMessage());
return;
// return;
}
if (settingDlg == null) {

View File

@ -124,6 +124,14 @@ public class FpdModuleSA extends JDialog implements ActionListener {
private JPanel jPanelToolchainS = null;
private JPanel jPanelLibraryCenterN = null;
private JPanel jPanelLibraryCenterC = null; // @jve:decl-index=0:visual-constraint="20,224"
private final int buildTargetWidth = 150;
private final int toolChainFamilyWidth = 150;
private final int supportArchWidth = 150;
private final int toolCmdCodeWidth = 200;
private final int tagNameWidth = 150;
private final int argWidth = 400;
/**
* This is the default constructor
*/
@ -1147,8 +1155,14 @@ public class FpdModuleSA extends JDialog implements ActionListener {
if (newFvBinding.length() == 0 && originalFvBinding == null) {
return;
}
docConsole.setSaved(false);
ffc.setFvBinding(moduleKey, newFvBinding);
String moduleInfo[] = moduleKey.split(" ");
String fvNames[] = newFvBinding.split(" ");
for (int i = 0; i < fvNames.length; ++i) {
ffc.addModuleIntoBuildOptionsUserExtensions(fvNames[i], moduleInfo[0], moduleInfo[1], moduleInfo[2], moduleInfo[3], moduleInfo[4]);
}
docConsole.setSaved(false);
}
});
@ -1250,6 +1264,12 @@ public class FpdModuleSA extends JDialog implements ActionListener {
jTableModuleSaOptions = new JTable(optionsTableModel);
jTableModuleSaOptions.setRowHeight(20);
jTableModuleSaOptions.getColumnModel().getColumn(0).setMinWidth(buildTargetWidth);
jTableModuleSaOptions.getColumnModel().getColumn(1).setMinWidth(toolChainFamilyWidth);
jTableModuleSaOptions.getColumnModel().getColumn(2).setMinWidth(tagNameWidth);
jTableModuleSaOptions.getColumnModel().getColumn(3).setMinWidth(toolCmdCodeWidth);
jTableModuleSaOptions.getColumnModel().getColumn(4).setMinWidth(supportArchWidth);
jTableModuleSaOptions.getColumnModel().getColumn(5).setMinWidth(argWidth);
// javax.swing.table.TableColumn toolFamilyCol = jTableModuleSaOptions.getColumnModel().getColumn(1);
// JComboBox cb = new JComboBox();
// cb.addItem("MSFT");