]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java
java variable should have its first char in low case.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdFrameworkModules.java
1 package org.tianocore.frameworkwizard.platform.ui;
2
3 import java.awt.BorderLayout;
4
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;
15
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;
22
23 import java.awt.FlowLayout;
24 import java.io.File;
25 import java.util.ArrayList;
26 import java.util.HashMap;
27 import java.util.Iterator;
28 import java.util.Map;
29 import java.util.Set;
30 import java.util.Vector;
31
32 public class FpdFrameworkModules extends IInternalFrame {
33
34 /**
35 *
36 */
37 private static final long serialVersionUID = 1L;
38
39 static JFrame frame;
40
41 private JSplitPane jSplitPane = null;
42
43 private JPanel jPanelTop = null;
44
45 private JPanel jPanelBottom = null;
46
47 private JLabel jLabel = null;
48
49 private JScrollPane jScrollPaneAllModules = null;
50
51 private JTable jTableAllModules = null;
52
53 private JPanel jPanelTopSouth = null;
54
55 private JButton jButtonAddModule = null;
56
57 private JLabel jLabelModulesAdded = null;
58
59 private JPanel jPanelBottomSouth = null;
60
61 private JScrollPane jScrollPaneFpdModules = null;
62
63 private JTable jTableFpdModules = null;
64
65 private JButton jButtonSettings = null;
66
67 private JButton jButtonRemoveModule = null;
68
69 private NonEditableTableModel modelAllModules = null;
70
71 private NonEditableTableModel modelFpdModules = null;
72
73 private FpdModuleSA settingDlg = null;
74
75 private FpdFileContents ffc = null;
76
77 private OpeningPlatformType docConsole = null;
78
79 private Map<String, ArrayList<String>> fpdMsa = null;
80
81 private ArrayList<ModuleIdentification> miList = null;
82
83 private final int modNameColForAllModTable = 0;
84
85 private final int pkgNameColForAllModTable = 1;
86
87 private final int pathColForAllModTable = 2;
88
89 private final int pkgVerColForAllModTable = 3;
90
91 private final int modVerColForAllModTable = 4;
92
93 private final int modNameColForFpdModTable = 0;
94
95 private final int pkgNameColForFpdModTable = 1;
96
97 private final int pathColForFpdModTable = 2;
98
99 private final int archColForFpdModTable = 3;
100
101 private final int pkgVerColForFpdModTable = 4;
102
103 private final int modVerColForFpdModTable = 5;
104
105 private final int ffcModGuid = 0;
106
107 private final int ffcModVer = 1;
108
109 private final int ffcPkgGuid = 2;
110
111 private final int ffcPkgVer = 3;
112
113 private final int ffcModArch = 4;
114
115 private final int modNameMinWidth = 168;
116
117 private final int modNamePrefWidth = 200;
118
119 private final int pkgNameMinWidth = 100;
120
121 private final int pkgNamePrefWidth = 110;
122
123 private final int pkgNameMaxWidth = 150;
124
125 private final int verMinWidth = 50;
126
127 private final int verMaxWidth = 80;
128
129 private final int verPrefWidth = 60;
130
131 private final int pathPrefWidth = 320;
132
133 private final int pathMinWidth = 280;
134
135 private final int archPrefWidth = 80;
136
137 private final int archMinWidth = 60;
138
139 private final int archMaxWidth = 100;
140
141 /**
142 * This method initializes jSplitPane
143 *
144 * @return javax.swing.JSplitPane
145 */
146 private JSplitPane getJSplitPane() {
147 if (jSplitPane == null) {
148 jSplitPane = new JSplitPane();
149 jSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
150 jSplitPane.setDividerLocation(250);
151 jSplitPane.setBottomComponent(getJPanelBottom());
152 jSplitPane.setTopComponent(getJPanelTop());
153 }
154 return jSplitPane;
155 }
156
157 /**
158 * This method initializes jPanel
159 *
160 * @return javax.swing.JPanel
161 */
162 private JPanel getJPanelTop() {
163 if (jPanelTop == null) {
164 jLabel = new JLabel();
165 jLabel.setText("Modules in Workspace");
166 jPanelTop = new JPanel();
167 jPanelTop.setLayout(new BorderLayout());
168 jPanelTop.add(jLabel, java.awt.BorderLayout.NORTH);
169 jPanelTop.add(getJScrollPaneAllModules(), java.awt.BorderLayout.CENTER);
170 jPanelTop.add(getJPanelTopSouth(), java.awt.BorderLayout.SOUTH);
171 }
172 return jPanelTop;
173 }
174
175 /**
176 * This method initializes jPanel1
177 *
178 * @return javax.swing.JPanel
179 */
180 private JPanel getJPanelBottom() {
181 if (jPanelBottom == null) {
182 jLabelModulesAdded = new JLabel();
183 jLabelModulesAdded.setText("Modules Added");
184 jPanelBottom = new JPanel();
185 jPanelBottom.setLayout(new BorderLayout());
186 jPanelBottom.add(jLabelModulesAdded, java.awt.BorderLayout.NORTH);
187 jPanelBottom.add(getJPanelBottomSouth(), java.awt.BorderLayout.SOUTH);
188 jPanelBottom.add(getJScrollPaneFpdModules(), java.awt.BorderLayout.CENTER);
189 }
190 return jPanelBottom;
191 }
192
193 /**
194 * This method initializes jScrollPane
195 *
196 * @return javax.swing.JScrollPane
197 */
198 private JScrollPane getJScrollPaneAllModules() {
199 if (jScrollPaneAllModules == null) {
200 jScrollPaneAllModules = new JScrollPane();
201 jScrollPaneAllModules.setPreferredSize(new java.awt.Dimension(600, 200));
202 jScrollPaneAllModules.setViewportView(getJTableAllModules());
203 }
204 return jScrollPaneAllModules;
205 }
206
207 /**
208 * This method initializes jTable
209 *
210 * @return javax.swing.JTable
211 */
212 private JTable getJTableAllModules() {
213 if (jTableAllModules == null) {
214 modelAllModules = new NonEditableTableModel();
215 TableSorter sorter = new TableSorter(modelAllModules);
216 jTableAllModules = new JTable(sorter);
217 sorter.setTableHeader(jTableAllModules.getTableHeader());
218 jTableAllModules.setRowHeight(20);
219 modelAllModules.addColumn("<html>Module<br>Name</html>");
220 modelAllModules.addColumn("<html>Package<br>Name</html>");
221 modelAllModules.addColumn("Path");
222 modelAllModules.addColumn("<html>Package<br>Version</html>");
223 modelAllModules.addColumn("<html>Module<br>Version</html>");
224
225 javax.swing.table.TableColumn column = null;
226 column = jTableAllModules.getColumnModel().getColumn(modNameColForAllModTable);
227 column.setPreferredWidth(modNamePrefWidth);
228 column.setMinWidth(modNameMinWidth);
229 column = jTableAllModules.getColumnModel().getColumn(modVerColForAllModTable);
230 column.setPreferredWidth(verPrefWidth);
231 column.setMaxWidth(verMaxWidth);
232 column.setMinWidth(verMinWidth);
233 column = jTableAllModules.getColumnModel().getColumn(pkgNameColForAllModTable);
234 column.setPreferredWidth(pkgNamePrefWidth);
235 column.setMinWidth(pkgNameMinWidth);
236 column.setMaxWidth(pkgNameMaxWidth);
237 column = jTableAllModules.getColumnModel().getColumn(pkgVerColForAllModTable);
238 column.setPreferredWidth(verPrefWidth);
239 column.setMaxWidth(verMaxWidth);
240 column.setMinWidth(verMinWidth);
241 column = jTableAllModules.getColumnModel().getColumn(pathColForAllModTable);
242 column.setPreferredWidth(pathPrefWidth);
243 column.setMinWidth(pathMinWidth);
244
245 jTableAllModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
246 jTableAllModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
247 }
248 return jTableAllModules;
249 }
250
251 /**
252 * This method initializes jPanel2
253 *
254 * @return javax.swing.JPanel
255 */
256 private JPanel getJPanelTopSouth() {
257 if (jPanelTopSouth == null) {
258 FlowLayout flowLayout = new FlowLayout();
259 flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
260 jPanelTopSouth = new JPanel();
261 jPanelTopSouth.setLayout(flowLayout);
262 jPanelTopSouth.add(getJButtonAddModule(), null);
263 }
264 return jPanelTopSouth;
265 }
266
267 /**
268 * This method initializes jButton
269 *
270 * @return javax.swing.JButton
271 */
272 private JButton getJButtonAddModule() {
273 if (jButtonAddModule == null) {
274 jButtonAddModule = new JButton();
275 jButtonAddModule.setPreferredSize(new java.awt.Dimension(130, 20));
276 jButtonAddModule.setText("Add a Module");
277 jButtonAddModule.addActionListener(new java.awt.event.ActionListener() {
278 public void actionPerformed(java.awt.event.ActionEvent e) {
279 int selectedRow = jTableAllModules.getSelectedRow();
280 if (selectedRow < 0) {
281 return;
282 }
283
284 TableSorter sorter = (TableSorter) jTableAllModules.getModel();
285 selectedRow = sorter.modelIndex(selectedRow);
286 String path = modelAllModules.getValueAt(selectedRow, pathColForAllModTable) + "";
287 ModuleIdentification mi = miList.get(selectedRow);
288 Vector<String> vArchs = null;
289 try {
290 vArchs = GlobalData.getModuleSupArchs(mi);
291 }
292 catch (Exception exp) {
293 JOptionPane.showMessageDialog(frame, exp.getMessage());
294 }
295
296 if (vArchs == null) {
297 JOptionPane.showMessageDialog(frame, "No Supported Architectures specified in MSA file.");
298 return;
299 }
300
301 String archsAdded = "";
302 String mg = mi.getGuid();
303 String mv = mi.getVersion();
304 String pg = mi.getPackage().getGuid();
305 String pv = mi.getPackage().getVersion();
306
307 ArrayList<String> al = fpdMsa.get(mg + mv + pg + pv);
308 if (al == null) {
309 al = new ArrayList<String>();
310 fpdMsa.put(mg + mv + pg + pv, al);
311 }
312 for (int i = 0; i < al.size(); ++i) {
313 vArchs.remove(al.get(i));
314 }
315 //
316 // Archs this Module supported have already been added.
317 //
318 if (vArchs.size() == 0) {
319 JOptionPane.showMessageDialog(frame, "This Module has already been added.");
320 return;
321 }
322 //ToDo put Arch instead of null
323 boolean errorOccurred = false;
324 for (int i = 0; i < vArchs.size(); ++i) {
325 String arch = vArchs.get(i);
326 al.add(arch);
327 archsAdded += arch + " ";
328 String[] row = { "", "", "", "", "", "" };
329
330 if (mi != null) {
331 row[modNameColForFpdModTable] = mi.getName();
332 row[pkgNameColForFpdModTable] = mi.getPackage().getName();
333 row[pathColForFpdModTable] = path;
334 row[archColForFpdModTable] = arch;
335 row[pkgVerColForFpdModTable] = pv;
336 row[modVerColForFpdModTable] = mv;
337
338 }
339 modelFpdModules.addRow(row);
340
341 docConsole.setSaved(false);
342 try {
343 //ToDo : specify archs need to add.
344 ffc.addFrameworkModulesPcdBuildDefs(mi, arch, null);
345 } catch (Exception exception) {
346 JOptionPane.showMessageDialog(frame, "Adding " + row[modNameColForFpdModTable] + " with SupArch " + arch
347 + ": " + exception.getMessage());
348 errorOccurred = true;
349 }
350 }
351
352 String s = "This Module with Architecture " + archsAdded;
353 if (errorOccurred) {
354 s += " was added with Error. Platform may NOT Build.";
355 } else {
356 s += " was added Successfully.";
357 }
358 JOptionPane.showMessageDialog(frame, s);
359 jTableFpdModules.changeSelection(modelFpdModules.getRowCount() - 1, 0, false, false);
360 }
361 });
362 }
363 return jButtonAddModule;
364 }
365
366 /**
367 * This method initializes jPanel3
368 *
369 * @return javax.swing.JPanel
370 */
371 private JPanel getJPanelBottomSouth() {
372 if (jPanelBottomSouth == null) {
373 FlowLayout flowLayout1 = new FlowLayout();
374 flowLayout1.setAlignment(java.awt.FlowLayout.RIGHT);
375 jPanelBottomSouth = new JPanel();
376 jPanelBottomSouth.setLayout(flowLayout1);
377 jPanelBottomSouth.add(getJButtonSettings(), null);
378 jPanelBottomSouth.add(getJButtonRemoveModule(), null);
379 }
380 return jPanelBottomSouth;
381 }
382
383 /**
384 * This method initializes jScrollPane1
385 *
386 * @return javax.swing.JScrollPane
387 */
388 private JScrollPane getJScrollPaneFpdModules() {
389 if (jScrollPaneFpdModules == null) {
390 jScrollPaneFpdModules = new JScrollPane();
391 jScrollPaneFpdModules.setPreferredSize(new java.awt.Dimension(453, 200));
392 jScrollPaneFpdModules.setViewportView(getJTableFpdModules());
393 }
394 return jScrollPaneFpdModules;
395 }
396
397 /**
398 * This method initializes jTable1
399 *
400 * @return javax.swing.JTable
401 */
402 private JTable getJTableFpdModules() {
403 if (jTableFpdModules == null) {
404 modelFpdModules = new NonEditableTableModel();
405 TableSorter sorter = new TableSorter(modelFpdModules);
406 jTableFpdModules = new JTable(sorter);
407 sorter.setTableHeader(jTableFpdModules.getTableHeader());
408 jTableFpdModules.setRowHeight(20);
409 modelFpdModules.addColumn("<html>Module<br>Name</html>");
410 modelFpdModules.addColumn("<html>Package<br>Name</html>");
411 modelFpdModules.addColumn("Path");
412 modelFpdModules.addColumn("<html>Supported<br>Architectures</html>");
413 modelFpdModules.addColumn("<html>Package<br>Version</html>");
414 modelFpdModules.addColumn("<html>Module<br>Version</html>");
415
416 javax.swing.table.TableColumn column = null;
417 column = jTableFpdModules.getColumnModel().getColumn(modNameColForFpdModTable);
418 column.setPreferredWidth(modNamePrefWidth);
419 column.setMinWidth(modNameMinWidth);
420 column = jTableFpdModules.getColumnModel().getColumn(modVerColForFpdModTable);
421 column.setPreferredWidth(verPrefWidth);
422 column.setMaxWidth(verMaxWidth);
423 column.setMinWidth(verMinWidth);
424 column = jTableFpdModules.getColumnModel().getColumn(pkgNameColForFpdModTable);
425 column.setPreferredWidth(pkgNamePrefWidth);
426 column.setMinWidth(pkgNameMinWidth);
427 column.setMaxWidth(pkgNameMaxWidth);
428 column = jTableFpdModules.getColumnModel().getColumn(pkgVerColForFpdModTable);
429 column.setPreferredWidth(verPrefWidth);
430 column.setMaxWidth(verMaxWidth);
431 column.setMinWidth(verMinWidth);
432 column = jTableFpdModules.getColumnModel().getColumn(archColForFpdModTable);
433 column.setPreferredWidth(archPrefWidth);
434 column.setMaxWidth(archMaxWidth);
435 column.setMinWidth(archMinWidth);
436 column = jTableFpdModules.getColumnModel().getColumn(pathColForFpdModTable);
437 column.setPreferredWidth(pathPrefWidth);
438 column.setMinWidth(pathMinWidth);
439
440 jTableFpdModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
441 jTableFpdModules.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
442 }
443 return jTableFpdModules;
444 }
445
446 /**
447 * This method initializes jButton1
448 *
449 * @return javax.swing.JButton
450 */
451 private JButton getJButtonSettings() {
452 if (jButtonSettings == null) {
453 jButtonSettings = new JButton();
454 jButtonSettings.setPreferredSize(new java.awt.Dimension(130,20));
455 jButtonSettings.setText("Settings");
456 jButtonSettings.addActionListener(new java.awt.event.ActionListener() {
457 public void actionPerformed(java.awt.event.ActionEvent e) {
458 int selectedRow = jTableFpdModules.getSelectedRow();
459 if (selectedRow < 0) {
460 return;
461 }
462
463 TableSorter sorter = (TableSorter) jTableFpdModules.getModel();
464 selectedRow = sorter.modelIndex(selectedRow);
465 try {
466 if (ffc.adjustPcd(selectedRow)) {
467 docConsole.setSaved(false);
468 }
469 }
470 catch (Exception exp) {
471 JOptionPane.showMessageDialog(frame, exp.getMessage());
472 return;
473 }
474
475 if (settingDlg == null) {
476 settingDlg = new FpdModuleSA(ffc);
477 }
478
479 String[] sa = new String[5];
480 ffc.getFrameworkModuleInfo(selectedRow, sa);
481 String mg = sa[ffcModGuid];
482 String mv = sa[ffcModVer];
483 String pg = sa[ffcPkgGuid];
484 String pv = sa[ffcPkgVer];
485 String arch = sa[ffcModArch];
486 settingDlg.setKey(mg + " " + mv + " " + pg + " " + pv + " " + arch, selectedRow, docConsole);
487 settingDlg.setVisible(true);
488 }
489 });
490 }
491 return jButtonSettings;
492 }
493
494 /**
495 * This method initializes jButton2
496 *
497 * @return javax.swing.JButton
498 */
499 private JButton getJButtonRemoveModule() {
500 if (jButtonRemoveModule == null) {
501 jButtonRemoveModule = new JButton();
502 jButtonRemoveModule.setPreferredSize(new java.awt.Dimension(130, 20));
503 jButtonRemoveModule.setText("Remove Module");
504 jButtonRemoveModule.addActionListener(new java.awt.event.ActionListener() {
505 public void actionPerformed(java.awt.event.ActionEvent e) {
506 int selectedRow = jTableFpdModules.getSelectedRow();
507 if (selectedRow < 0) {
508 return;
509 }
510
511 TableSorter sorter = (TableSorter) jTableFpdModules.getModel();
512 selectedRow = sorter.modelIndex(selectedRow);
513
514 String[] sa = new String[5];
515 ffc.getFrameworkModuleInfo(selectedRow, sa);
516 String mg = sa[ffcModGuid];
517 String mv = sa[ffcModVer];
518 String pg = sa[ffcPkgGuid];
519 String pv = sa[ffcPkgVer];
520 String arch = sa[ffcModArch];
521 ModuleIdentification mi = GlobalData.getModuleId(mg + " " + mv + " " + pg + " " + pv + " " + arch);
522 mv = mi.getVersion();
523 pv = mi.getPackage().getVersion();
524 modelFpdModules.removeRow(selectedRow);
525 if (arch == null) {
526 // if no arch specified in ModuleSA
527 fpdMsa.remove(mg + mv + pg + pv);
528 } else {
529 ArrayList<String> al = fpdMsa.get(mg + mv + pg + pv);
530 al.remove(arch);
531 if (al.size() == 0) {
532 fpdMsa.remove(mg + mv + pg + pv);
533 }
534 }
535
536 docConsole.setSaved(false);
537 ffc.removeModuleSA(selectedRow);
538 }
539 });
540 }
541 return jButtonRemoveModule;
542 }
543
544 /**
545 * @param args
546 */
547 public static void main(String[] args) {
548 // TODO Auto-generated method stub
549 new FpdFrameworkModules().setVisible(true);
550 }
551
552 /**
553 * This is the default constructor
554 */
555 public FpdFrameworkModules() {
556 super();
557 initialize();
558 }
559
560 public FpdFrameworkModules(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {
561 this();
562 init(fpd);
563
564 }
565
566 public FpdFrameworkModules(OpeningPlatformType opt) {
567 this(opt.getXmlFpd());
568 docConsole = opt;
569 }
570
571 private void init(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {
572 try {
573 GlobalData.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db", System.getenv("WORKSPACE"));
574 }
575 catch(Exception e){
576 JOptionPane.showMessageDialog(frame, "Error occurred when getting module data.");
577 }
578
579 if (ffc == null) {
580 ffc = new FpdFileContents(fpd);
581 ffc.initDynPcdMap();
582 }
583
584 if (fpdMsa == null) {
585 fpdMsa = new HashMap<String, ArrayList<String>>();
586 }
587
588 if (ffc.getFrameworkModulesCount() > 0) {
589 String[][] saa = new String[ffc.getFrameworkModulesCount()][5];
590 ffc.getFrameworkModulesInfo(saa);
591 for (int i = 0; i < saa.length; ++i) {
592 ModuleIdentification mi = GlobalData.getModuleId(saa[i][ffcModGuid] + " " + saa[i][ffcModVer] + " "
593 + saa[i][ffcPkgGuid] + " " + saa[i][ffcPkgVer]);
594 String[] row = { "", "", "", "", "", "" };
595 if (mi != null) {
596 row[modNameColForFpdModTable] = mi.getName();
597 row[modVerColForFpdModTable] = mi.getVersion();
598 row[pkgNameColForFpdModTable] = mi.getPackage().getName();
599 row[pkgVerColForFpdModTable] = mi.getPackage().getVersion();
600 row[archColForFpdModTable] = saa[i][4];
601 try {
602 row[pathColForFpdModTable] = GlobalData.getMsaFile(mi).getPath().substring(
603 System.getenv("WORKSPACE")
604 .length() + 1);
605 } catch (Exception e) {
606 JOptionPane.showMessageDialog(frame, "Show FPD Modules:" + e.getMessage());
607 }
608 }
609 modelFpdModules.addRow(row);
610 ArrayList<String> al = fpdMsa.get(saa[i][ffcModGuid] + saa[i][ffcModVer]
611 + saa[i][ffcPkgGuid] + saa[i][ffcPkgVer]);
612 if (al == null) {
613 al = new ArrayList<String>();
614 fpdMsa.put(saa[i][ffcModGuid] + saa[i][ffcModVer] + saa[i][ffcPkgGuid] + saa[i][ffcPkgVer], al);
615 }
616 al.add(saa[i][ffcModArch]);
617
618 }
619 }
620
621 showAllModules();
622
623 }
624
625 private void showAllModules() {
626
627 if (miList == null) {
628 miList = new ArrayList<ModuleIdentification>();
629 }
630 Set<PackageIdentification> spi = GlobalData.getPackageList();
631 Iterator ispi = spi.iterator();
632
633 while (ispi.hasNext()) {
634 PackageIdentification pi = (PackageIdentification) ispi.next();
635 String[] s = { "", "", "", "", "" };
636
637 Set<ModuleIdentification> smi = GlobalData.getModules(pi);
638 Iterator ismi = smi.iterator();
639 while (ismi.hasNext()) {
640 ModuleIdentification mi = (ModuleIdentification) ismi.next();
641 s[modNameColForAllModTable] = mi.getName();
642 s[modVerColForAllModTable] = mi.getVersion();
643 s[pkgNameColForAllModTable] = pi.getName();
644 s[pkgVerColForAllModTable] = pi.getVersion();
645 try {
646 s[pathColForAllModTable] = GlobalData.getMsaFile(mi).getPath()
647 .substring(System.getenv("WORKSPACE").length() + 1);
648 } catch (Exception e) {
649 JOptionPane.showMessageDialog(frame, "Show All Modules:" + e.getMessage());
650 }
651 modelAllModules.addRow(s);
652 miList.add(mi);
653 }
654 }
655 }
656
657 /**
658 * This method initializes this
659 *
660 * @return void
661 */
662 private void initialize() {
663 this.setSize(633, 533);
664 this.setTitle("Framework Modules");
665 this.setContentPane(getJSplitPane());
666 this.setVisible(true);
667
668 }
669
670 } // @jve:decl-index=0:visual-constraint="10,10"
671
672 class NonEditableTableModel extends DefaultTableModel {
673 /**
674 *
675 */
676 private static final long serialVersionUID = 1L;
677
678 public boolean isCellEditable(int row, int col) {
679 return false;
680 }
681 }