Fixed grammar and column widths (set min, preferred and max widths for version and arch)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1218 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -35,32 +35,91 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
static JFrame frame;
|
static JFrame frame;
|
||||||
|
|
||||||
private JSplitPane jSplitPane = null;
|
private JSplitPane jSplitPane = null;
|
||||||
|
|
||||||
private JPanel jPanelTop = null;
|
private JPanel jPanelTop = null;
|
||||||
|
|
||||||
private JPanel jPanelBottom = null;
|
private JPanel jPanelBottom = null;
|
||||||
|
|
||||||
private JLabel jLabel = null;
|
private JLabel jLabel = null;
|
||||||
|
|
||||||
private JScrollPane jScrollPaneAllModules = null;
|
private JScrollPane jScrollPaneAllModules = null;
|
||||||
|
|
||||||
private JTable jTableAllModules = null;
|
private JTable jTableAllModules = null;
|
||||||
|
|
||||||
private JPanel jPanelTopSouth = null;
|
private JPanel jPanelTopSouth = null;
|
||||||
|
|
||||||
private JButton jButtonAddModule = null;
|
private JButton jButtonAddModule = null;
|
||||||
|
|
||||||
private JLabel jLabelModulesAdded = null;
|
private JLabel jLabelModulesAdded = null;
|
||||||
|
|
||||||
private JPanel jPanelBottomSouth = null;
|
private JPanel jPanelBottomSouth = null;
|
||||||
|
|
||||||
private JScrollPane jScrollPaneFpdModules = null;
|
private JScrollPane jScrollPaneFpdModules = null;
|
||||||
|
|
||||||
private JTable jTableFpdModules = null;
|
private JTable jTableFpdModules = null;
|
||||||
|
|
||||||
private JButton jButtonSettings = null;
|
private JButton jButtonSettings = null;
|
||||||
|
|
||||||
private JButton jButtonRemoveModule = null;
|
private JButton jButtonRemoveModule = null;
|
||||||
|
|
||||||
private NonEditableTableModel modelAllModules = null;
|
private NonEditableTableModel modelAllModules = null;
|
||||||
|
|
||||||
private NonEditableTableModel modelFpdModules = null;
|
private NonEditableTableModel modelFpdModules = null;
|
||||||
|
|
||||||
private FpdModuleSA settingDlg = null;
|
private FpdModuleSA settingDlg = null;
|
||||||
|
|
||||||
private FpdFileContents ffc = null;
|
private FpdFileContents ffc = null;
|
||||||
|
|
||||||
private OpeningPlatformType docConsole = null;
|
private OpeningPlatformType docConsole = null;
|
||||||
|
|
||||||
private Map<String, ArrayList<String>> fpdMsa = null;
|
private Map<String, ArrayList<String>> fpdMsa = null;
|
||||||
|
|
||||||
private ArrayList<ModuleIdentification> miList = null;
|
private ArrayList<ModuleIdentification> miList = null;
|
||||||
|
|
||||||
|
private final int ModNameCol = 0;
|
||||||
|
|
||||||
|
private final int ModVerCol = 1;
|
||||||
|
|
||||||
|
private final int PkgNameCol = 2;
|
||||||
|
|
||||||
|
private final int PkgVerCol = 3;
|
||||||
|
|
||||||
|
private final int ArchCol = 4;
|
||||||
|
|
||||||
|
private final int Path4Col = 4;
|
||||||
|
|
||||||
|
private final int Path5Col = 5;
|
||||||
|
|
||||||
|
private final int ModNameMinWidth = 168;
|
||||||
|
|
||||||
|
private final int ModNamePrefWidth = 200;
|
||||||
|
|
||||||
|
private final int PkgNameMinWidth = 100;
|
||||||
|
|
||||||
|
private final int PkgNamePrefWidth = 110;
|
||||||
|
|
||||||
|
private final int PkgNameMaxWidth = 150;
|
||||||
|
|
||||||
|
private final int VerMinWidth = 50;
|
||||||
|
|
||||||
|
private final int VerMaxWidth = 80;
|
||||||
|
|
||||||
|
private final int VerPrefWidth = 60;
|
||||||
|
|
||||||
|
private final int PathPrefWidth = 320;
|
||||||
|
|
||||||
|
private final int PathMinWidth = 280;
|
||||||
|
|
||||||
|
private final int ArchPrefWidth = 80;
|
||||||
|
|
||||||
|
private final int ArchMinWidth = 60;
|
||||||
|
|
||||||
|
private final int ArchMaxWidth = 100;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method initializes jSplitPane
|
* This method initializes jSplitPane
|
||||||
*
|
*
|
||||||
@ -121,7 +180,7 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
private JScrollPane getJScrollPaneAllModules() {
|
private JScrollPane getJScrollPaneAllModules() {
|
||||||
if (jScrollPaneAllModules == null) {
|
if (jScrollPaneAllModules == null) {
|
||||||
jScrollPaneAllModules = new JScrollPane();
|
jScrollPaneAllModules = new JScrollPane();
|
||||||
jScrollPaneAllModules.setPreferredSize(new java.awt.Dimension(600,200));
|
jScrollPaneAllModules.setPreferredSize(new java.awt.Dimension(600, 200));
|
||||||
jScrollPaneAllModules.setViewportView(getJTableAllModules());
|
jScrollPaneAllModules.setViewportView(getJTableAllModules());
|
||||||
}
|
}
|
||||||
return jScrollPaneAllModules;
|
return jScrollPaneAllModules;
|
||||||
@ -139,11 +198,30 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
jTableAllModules = new JTable(sorter);
|
jTableAllModules = new JTable(sorter);
|
||||||
sorter.setTableHeader(jTableAllModules.getTableHeader());
|
sorter.setTableHeader(jTableAllModules.getTableHeader());
|
||||||
jTableAllModules.setRowHeight(20);
|
jTableAllModules.setRowHeight(20);
|
||||||
modelAllModules.addColumn("ModuleName");
|
modelAllModules.addColumn("<html>Module<br>Name</html>");
|
||||||
modelAllModules.addColumn("ModuleVersion");
|
modelAllModules.addColumn("<html>Module<br>Version</html>");
|
||||||
modelAllModules.addColumn("PackageName");
|
modelAllModules.addColumn("<html>Package<br>Name</html>");
|
||||||
modelAllModules.addColumn("PackageVersion");
|
modelAllModules.addColumn("<html>Package<br>Version</html>");
|
||||||
modelAllModules.addColumn("Path");
|
modelAllModules.addColumn("Path");
|
||||||
|
javax.swing.table.TableColumn column = null;
|
||||||
|
column = jTableAllModules.getColumnModel().getColumn(ModNameCol);
|
||||||
|
column.setPreferredWidth(ModNamePrefWidth);
|
||||||
|
column.setMinWidth(ModNameMinWidth);
|
||||||
|
column = jTableAllModules.getColumnModel().getColumn(ModVerCol);
|
||||||
|
column.setPreferredWidth(VerPrefWidth);
|
||||||
|
column.setMaxWidth(VerMaxWidth);
|
||||||
|
column.setMinWidth(VerMinWidth);
|
||||||
|
column = jTableAllModules.getColumnModel().getColumn(PkgNameCol);
|
||||||
|
column.setPreferredWidth(PkgNamePrefWidth);
|
||||||
|
column.setMinWidth(PkgNameMinWidth);
|
||||||
|
column.setMaxWidth(PkgNameMaxWidth);
|
||||||
|
column = jTableAllModules.getColumnModel().getColumn(PkgVerCol);
|
||||||
|
column.setPreferredWidth(VerPrefWidth);
|
||||||
|
column.setMaxWidth(VerMaxWidth);
|
||||||
|
column.setMinWidth(VerMinWidth);
|
||||||
|
column = jTableAllModules.getColumnModel().getColumn(Path4Col);
|
||||||
|
column.setPreferredWidth(PathPrefWidth);
|
||||||
|
column.setMinWidth(PathMinWidth);
|
||||||
|
|
||||||
jTableAllModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
jTableAllModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
}
|
}
|
||||||
@ -174,18 +252,18 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
private JButton getJButtonAddModule() {
|
private JButton getJButtonAddModule() {
|
||||||
if (jButtonAddModule == null) {
|
if (jButtonAddModule == null) {
|
||||||
jButtonAddModule = new JButton();
|
jButtonAddModule = new JButton();
|
||||||
jButtonAddModule.setPreferredSize(new java.awt.Dimension(130,20));
|
jButtonAddModule.setPreferredSize(new java.awt.Dimension(130, 20));
|
||||||
jButtonAddModule.setText("Add a Module");
|
jButtonAddModule.setText("Add a Module");
|
||||||
jButtonAddModule.addActionListener(new java.awt.event.ActionListener() {
|
jButtonAddModule.addActionListener(new java.awt.event.ActionListener() {
|
||||||
public void actionPerformed(java.awt.event.ActionEvent e) {
|
public void actionPerformed(java.awt.event.ActionEvent e) {
|
||||||
int selectedRow = jTableAllModules.getSelectedRow();
|
int selectedRow = jTableAllModules.getSelectedRow();
|
||||||
if (selectedRow < 0){
|
if (selectedRow < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TableSorter sorter = (TableSorter)jTableAllModules.getModel();
|
TableSorter sorter = (TableSorter) jTableAllModules.getModel();
|
||||||
selectedRow = sorter.modelIndex(selectedRow);
|
selectedRow = sorter.modelIndex(selectedRow);
|
||||||
String path = modelAllModules.getValueAt(selectedRow, 4)+"";
|
String path = modelAllModules.getValueAt(selectedRow, Path4Col) + "";
|
||||||
ModuleIdentification mi = miList.get(selectedRow);
|
ModuleIdentification mi = miList.get(selectedRow);
|
||||||
Vector<String> vArchs = null;
|
Vector<String> vArchs = null;
|
||||||
try {
|
try {
|
||||||
@ -196,7 +274,7 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (vArchs == null) {
|
if (vArchs == null) {
|
||||||
JOptionPane.showMessageDialog(frame, "No supported Archs specified in MSA file.");
|
JOptionPane.showMessageDialog(frame, "No Supported Architectures specified in MSA file.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,7 +296,7 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
// Archs this Module supported have already been added.
|
// Archs this Module supported have already been added.
|
||||||
//
|
//
|
||||||
if (vArchs.size() == 0) {
|
if (vArchs.size() == 0) {
|
||||||
JOptionPane.showMessageDialog(frame, "This Module Already Added.");
|
JOptionPane.showMessageDialog(frame, "This Module has already been added.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//ToDo put Arch instead of null
|
//ToDo put Arch instead of null
|
||||||
@ -227,35 +305,34 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
String arch = vArchs.get(i);
|
String arch = vArchs.get(i);
|
||||||
al.add(arch);
|
al.add(arch);
|
||||||
archsAdded += arch + " ";
|
archsAdded += arch + " ";
|
||||||
String[] row = {"", mv, "", pv, arch, path};
|
String[] row = { "", mv, "", pv, arch, path };
|
||||||
|
|
||||||
if (mi != null) {
|
if (mi != null) {
|
||||||
row[0] = mi.getName();
|
row[ModNameCol] = mi.getName();
|
||||||
row[2] = mi.getPackage().getName();
|
row[PkgNameCol] = mi.getPackage().getName();
|
||||||
|
|
||||||
}
|
}
|
||||||
modelFpdModules.addRow(row);
|
modelFpdModules.addRow(row);
|
||||||
|
|
||||||
docConsole.setSaved(false);
|
docConsole.setSaved(false);
|
||||||
try{
|
try {
|
||||||
//ToDo : specify archs need to add.
|
//ToDo : specify archs need to add.
|
||||||
ffc.addFrameworkModulesPcdBuildDefs(mi, arch, null);
|
ffc.addFrameworkModulesPcdBuildDefs(mi, arch, null);
|
||||||
}
|
} catch (Exception exception) {
|
||||||
catch (Exception exception) {
|
JOptionPane.showMessageDialog(frame, "Adding " + row[ModNameCol] + " with SupArch " + arch
|
||||||
JOptionPane.showMessageDialog(frame, "Adding " + row[0] + " with SupArch " + arch + ": "+ exception.getMessage());
|
+ ": " + exception.getMessage());
|
||||||
errorOccurred = true;
|
errorOccurred = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String s = "This Module with Arch "+ archsAdded;
|
String s = "This Module with Architecture " + archsAdded;
|
||||||
if (errorOccurred) {
|
if (errorOccurred) {
|
||||||
s += " Added with Error. Platform may NOT Be Built.";
|
s += " was added with Error. Platform may NOT Build.";
|
||||||
|
} else {
|
||||||
|
s += " was added Successfully.";
|
||||||
}
|
}
|
||||||
else {
|
JOptionPane.showMessageDialog(frame, s);
|
||||||
s += " Added Successfully.";
|
jTableFpdModules.changeSelection(modelFpdModules.getRowCount() - 1, 0, false, false);
|
||||||
}
|
|
||||||
JOptionPane.showMessageDialog(frame, s);
|
|
||||||
jTableFpdModules.changeSelection(modelFpdModules.getRowCount()-1, 0, false, false);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -287,7 +364,7 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
private JScrollPane getJScrollPaneFpdModules() {
|
private JScrollPane getJScrollPaneFpdModules() {
|
||||||
if (jScrollPaneFpdModules == null) {
|
if (jScrollPaneFpdModules == null) {
|
||||||
jScrollPaneFpdModules = new JScrollPane();
|
jScrollPaneFpdModules = new JScrollPane();
|
||||||
jScrollPaneFpdModules.setPreferredSize(new java.awt.Dimension(453,200));
|
jScrollPaneFpdModules.setPreferredSize(new java.awt.Dimension(453, 200));
|
||||||
jScrollPaneFpdModules.setViewportView(getJTableFpdModules());
|
jScrollPaneFpdModules.setViewportView(getJTableFpdModules());
|
||||||
}
|
}
|
||||||
return jScrollPaneFpdModules;
|
return jScrollPaneFpdModules;
|
||||||
@ -305,12 +382,35 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
jTableFpdModules = new JTable(sorter);
|
jTableFpdModules = new JTable(sorter);
|
||||||
sorter.setTableHeader(jTableFpdModules.getTableHeader());
|
sorter.setTableHeader(jTableFpdModules.getTableHeader());
|
||||||
jTableFpdModules.setRowHeight(20);
|
jTableFpdModules.setRowHeight(20);
|
||||||
modelFpdModules.addColumn("ModuleName");
|
modelFpdModules.addColumn("<html>Module<br>Name</html>");
|
||||||
modelFpdModules.addColumn("ModuleVersion");
|
modelFpdModules.addColumn("<html>Module<br>Version</html>");
|
||||||
modelFpdModules.addColumn("PackageName");
|
modelFpdModules.addColumn("<html>Package<br>Name</html>");
|
||||||
modelFpdModules.addColumn("PackageVersion");
|
modelFpdModules.addColumn("<html>Package<br>Version</html>");
|
||||||
modelFpdModules.addColumn("SupportedArch");
|
modelFpdModules.addColumn("<html>Supported<br>Architectures</html>");
|
||||||
modelFpdModules.addColumn("Path");
|
modelFpdModules.addColumn("Path");
|
||||||
|
javax.swing.table.TableColumn column = null;
|
||||||
|
column = jTableFpdModules.getColumnModel().getColumn(ModNameCol);
|
||||||
|
column.setPreferredWidth(ModNamePrefWidth);
|
||||||
|
column.setMinWidth(ModNameMinWidth);
|
||||||
|
column = jTableFpdModules.getColumnModel().getColumn(ModVerCol);
|
||||||
|
column.setPreferredWidth(VerPrefWidth);
|
||||||
|
column.setMaxWidth(VerMaxWidth);
|
||||||
|
column.setMinWidth(VerMinWidth);
|
||||||
|
column = jTableFpdModules.getColumnModel().getColumn(PkgNameCol);
|
||||||
|
column.setPreferredWidth(PkgNamePrefWidth);
|
||||||
|
column.setMinWidth(PkgNameMinWidth);
|
||||||
|
column.setMaxWidth(PkgNameMaxWidth);
|
||||||
|
column = jTableFpdModules.getColumnModel().getColumn(PkgVerCol);
|
||||||
|
column.setPreferredWidth(VerPrefWidth);
|
||||||
|
column.setMaxWidth(VerMaxWidth);
|
||||||
|
column.setMinWidth(VerMinWidth);
|
||||||
|
column = jTableFpdModules.getColumnModel().getColumn(ArchCol);
|
||||||
|
column.setPreferredWidth(ArchPrefWidth);
|
||||||
|
column.setMaxWidth(ArchMaxWidth);
|
||||||
|
column.setMinWidth(ArchMinWidth);
|
||||||
|
column = jTableFpdModules.getColumnModel().getColumn(Path5Col);
|
||||||
|
column.setPreferredWidth(PathPrefWidth);
|
||||||
|
column.setMinWidth(PathMinWidth);
|
||||||
|
|
||||||
jTableFpdModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
jTableFpdModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
}
|
}
|
||||||
@ -330,11 +430,11 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
jButtonSettings.addActionListener(new java.awt.event.ActionListener() {
|
jButtonSettings.addActionListener(new java.awt.event.ActionListener() {
|
||||||
public void actionPerformed(java.awt.event.ActionEvent e) {
|
public void actionPerformed(java.awt.event.ActionEvent e) {
|
||||||
int selectedRow = jTableFpdModules.getSelectedRow();
|
int selectedRow = jTableFpdModules.getSelectedRow();
|
||||||
if (selectedRow < 0){
|
if (selectedRow < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TableSorter sorter = (TableSorter)jTableFpdModules.getModel();
|
TableSorter sorter = (TableSorter) jTableFpdModules.getModel();
|
||||||
selectedRow = sorter.modelIndex(selectedRow);
|
selectedRow = sorter.modelIndex(selectedRow);
|
||||||
try {
|
try {
|
||||||
if (ffc.adjustPcd(selectedRow)) {
|
if (ffc.adjustPcd(selectedRow)) {
|
||||||
@ -352,11 +452,11 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
|
|
||||||
String[] sa = new String[5];
|
String[] sa = new String[5];
|
||||||
ffc.getFrameworkModuleInfo(selectedRow, sa);
|
ffc.getFrameworkModuleInfo(selectedRow, sa);
|
||||||
String mg = sa[0];
|
String mg = sa[ModNameCol];
|
||||||
String mv = sa[1];
|
String mv = sa[ModVerCol];
|
||||||
String pg = sa[2];
|
String pg = sa[PkgNameCol];
|
||||||
String pv = sa[3];
|
String pv = sa[PkgVerCol];
|
||||||
String arch = sa[4];
|
String arch = sa[ArchCol];
|
||||||
settingDlg.setKey(mg + " " + mv + " " + pg + " " + pv + " " + arch, selectedRow, docConsole);
|
settingDlg.setKey(mg + " " + mv + " " + pg + " " + pv + " " + arch, selectedRow, docConsole);
|
||||||
settingDlg.setVisible(true);
|
settingDlg.setVisible(true);
|
||||||
}
|
}
|
||||||
@ -365,7 +465,6 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
return jButtonSettings;
|
return jButtonSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method initializes jButton2
|
* This method initializes jButton2
|
||||||
*
|
*
|
||||||
@ -374,42 +473,42 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
private JButton getJButtonRemoveModule() {
|
private JButton getJButtonRemoveModule() {
|
||||||
if (jButtonRemoveModule == null) {
|
if (jButtonRemoveModule == null) {
|
||||||
jButtonRemoveModule = new JButton();
|
jButtonRemoveModule = new JButton();
|
||||||
jButtonRemoveModule.setPreferredSize(new java.awt.Dimension(130,20));
|
jButtonRemoveModule.setPreferredSize(new java.awt.Dimension(130, 20));
|
||||||
jButtonRemoveModule.setText("Remove Module");
|
jButtonRemoveModule.setText("Remove Module");
|
||||||
jButtonRemoveModule.addActionListener(new java.awt.event.ActionListener() {
|
jButtonRemoveModule.addActionListener(new java.awt.event.ActionListener() {
|
||||||
public void actionPerformed(java.awt.event.ActionEvent e) {
|
public void actionPerformed(java.awt.event.ActionEvent e) {
|
||||||
int selectedRow = jTableFpdModules.getSelectedRow();
|
int selectedRow = jTableFpdModules.getSelectedRow();
|
||||||
if (selectedRow < 0){
|
if (selectedRow < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TableSorter sorter = (TableSorter)jTableFpdModules.getModel();
|
TableSorter sorter = (TableSorter) jTableFpdModules.getModel();
|
||||||
selectedRow = sorter.modelIndex(selectedRow);
|
selectedRow = sorter.modelIndex(selectedRow);
|
||||||
|
|
||||||
String[] sa = new String[5];
|
String[] sa = new String[5];
|
||||||
ffc.getFrameworkModuleInfo(selectedRow, sa);
|
ffc.getFrameworkModuleInfo(selectedRow, sa);
|
||||||
String mg = sa[0];
|
String mg = sa[ModNameCol];
|
||||||
String mv = sa[1];
|
String mv = sa[ModVerCol];
|
||||||
String pg = sa[2];
|
String pg = sa[PkgNameCol];
|
||||||
String pv = sa[3];
|
String pv = sa[PkgVerCol];
|
||||||
String arch = sa[4];
|
String arch = sa[ArchCol];
|
||||||
ModuleIdentification mi = GlobalData.getModuleId(sa[0] + " " + sa[1] + " " + sa[2] + " " + sa[3] + " " + sa[4]);
|
ModuleIdentification mi = GlobalData.getModuleId(sa[ModNameCol] + " " + sa[ModVerCol] + " "
|
||||||
|
+ sa[PkgNameCol] + " " + sa[PkgVerCol] + " "
|
||||||
|
+ sa[ArchCol]);
|
||||||
mv = mi.getVersion();
|
mv = mi.getVersion();
|
||||||
pv = mi.getPackage().getVersion();
|
pv = mi.getPackage().getVersion();
|
||||||
modelFpdModules.removeRow(selectedRow);
|
modelFpdModules.removeRow(selectedRow);
|
||||||
if (arch == null) {
|
if (arch == null) {
|
||||||
// if no arch specified in ModuleSA
|
// if no arch specified in ModuleSA
|
||||||
fpdMsa.remove(mg+mv+pg+pv);
|
fpdMsa.remove(mg + mv + pg + pv);
|
||||||
}
|
} else {
|
||||||
else {
|
ArrayList<String> al = fpdMsa.get(mg + mv + pg + pv);
|
||||||
ArrayList<String> al = fpdMsa.get(mg+mv+pg+pv);
|
|
||||||
al.remove(arch);
|
al.remove(arch);
|
||||||
if (al.size() == 0) {
|
if (al.size() == 0) {
|
||||||
fpdMsa.remove(mg+mv+pg+pv);
|
fpdMsa.remove(mg + mv + pg + pv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
docConsole.setSaved(false);
|
docConsole.setSaved(false);
|
||||||
ffc.removeModuleSA(selectedRow);
|
ffc.removeModuleSA(selectedRow);
|
||||||
}
|
}
|
||||||
@ -434,7 +533,7 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public FpdFrameworkModules(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd){
|
public FpdFrameworkModules(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {
|
||||||
this();
|
this();
|
||||||
init(fpd);
|
init(fpd);
|
||||||
|
|
||||||
@ -453,7 +552,7 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
JOptionPane.showMessageDialog(frame, "Error occurred when getting module data.");
|
JOptionPane.showMessageDialog(frame, "Error occurred when getting module data.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ffc == null){
|
if (ffc == null) {
|
||||||
ffc = new FpdFileContents(fpd);
|
ffc = new FpdFileContents(fpd);
|
||||||
ffc.initDynPcdMap();
|
ffc.initDynPcdMap();
|
||||||
}
|
}
|
||||||
@ -466,28 +565,31 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
String[][] saa = new String[ffc.getFrameworkModulesCount()][5];
|
String[][] saa = new String[ffc.getFrameworkModulesCount()][5];
|
||||||
ffc.getFrameworkModulesInfo(saa);
|
ffc.getFrameworkModulesInfo(saa);
|
||||||
for (int i = 0; i < saa.length; ++i) {
|
for (int i = 0; i < saa.length; ++i) {
|
||||||
ModuleIdentification mi = GlobalData.getModuleId(saa[i][0]+ " "+saa[i][1]+" "+saa[i][2]+" "+saa[i][3]);
|
ModuleIdentification mi = GlobalData.getModuleId(saa[i][ModNameCol] + " " + saa[i][ModVerCol] + " "
|
||||||
String[] row = {"", "", "", "", "", ""};
|
+ saa[i][PkgNameCol] + " " + saa[i][PkgVerCol]);
|
||||||
|
String[] row = { "", "", "", "", "", "" };
|
||||||
if (mi != null) {
|
if (mi != null) {
|
||||||
row[0] = mi.getName();
|
row[ModNameCol] = mi.getName();
|
||||||
row[1] = mi.getVersion();
|
row[ModVerCol] = mi.getVersion();
|
||||||
row[2] = mi.getPackage().getName();
|
row[PkgNameCol] = mi.getPackage().getName();
|
||||||
row[3] = mi.getPackage().getVersion();
|
row[PkgVerCol] = mi.getPackage().getVersion();
|
||||||
row[4] = saa[i][4];
|
row[ArchCol] = saa[i][ArchCol];
|
||||||
try{
|
try {
|
||||||
row[5] = GlobalData.getMsaFile(mi).getPath().substring(System.getenv("WORKSPACE").length() + 1);
|
row[Path5Col] = GlobalData.getMsaFile(mi).getPath().substring(
|
||||||
}
|
System.getenv("WORKSPACE")
|
||||||
catch (Exception e) {
|
.length() + 1);
|
||||||
JOptionPane.showMessageDialog(frame, "ShowFPDModules:" + e.getMessage());
|
} catch (Exception e) {
|
||||||
|
JOptionPane.showMessageDialog(frame, "Show FPD Modules:" + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
modelFpdModules.addRow(row);
|
modelFpdModules.addRow(row);
|
||||||
ArrayList<String> al = fpdMsa.get(saa[i][0]+row[1]+saa[i][2]+row[3]);
|
ArrayList<String> al = fpdMsa.get(saa[i][ModNameCol] + row[ModVerCol] + saa[i][PkgNameCol]
|
||||||
|
+ row[PkgVerCol]);
|
||||||
if (al == null) {
|
if (al == null) {
|
||||||
al = new ArrayList<String>();
|
al = new ArrayList<String>();
|
||||||
fpdMsa.put(saa[i][0]+row[1]+saa[i][2]+row[3], al);
|
fpdMsa.put(saa[i][ModNameCol] + row[ModVerCol] + saa[i][PkgNameCol] + row[PkgVerCol], al);
|
||||||
}
|
}
|
||||||
al.add(saa[i][4]);
|
al.add(saa[i][Path4Col]);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -504,29 +606,30 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
Set<PackageIdentification> spi = GlobalData.getPackageList();
|
Set<PackageIdentification> spi = GlobalData.getPackageList();
|
||||||
Iterator ispi = spi.iterator();
|
Iterator ispi = spi.iterator();
|
||||||
|
|
||||||
while(ispi.hasNext()) {
|
while (ispi.hasNext()) {
|
||||||
PackageIdentification pi = (PackageIdentification)ispi.next();
|
PackageIdentification pi = (PackageIdentification) ispi.next();
|
||||||
String[] s = {"", "", "", "", ""};
|
String[] s = { "", "", "", "", "" };
|
||||||
|
|
||||||
Set<ModuleIdentification> smi = GlobalData.getModules(pi);
|
Set<ModuleIdentification> smi = GlobalData.getModules(pi);
|
||||||
Iterator ismi = smi.iterator();
|
Iterator ismi = smi.iterator();
|
||||||
while(ismi.hasNext()) {
|
while (ismi.hasNext()) {
|
||||||
ModuleIdentification mi = (ModuleIdentification)ismi.next();
|
ModuleIdentification mi = (ModuleIdentification) ismi.next();
|
||||||
s[0] = mi.getName();
|
s[ModNameCol] = mi.getName();
|
||||||
s[1] = mi.getVersion();
|
s[ModVerCol] = mi.getVersion();
|
||||||
s[2] = pi.getName();
|
s[PkgNameCol] = pi.getName();
|
||||||
s[3] = pi.getVersion();
|
s[PkgVerCol] = pi.getVersion();
|
||||||
try {
|
try {
|
||||||
s[4] = GlobalData.getMsaFile(mi).getPath().substring(System.getenv("WORKSPACE").length() + 1);
|
s[Path4Col] = GlobalData.getMsaFile(mi).getPath()
|
||||||
}
|
.substring(System.getenv("WORKSPACE").length() + 1);
|
||||||
catch (Exception e) {
|
} catch (Exception e) {
|
||||||
JOptionPane.showMessageDialog(frame, "ShowAllModules:" + e.getMessage());
|
JOptionPane.showMessageDialog(frame, "Show All Modules:" + e.getMessage());
|
||||||
}
|
}
|
||||||
modelAllModules.addRow(s);
|
modelAllModules.addRow(s);
|
||||||
miList.add(mi);
|
miList.add(mi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method initializes this
|
* This method initializes this
|
||||||
*
|
*
|
||||||
@ -540,7 +643,7 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // @jve:decl-index=0:visual-constraint="10,10"
|
} // @jve:decl-index=0:visual-constraint="10,10"
|
||||||
|
|
||||||
class NonEditableTableModel extends DefaultTableModel {
|
class NonEditableTableModel extends DefaultTableModel {
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user