mirror of https://github.com/acidanthera/audk.git
Fix the problem of not displaying library instances for multiple archs in supArchList.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1517 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
498e9021f5
commit
ed850fbf8b
|
@ -251,12 +251,22 @@ public class FpdFileContents {
|
|||
}
|
||||
|
||||
public ModuleSADocument.ModuleSA getModuleSA(String key) {
|
||||
String[] s = key.split(" ");
|
||||
|
||||
if (getfpdFrameworkModules().getModuleSAList() == null || getfpdFrameworkModules().getModuleSAList().size() == 0) {
|
||||
removeElement(getfpdFrameworkModules());
|
||||
fpdFrameworkModules = null;
|
||||
return null;
|
||||
}
|
||||
String[] s = key.split(" ");
|
||||
String archsInKey = "";
|
||||
if (s.length > 4) {
|
||||
for (int i = 4; i < s.length; ++i) {
|
||||
archsInKey += s[i];
|
||||
archsInKey += " ";
|
||||
}
|
||||
archsInKey = archsInKey.trim();
|
||||
}
|
||||
|
||||
ListIterator li = getfpdFrameworkModules().getModuleSAList().listIterator();
|
||||
while(li.hasNext()) {
|
||||
ModuleSADocument.ModuleSA moduleSa = (ModuleSADocument.ModuleSA)li.next();
|
||||
|
@ -271,13 +281,17 @@ public class FpdFileContents {
|
|||
continue;
|
||||
}
|
||||
}
|
||||
//ToDo add arch check for s[4]
|
||||
//ToDo add arch check .
|
||||
if (moduleSa.getSupArchList() != null) {
|
||||
if (!listToString(moduleSa.getSupArchList()).equals(s[4])) {
|
||||
continue;
|
||||
if (listToString(moduleSa.getSupArchList()).equals(archsInKey)) {
|
||||
return moduleSa;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (archsInKey.length() == 0) {
|
||||
return moduleSa;
|
||||
}
|
||||
}
|
||||
return moduleSa;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -26,11 +26,11 @@ import javax.swing.ListSelectionModel;
|
|||
import org.tianocore.PlatformSurfaceAreaDocument;
|
||||
import org.tianocore.frameworkwizard.common.DataValidation;
|
||||
import org.tianocore.frameworkwizard.common.GlobalData;
|
||||
import org.tianocore.frameworkwizard.common.IDefaultTableModel;
|
||||
import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;
|
||||
import org.tianocore.frameworkwizard.common.ui.IInternalFrame;
|
||||
import org.tianocore.frameworkwizard.common.ui.StarLabel;
|
||||
import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
|
||||
import org.tianocore.frameworkwizard.platform.ui.FpdFrameworkModules;
|
||||
import org.tianocore.frameworkwizard.platform.ui.global.WorkspaceProfile;
|
||||
|
||||
import java.awt.FlowLayout;
|
||||
|
@ -145,7 +145,7 @@ public class FpdFlash extends IInternalFrame {
|
|||
private JLabel jLabelFvAdditional = null;
|
||||
private JScrollPane jScrollPaneFvInFdf = null;
|
||||
private JTable jTableFvInFdf = null;
|
||||
private NonEditableTableModel fvInFdfTableModel = null; // @jve:decl-index=0:visual-constraint=""
|
||||
private IDefaultTableModel fvInFdfTableModel = null; // @jve:decl-index=0:visual-constraint=""
|
||||
private JButton jButtonFvInFdfOptions = null;
|
||||
private JScrollPane jScrollPaneFvAdditional = null;
|
||||
private JTable jTableFvAdditional = null;
|
||||
|
@ -169,7 +169,6 @@ public class FpdFlash extends IInternalFrame {
|
|||
private JPanel jPanelBgFvName = null;
|
||||
private JPanel jPanelBgFvImage = null;
|
||||
private JPanel jPanelW = null;
|
||||
private String oldFvNameInFvImage = "";
|
||||
|
||||
public FpdFlash() {
|
||||
super();
|
||||
|
@ -704,7 +703,7 @@ public class FpdFlash extends IInternalFrame {
|
|||
*/
|
||||
private JTable getJTableFvImageNames() {
|
||||
if (jTableFvImageNames == null) {
|
||||
fvImageNameTableModel = new NonEditableTableModel();
|
||||
fvImageNameTableModel = new IDefaultTableModel();
|
||||
jTableFvImageNames = new JTable(fvImageNameTableModel);
|
||||
jTableFvImageNames.setRowHeight(20);
|
||||
fvImageNameTableModel.addColumn("FV Image Name");
|
||||
|
@ -1413,7 +1412,7 @@ public class FpdFlash extends IInternalFrame {
|
|||
*/
|
||||
private JTable getJTableFvImageOpts() {
|
||||
if (jTableFvImageOpts == null) {
|
||||
fvOptionTableModel = new NonEditableTableModel();
|
||||
fvOptionTableModel = new IDefaultTableModel();
|
||||
fvOptionTableModel.addColumn("Name");
|
||||
fvOptionTableModel.addColumn("Value");
|
||||
jTableFvImageOpts = new JTable(fvOptionTableModel);
|
||||
|
@ -1650,9 +1649,9 @@ public class FpdFlash extends IInternalFrame {
|
|||
*
|
||||
* @return org.tianocore.frameworkwizard.platform.ui.NonEditableTableModel
|
||||
*/
|
||||
private NonEditableTableModel getFvInFdfTableModel() {
|
||||
private IDefaultTableModel getFvInFdfTableModel() {
|
||||
if (fvInFdfTableModel == null) {
|
||||
fvInFdfTableModel = new NonEditableTableModel();
|
||||
fvInFdfTableModel = new IDefaultTableModel();
|
||||
fvInFdfTableModel.addColumn("FV Name");
|
||||
fvInFdfTableModel.addColumn("Size");
|
||||
fvInFdfTableModel.addColumn("Corresponding File Name");
|
||||
|
@ -2327,8 +2326,8 @@ public class FpdFlash extends IInternalFrame {
|
|||
private JButton jButtonDown = null;
|
||||
private JButton jButtonOk = null;
|
||||
private JButton jButtonCancel = null;
|
||||
private NonEditableTableModel modInFvTableModel = null;
|
||||
private NonEditableTableModel fpdModTableModel = null;
|
||||
private IDefaultTableModel modInFvTableModel = null;
|
||||
private IDefaultTableModel fpdModTableModel = null;
|
||||
private HashMap<String, ModuleIdentification> mGuidToModuleId = null;
|
||||
private ArrayList<String> listModGuidInFv = null;
|
||||
private String title = null;
|
||||
|
@ -2497,7 +2496,7 @@ public class FpdFlash extends IInternalFrame {
|
|||
*/
|
||||
private JTable getJTableModInFv() {
|
||||
if (jTableModInFv == null) {
|
||||
modInFvTableModel = new NonEditableTableModel();
|
||||
modInFvTableModel = new IDefaultTableModel();
|
||||
modInFvTableModel.addColumn("Module Orders in FV");
|
||||
jTableModInFv = new JTable(modInFvTableModel);
|
||||
jTableModInFv.setRowHeight(20);
|
||||
|
@ -2549,7 +2548,7 @@ public class FpdFlash extends IInternalFrame {
|
|||
*/
|
||||
private JTable getJTableFpdModules() {
|
||||
if (jTableFpdModules == null) {
|
||||
fpdModTableModel = new NonEditableTableModel();
|
||||
fpdModTableModel = new IDefaultTableModel();
|
||||
TableSorter sorter = new TableSorter(fpdModTableModel);
|
||||
jTableFpdModules = new JTable(sorter);
|
||||
jTableFpdModules.setRowHeight(20);
|
||||
|
|
|
@ -26,6 +26,7 @@ import javax.swing.table.TableModel;
|
|||
|
||||
import org.tianocore.frameworkwizard.common.DataValidation;
|
||||
import org.tianocore.frameworkwizard.common.GlobalData;
|
||||
import org.tianocore.frameworkwizard.common.IDefaultTableModel;
|
||||
import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;
|
||||
import org.tianocore.frameworkwizard.platform.ui.global.WorkspaceProfile;
|
||||
import org.tianocore.frameworkwizard.platform.ui.global.SurfaceAreaQuery;
|
||||
|
@ -85,10 +86,10 @@ public class FpdModuleSA extends JDialog implements ActionListener {
|
|||
private JLabel jLabelPcdHelp = null;
|
||||
private JButton jButtonOk = null;
|
||||
private JButton jButtonCancel = null;
|
||||
private PartialEditableTableModel model = null;
|
||||
private LibraryTableModel selectedInstancesTableModel = null;
|
||||
private LibraryTableModel libClassTableModel = null;
|
||||
private LibraryTableModel libInstanceTableModel = null;
|
||||
private IDefaultTableModel model = null;
|
||||
private IDefaultTableModel selectedInstancesTableModel = null;
|
||||
private IDefaultTableModel libClassTableModel = null;
|
||||
private IDefaultTableModel libInstanceTableModel = null;
|
||||
private DefaultTableModel optionsTableModel = null;
|
||||
private FpdFileContents ffc = null;
|
||||
private String moduleKey = null;
|
||||
|
@ -544,7 +545,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
|
|||
*/
|
||||
private JTable getJTablePcd() {
|
||||
if (jTablePcd == null) {
|
||||
model = new PartialEditableTableModel();
|
||||
model = new IDefaultTableModel();
|
||||
jTablePcd = new JTable(model);
|
||||
jTablePcd.setRowHeight(20);
|
||||
jTablePcd.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
|
||||
|
@ -803,7 +804,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
|
|||
*/
|
||||
private JTable getJTableSelectedInstances() {
|
||||
if (jTableSelectedInstances == null) {
|
||||
selectedInstancesTableModel = new LibraryTableModel();
|
||||
selectedInstancesTableModel = new IDefaultTableModel();
|
||||
selectedInstancesTableModel.addColumn("Name");
|
||||
selectedInstancesTableModel.addColumn("ModuleGUID");
|
||||
selectedInstancesTableModel.addColumn("ModuleVersion");
|
||||
|
@ -839,7 +840,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
|
|||
*/
|
||||
private JTable getJTableLibClass() {
|
||||
if (jTableLibClass == null) {
|
||||
libClassTableModel = new LibraryTableModel();
|
||||
libClassTableModel = new IDefaultTableModel();
|
||||
libClassTableModel.addColumn("LibraryClass");
|
||||
jTableLibClass = new JTable(libClassTableModel);
|
||||
jTableLibClass.setRowHeight(20);
|
||||
|
@ -908,7 +909,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
|
|||
*/
|
||||
private JTable getJTableLibInstances() {
|
||||
if (jTableLibInstances == null) {
|
||||
libInstanceTableModel = new LibraryTableModel();
|
||||
libInstanceTableModel = new IDefaultTableModel();
|
||||
libInstanceTableModel.addColumn("Name");
|
||||
libInstanceTableModel.addColumn("ModuleGUID");
|
||||
libInstanceTableModel.addColumn("ModuleVersion");
|
||||
|
@ -1632,31 +1633,3 @@ private JPanel getJPanelToolchainC() {
|
|||
|
||||
|
||||
} // @jve:decl-index=0:visual-constraint="10,10"
|
||||
|
||||
class PartialEditableTableModel extends DefaultTableModel {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public boolean isCellEditable(int row, int col) {
|
||||
switch (col){
|
||||
case 2:
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class LibraryTableModel extends DefaultTableModel {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public boolean isCellEditable(int row, int col) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue