1 package org
.tianocore
.frameworkwizard
.platform
.ui
;
3 import java
.awt
.BorderLayout
;
5 import javax
.swing
.JFrame
;
6 import javax
.swing
.JOptionPane
;
7 import javax
.swing
.JPanel
;
8 import javax
.swing
.JSplitPane
;
9 import javax
.swing
.JLabel
;
10 import javax
.swing
.JScrollPane
;
11 import javax
.swing
.JTable
;
12 import javax
.swing
.JButton
;
13 import javax
.swing
.ListSelectionModel
;
14 import javax
.swing
.table
.DefaultTableModel
;
16 import org
.tianocore
.PlatformSurfaceAreaDocument
;
17 import org
.tianocore
.frameworkwizard
.common
.Identifications
.OpeningPlatformType
;
18 import org
.tianocore
.frameworkwizard
.common
.ui
.IInternalFrame
;
19 import org
.tianocore
.frameworkwizard
.platform
.ui
.global
.GlobalData
;
20 import org
.tianocore
.frameworkwizard
.platform
.ui
.id
.ModuleIdentification
;
21 import org
.tianocore
.frameworkwizard
.platform
.ui
.id
.PackageIdentification
;
23 import java
.awt
.FlowLayout
;
25 import java
.util
.ArrayList
;
26 import java
.util
.HashMap
;
27 import java
.util
.Iterator
;
30 import java
.util
.Vector
;
32 public class FpdFrameworkModules
extends IInternalFrame
{
37 private static final long serialVersionUID
= 1L;
41 private JSplitPane jSplitPane
= null;
43 private JPanel jPanelTop
= null;
45 private JPanel jPanelBottom
= null;
47 private JLabel jLabel
= null;
49 private JScrollPane jScrollPaneAllModules
= null;
51 private JTable jTableAllModules
= null;
53 private JPanel jPanelTopSouth
= null;
55 private JButton jButtonAddModule
= null;
57 private JLabel jLabelModulesAdded
= null;
59 private JPanel jPanelBottomSouth
= null;
61 private JScrollPane jScrollPaneFpdModules
= null;
63 private JTable jTableFpdModules
= null;
65 private JButton jButtonSettings
= null;
67 private JButton jButtonRemoveModule
= null;
69 private NonEditableTableModel modelAllModules
= null;
71 private NonEditableTableModel modelFpdModules
= null;
73 private FpdModuleSA settingDlg
= null;
75 private FpdFileContents ffc
= null;
77 private OpeningPlatformType docConsole
= null;
79 private Map
<String
, ArrayList
<String
>> fpdMsa
= null;
81 private ArrayList
<ModuleIdentification
> miList
= null;
84 * Column settings for displaying all modules in workspace
86 private final int modNameColForAllModTable
= 0;
88 private final int pkgNameColForAllModTable
= 1;
90 private final int pathColForAllModTable
= 2;
92 private final int typeColForAllModTable
= 3;
94 private final int pkgVerColForAllModTable
= 5;
96 private final int modVerColForAllModTable
= 4;
99 * Column settings for display modules in the FPD file
101 private final int modNameColForFpdModTable
= 0;
103 private final int pkgNameColForFpdModTable
= 1;
105 private final int pathColForFpdModTable
= 2;
107 private final int archColForFpdModTable
= 3;
109 private final int pkgVerColForFpdModTable
= 6;
111 private final int modVerColForFpdModTable
= 5;
113 private final int typeColForFpdModTable
= 4;
116 * FpdFileContents structure
118 private final int ffcModGuid
= 0;
120 private final int ffcModVer
= 1;
122 private final int ffcPkgGuid
= 2;
124 private final int ffcPkgVer
= 3;
126 private final int ffcModArch
= 4;
129 * Set Column Widths, Only the PATH should not have a max width.
131 private final int modNameMinWidth
= 168;
133 private final int modNamePrefWidth
= 200;
135 private final int modNameMaxWidth
= 350;
137 private final int pkgNameMinWidth
= 100;
139 private final int pkgNamePrefWidth
= 130;
141 private final int pkgNameMaxWidth
= 150;
143 private final int verMinWidth
= 60;
145 private final int verMaxWidth
= 80;
147 private final int verPrefWidth
= 70;
149 private final int pathPrefWidth
= 320;
151 private final int pathMinWidth
= 280;
153 private final int archPrefWidth
= 80;
155 private final int archMinWidth
= 60;
157 private final int archMaxWidth
= 100;
159 private final int typePrefWidth
= 145;
161 private final int typeMinWidth
= 100;
163 private final int typeMaxWidth
= 155;
166 * This method initializes jSplitPane
168 * This is the main edit window
170 * @return javax.swing.JSplitPane jSplitPane
172 private JSplitPane
getJSplitPane() {
173 if (jSplitPane
== null) {
174 jSplitPane
= new JSplitPane();
175 jSplitPane
.setOrientation(javax
.swing
.JSplitPane
.VERTICAL_SPLIT
);
176 jSplitPane
.setDividerLocation(250);
177 jSplitPane
.setBottomComponent(getJPanelBottom());
178 jSplitPane
.setTopComponent(getJPanelTop());
184 * This method initializes jPanelTop
186 * This panel contains the All Modules Table
188 * @return javax.swing.JPanel jPanelTop
190 private JPanel
getJPanelTop() {
191 if (jPanelTop
== null) {
192 jLabel
= new JLabel();
193 jLabel
.setText("Modules in Workspace");
194 jPanelTop
= new JPanel();
195 jPanelTop
.setLayout(new BorderLayout());
196 jPanelTop
.add(jLabel
, java
.awt
.BorderLayout
.NORTH
);
197 jPanelTop
.add(getJScrollPaneAllModules(), java
.awt
.BorderLayout
.CENTER
);
198 jPanelTop
.add(getJPanelTopSouth(), java
.awt
.BorderLayout
.SOUTH
);
204 * This method initializes jPanelBottom
206 * This panel contains the FPD Modules Table
208 * @return javax.swing.JPanel jPanelBottom
210 private JPanel
getJPanelBottom() {
211 if (jPanelBottom
== null) {
212 jLabelModulesAdded
= new JLabel();
213 jLabelModulesAdded
.setText("Modules Added");
214 jPanelBottom
= new JPanel();
215 jPanelBottom
.setLayout(new BorderLayout());
216 jPanelBottom
.add(jLabelModulesAdded
, java
.awt
.BorderLayout
.NORTH
);
217 jPanelBottom
.add(getJPanelBottomSouth(), java
.awt
.BorderLayout
.SOUTH
);
218 jPanelBottom
.add(getJScrollPaneFpdModules(), java
.awt
.BorderLayout
.CENTER
);
224 * This method initializes jScrollPaneAllModules
226 * @return javax.swing.JScrollPane jScrollPaneAllModules
228 private JScrollPane
getJScrollPaneAllModules() {
229 if (jScrollPaneAllModules
== null) {
230 jScrollPaneAllModules
= new JScrollPane();
231 jScrollPaneAllModules
.setPreferredSize(new java
.awt
.Dimension(600, 200));
232 jScrollPaneAllModules
.setViewportView(getJTableAllModules());
234 return jScrollPaneAllModules
;
238 * This method initializes jTableAllModules
240 * @return javax.swing.JTable jTableAllModules
242 private JTable
getJTableAllModules() {
243 if (jTableAllModules
== null) {
244 modelAllModules
= new NonEditableTableModel();
245 TableSorter sorter
= new TableSorter(modelAllModules
);
246 jTableAllModules
= new JTable(sorter
);
247 sorter
.setTableHeader(jTableAllModules
.getTableHeader());
248 jTableAllModules
.setRowHeight(20);
249 modelAllModules
.addColumn("<html>Module<br>Name</html>");
250 modelAllModules
.addColumn("<html>Package<br>Name</html>");
251 modelAllModules
.addColumn("Path");
252 modelAllModules
.addColumn("<html>Module<br>Type</html>");
253 modelAllModules
.addColumn("<html>Module<br>Version</html>");
254 modelAllModules
.addColumn("<html>Package<br>Version</html>");
256 javax
.swing
.table
.TableColumn column
= null;
257 column
= jTableAllModules
.getColumnModel().getColumn(modNameColForAllModTable
);
258 column
.setPreferredWidth(modNamePrefWidth
);
259 column
.setMinWidth(modNameMinWidth
);
260 column
.setMaxWidth(modNameMaxWidth
);
261 column
= jTableAllModules
.getColumnModel().getColumn(modVerColForAllModTable
);
262 column
.setPreferredWidth(verPrefWidth
);
263 column
.setMaxWidth(verMaxWidth
);
264 column
.setMinWidth(verMinWidth
);
265 column
= jTableAllModules
.getColumnModel().getColumn(pkgNameColForAllModTable
);
266 column
.setPreferredWidth(pkgNamePrefWidth
);
267 column
.setMinWidth(pkgNameMinWidth
);
268 column
.setMaxWidth(pkgNameMaxWidth
);
269 column
= jTableAllModules
.getColumnModel().getColumn(pkgVerColForAllModTable
);
270 column
.setPreferredWidth(verPrefWidth
);
271 column
.setMaxWidth(verMaxWidth
);
272 column
.setMinWidth(verMinWidth
);
273 column
= jTableAllModules
.getColumnModel().getColumn(typeColForAllModTable
);
274 column
.setPreferredWidth(typePrefWidth
);
275 column
.setMaxWidth(typeMaxWidth
);
276 column
.setMinWidth(typeMinWidth
);
277 column
= jTableAllModules
.getColumnModel().getColumn(pathColForAllModTable
);
278 column
.setPreferredWidth(pathPrefWidth
);
279 column
.setMinWidth(pathMinWidth
);
281 jTableAllModules
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
284 return jTableAllModules
;
288 * This method initializes jPanelTopSouth
290 * This panel contains the ADD button
292 * @return javax.swing.JPanel jPanelTopSouth
294 private JPanel
getJPanelTopSouth() {
295 if (jPanelTopSouth
== null) {
296 FlowLayout flowLayout
= new FlowLayout();
297 flowLayout
.setAlignment(java
.awt
.FlowLayout
.RIGHT
);
298 jPanelTopSouth
= new JPanel();
299 jPanelTopSouth
.setLayout(flowLayout
);
300 jPanelTopSouth
.add(getJButtonAddModule(), null);
302 return jPanelTopSouth
;
306 * This method initializes jButtonAddModule
308 * @return javax.swing.JButton jButtonAddModule
310 private JButton
getJButtonAddModule() {
311 if (jButtonAddModule
== null) {
312 jButtonAddModule
= new JButton();
313 jButtonAddModule
.setPreferredSize(new java
.awt
.Dimension(130, 20));
314 jButtonAddModule
.setText("Add a Module");
315 jButtonAddModule
.addActionListener(new java
.awt
.event
.ActionListener() {
316 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
317 int selectedRow
= jTableAllModules
.getSelectedRow();
318 if (selectedRow
< 0) {
322 TableSorter sorter
= (TableSorter
) jTableAllModules
.getModel();
323 selectedRow
= sorter
.modelIndex(selectedRow
);
324 String path
= modelAllModules
.getValueAt(selectedRow
, pathColForAllModTable
) + "";
325 ModuleIdentification mi
= miList
.get(selectedRow
);
326 Vector
<String
> vArchs
= null;
328 vArchs
= GlobalData
.getModuleSupArchs(mi
);
330 catch (Exception exp
) {
331 JOptionPane
.showMessageDialog(frame
, exp
.getMessage());
334 if (vArchs
== null) {
335 JOptionPane
.showMessageDialog(frame
, "No Supported Architectures specified in MSA file.");
339 String archsAdded
= "";
340 String mg
= mi
.getGuid();
341 String mv
= mi
.getVersion();
342 String pg
= mi
.getPackage().getGuid();
343 String pv
= mi
.getPackage().getVersion();
344 String mType
= mi
.getModuleType();
346 ArrayList
<String
> al
= fpdMsa
.get(mg
+ mv
+ pg
+ pv
);
349 // if existing ModuleSA does not specify version info.
351 al
= fpdMsa
.get(mg
+ "null" + pg
+ "null");
353 al
= fpdMsa
.get(mg
+ "null" + pg
+ pv
);
355 al
= fpdMsa
.get(mg
+ mv
+ pg
+ "null");
357 al
= new ArrayList
<String
>();
358 fpdMsa
.put(mg
+ mv
+ pg
+ pv
, al
);
364 // filter from module SupArchs what archs has been added.
366 for (int i
= 0; i
< al
.size(); ++i
) {
367 vArchs
.remove(al
.get(i
));
370 // check whether archs conform to SupArch of platform.
372 Vector
<Object
> platformSupArch
= new Vector
<Object
>();
373 ffc
.getPlatformDefsSupportedArchs(platformSupArch
);
374 vArchs
.retainAll(platformSupArch
);
376 // Archs this Module supported have already been added.
378 if (vArchs
.size() == 0) {
379 JOptionPane
.showMessageDialog(frame
, "This Module has already been added.");
382 //ToDo put Arch instead of null
383 boolean errorOccurred
= false;
384 for (int i
= 0; i
< vArchs
.size(); ++i
) {
385 String arch
= vArchs
.get(i
);
387 archsAdded
+= arch
+ " ";
388 String
[] row
= { "", "", "", "", "", "", "" };
391 row
[modNameColForFpdModTable
] = mi
.getName();
392 row
[pkgNameColForFpdModTable
] = mi
.getPackage().getName();
393 row
[pathColForFpdModTable
] = path
;
394 row
[archColForFpdModTable
] = arch
;
395 row
[pkgVerColForFpdModTable
] = pv
;
396 row
[modVerColForFpdModTable
] = mv
;
397 row
[typeColForFpdModTable
] = mType
;
400 modelFpdModules
.addRow(row
);
402 docConsole
.setSaved(false);
404 //ToDo : specify archs need to add.
405 ffc
.addFrameworkModulesPcdBuildDefs(mi
, arch
, null);
406 } catch (Exception exception
) {
407 JOptionPane
.showMessageDialog(frame
, "Adding " + row
[modNameColForFpdModTable
] + " with Supporting Architectures: " + arch
408 + ": " + exception
.getMessage());
409 errorOccurred
= true;
413 String s
= "This Module with Architecture " + archsAdded
;
415 s
+= " was added with Error. Platform may NOT Build.";
417 s
+= " was added Successfully.";
419 JOptionPane
.showMessageDialog(frame
, s
);
420 jTableFpdModules
.changeSelection(modelFpdModules
.getRowCount() - 1, 0, false, false);
424 return jButtonAddModule
;
428 * This method initializes jPanelBottomSouth
430 * This panel contains the Settings and Remove Buttons
432 * @return javax.swing.JPanel jPanelBottomSouth
434 private JPanel
getJPanelBottomSouth() {
435 if (jPanelBottomSouth
== null) {
436 FlowLayout flowLayout1
= new FlowLayout();
437 flowLayout1
.setAlignment(java
.awt
.FlowLayout
.RIGHT
);
438 jPanelBottomSouth
= new JPanel();
439 jPanelBottomSouth
.setLayout(flowLayout1
);
440 jPanelBottomSouth
.add(getJButtonSettings(), null);
441 jPanelBottomSouth
.add(getJButtonRemoveModule(), null);
443 return jPanelBottomSouth
;
447 * This method initializes jScrollPaneFpdModules
449 * @return javax.swing.JScrollPane jScrollPaneFpdModules
451 private JScrollPane
getJScrollPaneFpdModules() {
452 if (jScrollPaneFpdModules
== null) {
453 jScrollPaneFpdModules
= new JScrollPane();
454 jScrollPaneFpdModules
.setPreferredSize(new java
.awt
.Dimension(453, 200));
455 jScrollPaneFpdModules
.setViewportView(getJTableFpdModules());
457 return jScrollPaneFpdModules
;
461 * This method initializes jTableFpdModules
463 * @return javax.swing.JTable jTableFpdModules
465 private JTable
getJTableFpdModules() {
466 if (jTableFpdModules
== null) {
467 modelFpdModules
= new NonEditableTableModel();
468 TableSorter sorter
= new TableSorter(modelFpdModules
);
469 jTableFpdModules
= new JTable(sorter
);
470 sorter
.setTableHeader(jTableFpdModules
.getTableHeader());
471 jTableFpdModules
.setRowHeight(20);
472 modelFpdModules
.addColumn("<html>Module<br>Name</html>");
473 modelFpdModules
.addColumn("<html>Package<br>Name</html>");
474 modelFpdModules
.addColumn("Path");
475 modelFpdModules
.addColumn("<html>Supported<br>Architectures</html>");
476 modelFpdModules
.addColumn("<html>Module<br>Type</html>");
477 modelFpdModules
.addColumn("<html>Module<br>Version</html>");
478 modelFpdModules
.addColumn("<html>Package<br>Version</html>");
481 javax
.swing
.table
.TableColumn column
= null;
482 column
= jTableFpdModules
.getColumnModel().getColumn(modNameColForFpdModTable
);
483 column
.setPreferredWidth(modNamePrefWidth
);
484 column
.setMinWidth(modNameMinWidth
);
485 column
.setMaxWidth(modNameMaxWidth
);
486 column
= jTableFpdModules
.getColumnModel().getColumn(modVerColForFpdModTable
);
487 column
.setPreferredWidth(verPrefWidth
);
488 column
.setMaxWidth(verMaxWidth
);
489 column
.setMinWidth(verMinWidth
);
490 column
= jTableFpdModules
.getColumnModel().getColumn(pkgNameColForFpdModTable
);
491 column
.setPreferredWidth(pkgNamePrefWidth
);
492 column
.setMinWidth(pkgNameMinWidth
);
493 column
.setMaxWidth(pkgNameMaxWidth
);
494 column
= jTableFpdModules
.getColumnModel().getColumn(pkgVerColForFpdModTable
);
495 column
.setPreferredWidth(verPrefWidth
);
496 column
.setMaxWidth(verMaxWidth
);
497 column
.setMinWidth(verMinWidth
);
498 column
= jTableFpdModules
.getColumnModel().getColumn(archColForFpdModTable
);
499 column
.setPreferredWidth(archPrefWidth
);
500 column
.setMaxWidth(archMaxWidth
);
501 column
.setMinWidth(archMinWidth
);
502 column
= jTableFpdModules
.getColumnModel().getColumn(pathColForFpdModTable
);
503 column
.setPreferredWidth(pathPrefWidth
);
504 column
.setMinWidth(pathMinWidth
);
505 column
= jTableFpdModules
.getColumnModel().getColumn(typeColForFpdModTable
);
506 column
.setPreferredWidth(typePrefWidth
);
507 column
.setMaxWidth(typeMaxWidth
);
508 column
.setMinWidth(typeMinWidth
);
510 jTableFpdModules
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
513 return jTableFpdModules
;
517 * This method initializes jButtonSettings
519 * @return javax.swing.JButton jButtonSettings
521 private JButton
getJButtonSettings() {
522 if (jButtonSettings
== null) {
523 jButtonSettings
= new JButton();
524 jButtonSettings
.setPreferredSize(new java
.awt
.Dimension(130,20));
525 jButtonSettings
.setText("Settings");
526 jButtonSettings
.addActionListener(new java
.awt
.event
.ActionListener() {
527 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
528 int selectedRow
= jTableFpdModules
.getSelectedRow();
529 if (selectedRow
< 0) {
533 TableSorter sorter
= (TableSorter
) jTableFpdModules
.getModel();
534 selectedRow
= sorter
.modelIndex(selectedRow
);
536 if (ffc
.adjustPcd(selectedRow
)) {
537 docConsole
.setSaved(false);
540 catch (Exception exp
) {
541 JOptionPane
.showMessageDialog(frame
, exp
.getMessage());
545 if (settingDlg
== null) {
546 settingDlg
= new FpdModuleSA(ffc
);
549 String
[] sa
= new String
[5];
550 ffc
.getFrameworkModuleInfo(selectedRow
, sa
);
551 String mg
= sa
[ffcModGuid
];
552 String mv
= sa
[ffcModVer
];
553 String pg
= sa
[ffcPkgGuid
];
554 String pv
= sa
[ffcPkgVer
];
555 String arch
= sa
[ffcModArch
];
556 settingDlg
.setKey(mg
+ " " + mv
+ " " + pg
+ " " + pv
+ " " + arch
, selectedRow
, docConsole
);
557 settingDlg
.setVisible(true);
561 return jButtonSettings
;
565 * This method initializes jButtonRemoveModule
567 * @return javax.swing.JButton jButtonRemoveModule
569 private JButton
getJButtonRemoveModule() {
570 if (jButtonRemoveModule
== null) {
571 jButtonRemoveModule
= new JButton();
572 jButtonRemoveModule
.setPreferredSize(new java
.awt
.Dimension(130, 20));
573 jButtonRemoveModule
.setText("Remove Module");
574 jButtonRemoveModule
.addActionListener(new java
.awt
.event
.ActionListener() {
575 public void actionPerformed(java
.awt
.event
.ActionEvent e
) {
576 int selectedRow
= jTableFpdModules
.getSelectedRow();
577 if (selectedRow
< 0) {
581 TableSorter sorter
= (TableSorter
) jTableFpdModules
.getModel();
582 selectedRow
= sorter
.modelIndex(selectedRow
);
584 String
[] sa
= new String
[5];
585 ffc
.getFrameworkModuleInfo(selectedRow
, sa
);
586 String mg
= sa
[ffcModGuid
];
587 String mv
= sa
[ffcModVer
];
588 String pg
= sa
[ffcPkgGuid
];
589 String pv
= sa
[ffcPkgVer
];
590 String arch
= sa
[ffcModArch
];
591 ModuleIdentification mi
= GlobalData
.getModuleId(mg
+ " " + mv
+ " " + pg
+ " " + pv
+ " " + arch
);
592 mv
= mi
.getVersion();
593 pv
= mi
.getPackage().getVersion();
594 modelFpdModules
.removeRow(selectedRow
);
596 // if no arch specified in ModuleSA
597 fpdMsa
.remove(mg
+ mv
+ pg
+ pv
);
600 ArrayList
<String
> al
= fpdMsa
.get(mg
+ mv
+ pg
+ pv
);
602 if (al
.size() == 0) {
603 fpdMsa
.remove(mg
+ mv
+ pg
+ pv
);
607 docConsole
.setSaved(false);
608 ffc
.removeModuleSA(selectedRow
);
612 return jButtonRemoveModule
;
619 public static void main(String
[] args
) {
620 // Set the pane visable
621 new FpdFrameworkModules().setVisible(true);
625 * This is the default constructor
627 public FpdFrameworkModules() {
632 public FpdFrameworkModules(PlatformSurfaceAreaDocument
.PlatformSurfaceArea fpd
) {
638 public FpdFrameworkModules(OpeningPlatformType opt
) {
639 this(opt
.getXmlFpd());
643 private void init(PlatformSurfaceAreaDocument
.PlatformSurfaceArea fpd
) {
645 GlobalData
.initInfo("Tools" + File
.separator
+ "Conf" + File
.separator
+ "FrameworkDatabase.db", System
.getenv("WORKSPACE"));
648 JOptionPane
.showMessageDialog(frame
, "Error occurred when getting module data.");
652 ffc
= new FpdFileContents(fpd
);
656 if (fpdMsa
== null) {
657 fpdMsa
= new HashMap
<String
, ArrayList
<String
>>();
660 if (ffc
.getFrameworkModulesCount() > 0) {
661 String
[][] saa
= new String
[ffc
.getFrameworkModulesCount()][5];
662 ffc
.getFrameworkModulesInfo(saa
);
663 for (int i
= 0; i
< saa
.length
; ++i
) {
664 ModuleIdentification mi
= GlobalData
.getModuleId(saa
[i
][ffcModGuid
] + " " + saa
[i
][ffcModVer
] + " "
665 + saa
[i
][ffcPkgGuid
] + " " + saa
[i
][ffcPkgVer
]);
666 String
[] row
= { "", "", "", "", "", "", "" };
668 row
[modNameColForFpdModTable
] = mi
.getName();
669 row
[modVerColForFpdModTable
] = mi
.getVersion();
670 row
[typeColForFpdModTable
] = mi
.getModuleType();
671 row
[pkgNameColForFpdModTable
] = mi
.getPackage().getName();
672 row
[pkgVerColForFpdModTable
] = mi
.getPackage().getVersion();
673 row
[archColForFpdModTable
] = saa
[i
][ffcModArch
];
675 row
[pathColForFpdModTable
] = GlobalData
.getMsaFile(mi
).getPath().substring(
676 System
.getenv("WORKSPACE")
678 } catch (Exception e
) {
679 JOptionPane
.showMessageDialog(frame
, "Show FPD Modules:" + e
.getMessage());
682 modelFpdModules
.addRow(row
);
683 String fpdMsaKey
= saa
[i
][ffcModGuid
] + row
[modVerColForFpdModTable
]
684 + saa
[i
][ffcPkgGuid
] + row
[pkgVerColForFpdModTable
];
685 ArrayList
<String
> al
= fpdMsa
.get(fpdMsaKey
);
687 al
= new ArrayList
<String
>();
688 fpdMsa
.put(fpdMsaKey
, al
);
690 al
.add(saa
[i
][ffcModArch
]);
695 TableSorter sorter
= (TableSorter
)jTableFpdModules
.getModel();
696 sorter
.setSortingStatus(modNameColForFpdModTable
, TableSorter
.ASCENDING
);
703 private void showAllModules() {
705 if (miList
== null) {
706 miList
= new ArrayList
<ModuleIdentification
>();
708 Set
<PackageIdentification
> spi
= GlobalData
.getPackageList();
709 Iterator ispi
= spi
.iterator();
711 while (ispi
.hasNext()) {
712 PackageIdentification pi
= (PackageIdentification
) ispi
.next();
713 String
[] s
= { "", "", "", "", "", "" };
715 Set
<ModuleIdentification
> smi
= GlobalData
.getModules(pi
);
716 Iterator ismi
= smi
.iterator();
717 while (ismi
.hasNext()) {
718 ModuleIdentification mi
= (ModuleIdentification
) ismi
.next();
719 s
[modNameColForAllModTable
] = mi
.getName();
720 s
[modVerColForAllModTable
] = mi
.getVersion();
721 s
[typeColForAllModTable
] = mi
.getModuleType();
722 s
[pkgNameColForAllModTable
] = pi
.getName();
723 s
[pkgVerColForAllModTable
] = pi
.getVersion();
725 s
[pathColForAllModTable
] = GlobalData
.getMsaFile(mi
).getPath()
726 .substring(System
.getenv("WORKSPACE").length() + 1);
727 } catch (Exception e
) {
728 JOptionPane
.showMessageDialog(frame
, "Show All Modules:" + e
.getMessage());
730 modelAllModules
.addRow(s
);
735 TableSorter sorter
= (TableSorter
)jTableAllModules
.getModel();
736 sorter
.setSortingStatus(modNameColForAllModTable
, TableSorter
.ASCENDING
);
740 * This method initializes this
744 private void initialize() {
745 this.setSize(633, 533);
746 this.setTitle("Framework Modules");
747 this.setContentPane(getJSplitPane());
748 this.setVisible(true);
752 } // @jve:decl-index=0:visual-constraint="10,10"
754 class NonEditableTableModel
extends DefaultTableModel
{
758 private static final long serialVersionUID
= 1L;
760 public boolean isCellEditable(int row
, int col
) {