move the package definitions to header editor.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / FrameworkWizardUI.java
CommitLineData
a13899c5 1/** @file\r
2 \r
3 The main GUI for module editor. \r
4 \r
5 Copyright (c) 2006, Intel Corporation\r
6 All rights reserved. This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10 \r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13 \r
14 **/\r
15\r
16package org.tianocore.frameworkwizard;\r
17\r
18import java.awt.event.ActionEvent;\r
19import java.awt.event.ComponentEvent;\r
20import java.awt.event.ComponentListener;\r
21import java.awt.event.MouseEvent;\r
22import java.awt.event.MouseListener;\r
23import java.awt.event.WindowEvent;\r
24import java.io.IOException;\r
25import java.util.Vector;\r
26\r
27import javax.swing.JButton;\r
28import javax.swing.JCheckBoxMenuItem;\r
29import javax.swing.JDesktopPane;\r
30import javax.swing.JFileChooser;\r
31import javax.swing.JFrame;\r
32import javax.swing.JInternalFrame;\r
33import javax.swing.JMenu;\r
34import javax.swing.JMenuBar;\r
35import javax.swing.JMenuItem;\r
36import javax.swing.JOptionPane;\r
37import javax.swing.JPanel;\r
38import javax.swing.JScrollPane;\r
39import javax.swing.JSplitPane;\r
40import javax.swing.JTabbedPane;\r
41import javax.swing.event.MenuEvent;\r
42import javax.swing.event.MenuListener;\r
43import javax.swing.event.TreeSelectionEvent;\r
44import javax.swing.event.TreeSelectionListener;\r
45\r
46import org.apache.xmlbeans.XmlException;\r
47import org.tianocore.ModuleSurfaceAreaDocument;\r
48import org.tianocore.PackageSurfaceAreaDocument;\r
49import org.tianocore.PlatformSurfaceAreaDocument;\r
50import org.tianocore.frameworkwizard.common.DataType;\r
51import org.tianocore.frameworkwizard.common.IFileFilter;\r
a13899c5 52import org.tianocore.frameworkwizard.common.Log;\r
f9d0ab92 53import org.tianocore.frameworkwizard.common.OpenFile;\r
a13899c5 54import org.tianocore.frameworkwizard.common.SaveFile;\r
55import org.tianocore.frameworkwizard.common.Tools;\r
79cb6fdb 56import org.tianocore.frameworkwizard.common.Identifications.Identification;\r
79cb6fdb 57import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleList;\r
58import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType;\r
59import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageList;\r
60import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageType;\r
61import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformList;\r
62import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;\r
a13899c5 63import org.tianocore.frameworkwizard.common.ui.IDefaultMutableTreeNode;\r
64import org.tianocore.frameworkwizard.common.ui.IDesktopManager;\r
65import org.tianocore.frameworkwizard.common.ui.IFrame;\r
66import org.tianocore.frameworkwizard.common.ui.ITree;\r
5a24e806 67import org.tianocore.frameworkwizard.far.createui.CreateStepOne;\r
68import org.tianocore.frameworkwizard.far.deleteui.DeleteStepOne;\r
69import org.tianocore.frameworkwizard.far.installui.InstallStepOne;\r
70import org.tianocore.frameworkwizard.far.updateui.UpdateStepOne;\r
79cb6fdb 71import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
a13899c5 72import org.tianocore.frameworkwizard.module.ui.ModuleBootModes;\r
73import org.tianocore.frameworkwizard.module.ui.ModuleDataHubs;\r
74import org.tianocore.frameworkwizard.module.ui.ModuleDefinitions;\r
75import org.tianocore.frameworkwizard.module.ui.ModuleEvents;\r
76import org.tianocore.frameworkwizard.module.ui.ModuleExterns;\r
77import org.tianocore.frameworkwizard.module.ui.ModuleGuids;\r
78import org.tianocore.frameworkwizard.module.ui.ModuleHiiPackages;\r
79import org.tianocore.frameworkwizard.module.ui.ModuleHobs;\r
80import org.tianocore.frameworkwizard.module.ui.ModuleLibraryClassDefinitions;\r
81import org.tianocore.frameworkwizard.module.ui.ModulePCDs;\r
82import org.tianocore.frameworkwizard.module.ui.ModulePackageDependencies;\r
83import org.tianocore.frameworkwizard.module.ui.ModulePpis;\r
84import org.tianocore.frameworkwizard.module.ui.ModuleProtocols;\r
85import org.tianocore.frameworkwizard.module.ui.ModuleSourceFiles;\r
86import org.tianocore.frameworkwizard.module.ui.ModuleSystemTables;\r
87import org.tianocore.frameworkwizard.module.ui.ModuleVariables;\r
88import org.tianocore.frameworkwizard.module.ui.MsaHeader;\r
89import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
90import org.tianocore.frameworkwizard.packaging.ui.SpdGuidDecls;\r
91import org.tianocore.frameworkwizard.packaging.ui.SpdHeader;\r
92import org.tianocore.frameworkwizard.packaging.ui.SpdLibClassDecls;\r
93import org.tianocore.frameworkwizard.packaging.ui.SpdMsaFiles;\r
a13899c5 94import org.tianocore.frameworkwizard.packaging.ui.SpdPackageHeaders;\r
95import org.tianocore.frameworkwizard.packaging.ui.SpdPcdDefs;\r
96import org.tianocore.frameworkwizard.packaging.ui.SpdPpiDecls;\r
97import org.tianocore.frameworkwizard.packaging.ui.SpdProtocolDecls;\r
98import org.tianocore.frameworkwizard.platform.PlatformIdentification;\r
99import org.tianocore.frameworkwizard.platform.ui.FpdBuildOptions;\r
100import org.tianocore.frameworkwizard.platform.ui.FpdDynamicPcdBuildDefinitions;\r
101import org.tianocore.frameworkwizard.platform.ui.FpdFlash;\r
102import org.tianocore.frameworkwizard.platform.ui.FpdFrameworkModules;\r
103import org.tianocore.frameworkwizard.platform.ui.FpdHeader;\r
104import org.tianocore.frameworkwizard.platform.ui.FpdPlatformDefs;\r
105import org.tianocore.frameworkwizard.workspace.Workspace;\r
106import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
107import org.tianocore.frameworkwizard.workspace.ui.SwitchWorkspace;\r
108\r
109/**\r
43dc3851 110 The class is used to show main GUI of FrameworkWizard\r
111 It extends IFrame implements MouseListener, TreeSelectionListener, ComponentListener and MenuListener\r
a13899c5 112\r
113 **/\r
114public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSelectionListener, ComponentListener,\r
115 MenuListener {\r
116 ///\r
117 /// Define class Serial Version UID\r
118 ///\r
119 private static final long serialVersionUID = -7103240960573031772L;\r
92e29378 120\r
43dc3851 121 ///\r
122 /// Used to save information of all files\r
123 ///\r
a13899c5 124 private Vector<ModuleIdentification> vModuleList = new Vector<ModuleIdentification>();\r
125\r
126 private Vector<PackageIdentification> vPackageList = new Vector<PackageIdentification>();\r
127\r
128 private Vector<PlatformIdentification> vPlatformList = new Vector<PlatformIdentification>();\r
129\r
130 private OpeningModuleList openingModuleList = new OpeningModuleList();\r
131\r
132 private OpeningPackageList openingPackageList = new OpeningPackageList();\r
133\r
134 private OpeningPlatformList openingPlatformList = new OpeningPlatformList();\r
135\r
136 private int currentOpeningModuleIndex = -1;\r
137\r
138 private int currentOpeningPackageIndex = -1;\r
139\r
140 private int currentOpeningPlatformIndex = -1;\r
141\r
43dc3851 142 ///\r
143 /// Used to generate tree structure\r
144 ///\r
a13899c5 145 private IDefaultMutableTreeNode dmtnRoot = null;\r
146\r
147 private IDefaultMutableTreeNode dmtnModuleDescription = null;\r
148\r
149 private IDefaultMutableTreeNode dmtnPackageDescription = null;\r
150\r
151 private IDefaultMutableTreeNode dmtnPlatformDescription = null;\r
152\r
43dc3851 153 ///\r
154 /// Used for UI\r
155 ///\r
a13899c5 156 private JPanel jContentPane = null;\r
157\r
158 private JMenuBar jMenuBar = null;\r
159\r
160 private JMenu jMenuFile = null;\r
161\r
162 private JMenuItem jMenuItemFileNew = null;\r
163\r
164 private JMenuItem jMenuItemFileSaveAs = null;\r
165\r
166 private JMenuItem jMenuItemFileExit = null;\r
167\r
168 private JMenu jMenuEdit = null;\r
169\r
170 private JDesktopPane jDesktopPaneModule = null;\r
171\r
172 private JDesktopPane jDesktopPanePackage = null;\r
173\r
174 private JDesktopPane jDesktopPanePlatform = null;\r
175\r
176 private JTabbedPane jTabbedPaneTree = null;\r
177\r
178 private JTabbedPane jTabbedPaneEditor = null;\r
179\r
180 private IDesktopManager iDesktopManager = new IDesktopManager();\r
181\r
182 private JScrollPane jScrollPaneTree = null;\r
183\r
184 private ITree iTree = null;\r
185\r
186 private JMenu jMenuHelp = null;\r
187\r
188 private JMenuItem jMenuItemHelpAbout = null;\r
189\r
190 private JMenuItem jMenuItemEditDelete = null;\r
191\r
192 private WorkspaceTools wt = new WorkspaceTools();\r
193\r
194 private JMenuItem jMenuItemFileSave = null;\r
195\r
196 private JMenuItem jMenuItemFileClose = null;\r
197\r
198 private JMenu jMenuTools = null;\r
199\r
200 private JMenu jMenuWindow = null;\r
201\r
202 private JPanel jPanelOperation = null;\r
203\r
204 private JButton jButtonOk = null;\r
205\r
206 private JButton jButtonCancel = null;\r
207\r
208 private JMenuItem jMenuItemFileOpen = null;\r
209\r
210 private JMenuItem jMenuItemFileCloseAll = null;\r
211\r
212 private JMenuItem jMenuItemFileSaveAll = null;\r
213\r
214 private JMenuItem jMenuItemFilePageSetup = null;\r
215\r
216 private JMenuItem jMenuItemFilePrint = null;\r
217\r
218 private JMenuItem jMenuItemFileImport = null;\r
219\r
220 private JMenuItem jMenuItemFileProperties = null;\r
221\r
222 private JMenu jMenuFileRecentFiles = null;\r
223\r
224 private JSplitPane jSplitPane = null;\r
225\r
226 private JMenuItem jMenuItemEditUndo = null;\r
227\r
228 private JMenuItem jMenuItemEditRedo = null;\r
229\r
230 private JMenuItem jMenuItemEditCut = null;\r
231\r
232 private JMenuItem jMenuItemEditCopy = null;\r
233\r
234 private JMenuItem jMenuItemEditPaste = null;\r
235\r
236 private JMenuItem jMenuItemEditSelectAll = null;\r
237\r
238 private JMenuItem jMenuItemEditFind = null;\r
239\r
240 private JMenuItem jMenuItemEditFindNext = null;\r
241\r
242 private JMenu jMenuView = null;\r
243\r
244 private JMenu jMenuViewToolbars = null;\r
245\r
246 private JCheckBoxMenuItem jCheckBoxMenuItemViewToolbarsFile = null;\r
247\r
248 private JCheckBoxMenuItem jCheckBoxMenuItemViewToolbarsEdit = null;\r
249\r
250 private JCheckBoxMenuItem jCheckBoxMenuItemViewToolbarsWindow = null;\r
251\r
252 private JMenuItem jMenuItemViewStandard = null;\r
253\r
254 private JMenuItem jMenuItemViewAdvanced = null;\r
255\r
256 private JMenu jMenuProject = null;\r
257\r
258 private JMenuItem jMenuItemProjectAdmin = null;\r
259\r
260 private JMenuItem jMenuItemProjectChangeWorkspace = null;\r
261\r
262 private JMenu jMenuProjectBuildTargets = null;\r
263\r
264 private JCheckBoxMenuItem jCheckBoxMenuItemProjectBuildTargetsDebug = null;\r
265\r
266 private JCheckBoxMenuItem jCheckBoxMenuItemProjectBuildTargetsRelease = null;\r
267\r
268 private JMenuItem jMenuItemToolsToolChainConfiguration = null;\r
269\r
270 private JMenuItem jMenuItemToolsClone = null;\r
271\r
272 private JMenuItem jMenuItemToolsCodeScan = null;\r
273\r
274 private JMenuItem jMenuItemWindowDisplaySide = null;\r
275\r
276 private JMenuItem jMenuItemWindowDisplayTopBottom = null;\r
277\r
278 private JMenuItem jMenuItemViewXML = null;\r
279\r
280 private JMenuItem jMenuItemWindowTabView = null;\r
281\r
282 private JMenuItem jMenuItemWindowSource = null;\r
283\r
284 private JMenuItem jMenuItemWindowXML = null;\r
285\r
286 private JMenuItem jMenuItemWindowPreferences = null;\r
287\r
288 private JMenuItem jMenuItemHelpContents = null;\r
289\r
290 private JMenuItem jMenuItemHelpIndex = null;\r
291\r
292 private JMenuItem jMenuItemHelpSearch = null;\r
293\r
92e29378 294 private JMenuItem jMenuItemProjectInstallFar = null;\r
a13899c5 295\r
92e29378 296 private JMenuItem jMenuItemProjectUpdateFar = null;\r
a13899c5 297\r
92e29378 298 private JMenuItem jMenuItemProjectRemoveFar = null;\r
a13899c5 299\r
43dc3851 300 private JMenuItem jMenuItemProjectCreateFar = null;\r
92e29378 301\r
43dc3851 302 ///\r
303 /// A static definition for this class itself\r
304 ///\r
8f4f211c 305 private static FrameworkWizardUI fwui = null;\r
92e29378 306\r
43dc3851 307 /**\r
308 If the class hasn't an instnace, new one.\r
309 \r
310 @return FrameworkWizardUI The instance of this class\r
311 \r
312 **/\r
8f4f211c 313 public static FrameworkWizardUI getInstance() {\r
314 if (fwui == null) {\r
315 fwui = new FrameworkWizardUI();\r
316 }\r
317 return fwui;\r
318 }\r
a13899c5 319\r
320 /**\r
321 This method initializes jMenuBar \r
322 \r
323 @return javax.swing.JMenuBar Main menu bar for the entire GUI\r
324 \r
325 **/\r
326 private JMenuBar getjJMenuBar() {\r
327 if (jMenuBar == null) {\r
328 jMenuBar = new JMenuBar();\r
329 jMenuBar.setPreferredSize(new java.awt.Dimension(0, 18));\r
330 jMenuBar.add(getJMenuFile());\r
331 jMenuBar.add(getJMenuEdit());\r
332 jMenuBar.add(getJMenuView());\r
333 jMenuBar.add(getJMenuProject());\r
334 jMenuBar.add(getJMenuTools());\r
335 jMenuBar.add(getJMenuWindow());\r
336 jMenuBar.add(getJMenuHelp());\r
337 }\r
338 return jMenuBar;\r
339 }\r
340\r
341 /**\r
342 This method initializes jSplitPane\r
343 \r
344 @return javax.swing.JSplitPane\r
345 \r
346 **/\r
347 private JSplitPane getJSplitPane() {\r
348 if (jSplitPane == null) {\r
349 jSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, getJTabbedPaneTree(), getJTabbedPaneEditor());\r
350 jSplitPane.setBounds(new java.awt.Rectangle(0, 1, DataType.MAIN_FRAME_SPLIT_PANEL_PREFERRED_SIZE_WIDTH,\r
351 DataType.MAIN_FRAME_SPLIT_PANEL_PREFERRED_SIZE_HEIGHT));\r
352 jSplitPane.addComponentListener(this);\r
353 }\r
354 return jSplitPane;\r
355 }\r
356\r
357 /**\r
358 This method initializes jTabbedPaneEditor \r
359 \r
360 @return javax.swing.JTabbedPane \r
361 \r
43dc3851 362 **/\r
a13899c5 363 private JTabbedPane getJTabbedPaneEditor() {\r
364 if (jTabbedPaneEditor == null) {\r
365 jTabbedPaneEditor = new JTabbedPane();\r
366 jTabbedPaneEditor.setBounds(new java.awt.Rectangle(DataType.MAIN_FRAME_EDITOR_PANEL_LOCATION_X,\r
367 DataType.MAIN_FRAME_EDITOR_PANEL_LOCATION_Y,\r
368 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_WIDTH,\r
369 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_HEIGHT));\r
370 jTabbedPaneEditor\r
371 .setMinimumSize(new java.awt.Dimension(\r
372 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_WIDTH,\r
373 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_HEIGHT));\r
a13899c5 374 jTabbedPaneEditor.addTab("Module", null, getJDesktopPaneModule(), null);\r
375 jTabbedPaneEditor.addTab("Package", null, getJDesktopPanePackage(), null);\r
376 jTabbedPaneEditor.addTab("Platform", null, getJDesktopPanePlatform(), null);\r
377 }\r
378 return jTabbedPaneEditor;\r
379 }\r
380\r
381 /**\r
382 This method initializes jTabbedPaneTree\r
383 \r
384 @return javax.swing.JTabbedPane \r
385 \r
43dc3851 386 **/\r
a13899c5 387 private JTabbedPane getJTabbedPaneTree() {\r
388 if (jTabbedPaneTree == null) {\r
389 jTabbedPaneTree = new JTabbedPane();\r
390 jTabbedPaneTree\r
391 .setPreferredSize(new java.awt.Dimension(\r
392 DataType.MAIN_FRAME_TREE_PANEL_PREFERRED_SIZE_WIDTH,\r
393 DataType.MAIN_FRAME_TREE_PANEL_PREFERRED_SIZE_HEIGHT));\r
394 jTabbedPaneTree\r
395 .setMinimumSize(new java.awt.Dimension(DataType.MAIN_FRAME_TREE_PANEL_PREFERRED_SIZE_WIDTH,\r
396 DataType.MAIN_FRAME_TREE_PANEL_PREFERRED_SIZE_HEIGHT));\r
397 jTabbedPaneTree.addTab("Workspace Explorer", null, getJScrollPaneTree(), null);\r
398 }\r
399 return jTabbedPaneTree;\r
400 }\r
401\r
402 /**\r
403 This method initializes jMenuFile \r
404 \r
405 @return javax.swing.JMenu jMenuModule\r
406 \r
407 **/\r
408 private JMenu getJMenuFile() {\r
409 if (jMenuFile == null) {\r
43dc3851 410 //\r
411 // Set jMenuFile's attributes\r
412 //\r
a13899c5 413 jMenuFile = new JMenu();\r
414 jMenuFile.setText("File");\r
415 jMenuFile.setMnemonic('F');\r
43dc3851 416 jMenuFile.addMenuListener(this);\r
417\r
418 //\r
419 // Add sub menu items\r
420 //\r
a13899c5 421 jMenuFile.add(getJMenuItemFileNew());\r
422 jMenuFile.add(getJMenuItemFileOpen());\r
423 jMenuFile.add(getJMenuItemFileClose());\r
424 jMenuFile.add(getJMenuItemFileCloseAll());\r
425 jMenuFile.addSeparator();\r
43dc3851 426\r
a13899c5 427 jMenuFile.add(getJMenuFileRecentFiles());\r
a13899c5 428 jMenuFile.add(getJMenuItemFileSave());\r
429 jMenuFile.add(getJMenuItemFileSaveAs());\r
430 jMenuFile.add(getJMenuItemFileSaveAll());\r
431 jMenuFile.addSeparator();\r
43dc3851 432\r
a13899c5 433 jMenuFile.add(getJMenuItemFilePageSetup());\r
434 jMenuFile.add(getJMenuItemFilePrint());\r
a13899c5 435 jMenuFile.add(getJMenuItemFileImport());\r
a13899c5 436 jMenuFile.add(getJMenuItemFileProperties());\r
43dc3851 437\r
a13899c5 438 jMenuFile.add(getJMenuItemFileExit());\r
a13899c5 439 }\r
440 return jMenuFile;\r
441 }\r
442\r
443 /**\r
444 This method initializes jMenuItemFileSaveAs \r
445 \r
446 @return javax.swing.JMenuItem jMenuItemFileSaveAs\r
447 \r
448 **/\r
449 private JMenuItem getJMenuItemFileSaveAs() {\r
450 if (jMenuItemFileSaveAs == null) {\r
451 jMenuItemFileSaveAs = new JMenuItem();\r
452 jMenuItemFileSaveAs.setText("Save As...");\r
453 jMenuItemFileSaveAs.setMnemonic('a');\r
454 jMenuItemFileSaveAs.addActionListener(this);\r
455 jMenuItemFileSaveAs.setEnabled(false);\r
456 jMenuItemFileSaveAs.setVisible(false);\r
457 }\r
458 return jMenuItemFileSaveAs;\r
459 }\r
460\r
461 /**\r
462 This method initializes jMenuItemModuleExit \r
463 \r
464 @return javax.swing.JMenuItem jMenuItemModuleExit\r
465 \r
466 **/\r
467 private JMenuItem getJMenuItemFileExit() {\r
468 if (jMenuItemFileExit == null) {\r
469 jMenuItemFileExit = new JMenuItem();\r
470 jMenuItemFileExit.setText("Exit");\r
471 jMenuItemFileExit.setMnemonic('x');\r
472 jMenuItemFileExit.addActionListener(this);\r
473 }\r
474 return jMenuItemFileExit;\r
475 }\r
476\r
477 /**\r
478 This method initializes jMenuEdit \r
479 \r
480 @return javax.swing.JMenu jMenuEdit\r
481 \r
482 **/\r
483 private JMenu getJMenuEdit() {\r
484 if (jMenuEdit == null) {\r
43dc3851 485 //\r
486 // Set jMenuEdit's attributes\r
487 //\r
a13899c5 488 jMenuEdit = new JMenu();\r
489 jMenuEdit.setText("Edit");\r
490 jMenuEdit.setMnemonic('E');\r
43dc3851 491 jMenuEdit.setVisible(false);\r
492\r
493 //\r
494 // Add sub menu items\r
495 //\r
a13899c5 496 jMenuEdit.add(getJMenuItemEditUndo());\r
497 jMenuEdit.add(getJMenuItemEditRedo());\r
498 jMenuEdit.addSeparator();\r
43dc3851 499\r
a13899c5 500 jMenuEdit.add(getJMenuItemEditCut());\r
501 jMenuEdit.add(getJMenuItemEditCopy());\r
502 jMenuEdit.add(getJMenuItemEditPaste());\r
503 jMenuEdit.add(getJMenuItemEditDelete());\r
504 jMenuEdit.addSeparator();\r
43dc3851 505\r
a13899c5 506 jMenuEdit.add(getJMenuItemEditSelectAll());\r
507 jMenuEdit.add(getJMenuItemEditFind());\r
508 jMenuEdit.add(getJMenuItemEditFindNext());\r
509 jMenuEdit.addSeparator();\r
a13899c5 510 }\r
511 return jMenuEdit;\r
512 }\r
513\r
514 /**\r
515 This method initializes jDesktopPane \r
516 \r
517 @return javax.swing.JDesktopPane jDesktopPane\r
518 \r
519 **/\r
520 private JDesktopPane getJDesktopPaneModule() {\r
521 if (jDesktopPaneModule == null) {\r
522 jDesktopPaneModule = new JDesktopPane();\r
523 jDesktopPaneModule\r
524 .setBounds(new java.awt.Rectangle(DataType.MAIN_FRAME_EDITOR_PANEL_LOCATION_X,\r
525 DataType.MAIN_FRAME_EDITOR_PANEL_LOCATION_Y,\r
526 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_WIDTH,\r
527 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_HEIGHT));\r
528 jDesktopPaneModule\r
529 .setMinimumSize(new java.awt.Dimension(\r
530 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_WIDTH,\r
531 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_HEIGHT));\r
532 jDesktopPaneModule.setDesktopManager(iDesktopManager);\r
533 jDesktopPaneModule.addComponentListener(this);\r
534 }\r
535 return jDesktopPaneModule;\r
536 }\r
537\r
538 /**\r
539 This method initializes jDesktopPane \r
540 \r
541 @return javax.swing.JDesktopPane jDesktopPane\r
542 \r
543 **/\r
544 private JDesktopPane getJDesktopPanePackage() {\r
545 if (jDesktopPanePackage == null) {\r
546 jDesktopPanePackage = new JDesktopPane();\r
547 jDesktopPanePackage\r
548 .setBounds(new java.awt.Rectangle(DataType.MAIN_FRAME_EDITOR_PANEL_LOCATION_X,\r
549 DataType.MAIN_FRAME_EDITOR_PANEL_LOCATION_Y,\r
550 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_WIDTH,\r
551 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_HEIGHT));\r
552 jDesktopPanePackage\r
553 .setMinimumSize(new java.awt.Dimension(\r
554 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_WIDTH,\r
555 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_HEIGHT));\r
556 jDesktopPanePackage.setDesktopManager(iDesktopManager);\r
557 jDesktopPanePackage.addComponentListener(this);\r
558 }\r
559 return jDesktopPanePackage;\r
560 }\r
561\r
562 /**\r
563 This method initializes jDesktopPane \r
564 \r
565 @return javax.swing.JDesktopPane jDesktopPane\r
566 \r
567 **/\r
568 private JDesktopPane getJDesktopPanePlatform() {\r
569 if (jDesktopPanePlatform == null) {\r
570 jDesktopPanePlatform = new JDesktopPane();\r
571 jDesktopPanePlatform\r
572 .setBounds(new java.awt.Rectangle(\r
573 DataType.MAIN_FRAME_EDITOR_PANEL_LOCATION_X,\r
574 DataType.MAIN_FRAME_EDITOR_PANEL_LOCATION_Y,\r
575 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_WIDTH,\r
576 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_HEIGHT));\r
577 jDesktopPanePlatform\r
578 .setMinimumSize(new java.awt.Dimension(\r
579 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_WIDTH,\r
580 DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_HEIGHT));\r
581 jDesktopPanePlatform.setDesktopManager(iDesktopManager);\r
582 jDesktopPanePlatform.addComponentListener(this);\r
583 }\r
584 return jDesktopPanePlatform;\r
585 }\r
586\r
587 /**\r
588 This method initializes jScrollPaneTree \r
589 \r
590 @return javax.swing.JScrollPane jScrollPaneTree\r
591 \r
592 **/\r
593 private JScrollPane getJScrollPaneTree() {\r
594 if (jScrollPaneTree == null) {\r
595 jScrollPaneTree = new JScrollPane();\r
a13899c5 596 jScrollPaneTree\r
597 .setPreferredSize(new java.awt.Dimension(\r
598 DataType.MAIN_FRAME_TREE_PANEL_PREFERRED_SIZE_WIDTH,\r
599 DataType.MAIN_FRAME_TREE_PANEL_PREFERRED_SIZE_HEIGHT));\r
600 jScrollPaneTree\r
601 .setMinimumSize(new java.awt.Dimension(\r
602 DataType.MAIN_FRAME_TREE_PANEL_PREFERRED_SIZE_WIDTH / 2,\r
603 DataType.MAIN_FRAME_TREE_PANEL_PREFERRED_SIZE_HEIGHT));\r
604 jScrollPaneTree.setViewportView(getITree());\r
605 }\r
606 return jScrollPaneTree;\r
607 }\r
608\r
609 /**\r
610 This method initializes iTree \r
611 \r
612 @return org.tianocore.packaging.common.ui.ITree iTree\r
613 \r
614 **/\r
615 private ITree getITree() {\r
616 //\r
617 //Before open a real module, use an empty root node for the tree\r
618 //\r
619 makeEmptyTree();\r
620 return iTree;\r
621 }\r
622\r
623 /**\r
624 This method initializes jMenuHelp \r
625 \r
626 @return javax.swing.JMenu jMenuHelp\r
627 \r
628 **/\r
629 private JMenu getJMenuHelp() {\r
630 if (jMenuHelp == null) {\r
43dc3851 631 //\r
632 // Set jMenuHelp's attributes\r
633 //\r
a13899c5 634 jMenuHelp = new JMenu();\r
635 jMenuHelp.setText("Help");\r
43dc3851 636\r
637 //\r
638 // Add sub menu items\r
639 //\r
a13899c5 640 jMenuHelp.add(getJMenuItemHelpContents());\r
641 jMenuHelp.add(getJMenuItemHelpIndex());\r
642 jMenuHelp.add(getJMenuItemHelpSearch());\r
43dc3851 643\r
a13899c5 644 jMenuHelp.add(getJMenuItemHelpAbout());\r
645 }\r
646 return jMenuHelp;\r
647 }\r
648\r
649 /**\r
650 This method initializes jMenuItemHelpAbout \r
651 \r
652 @return javax.swing.JMenuItem jMenuItemHelpAbout\r
653 \r
654 **/\r
655 private JMenuItem getJMenuItemHelpAbout() {\r
656 if (jMenuItemHelpAbout == null) {\r
657 jMenuItemHelpAbout = new JMenuItem();\r
658 jMenuItemHelpAbout.setText("About...");\r
659 jMenuItemHelpAbout.addActionListener(this);\r
660 }\r
661 return jMenuItemHelpAbout;\r
662 }\r
663\r
664 /**\r
665 This method initializes jMenuItemEditDelete \r
666 \r
667 @return javax.swing.JMenuItem jMenuItemEditDelete\r
668 \r
669 **/\r
670 private JMenuItem getJMenuItemEditDelete() {\r
671 if (jMenuItemEditDelete == null) {\r
672 jMenuItemEditDelete = new JMenuItem();\r
673 jMenuItemEditDelete.setText("Delete");\r
674 jMenuItemEditDelete.setMnemonic('D');\r
675 jMenuItemEditDelete.addActionListener(this);\r
676 //\r
43dc3851 677 //Disabled first when no module is open\r
a13899c5 678 //\r
679 jMenuItemEditDelete.setEnabled(false);\r
680 }\r
681 return jMenuItemEditDelete;\r
682 }\r
683\r
a13899c5 684 /**\r
685 This method initializes jMenuFileNew \r
686 \r
687 @return javax.swing.JMenuItem jMenuFileNew\r
688 \r
689 **/\r
690 private JMenuItem getJMenuItemFileNew() {\r
691 if (jMenuItemFileNew == null) {\r
692 jMenuItemFileNew = new JMenuItem();\r
693 jMenuItemFileNew.setText("New...");\r
694 jMenuItemFileNew.setMnemonic('N');\r
695 jMenuItemFileNew.addActionListener(this);\r
696 }\r
697 return jMenuItemFileNew;\r
698 }\r
699\r
700 /**\r
701 This method initializes jMenuItemFileSave \r
702 \r
703 @return javax.swing.JMenuItem jMenuItemModuleSave\r
704 \r
705 **/\r
706 private JMenuItem getJMenuItemFileSave() {\r
707 if (jMenuItemFileSave == null) {\r
708 jMenuItemFileSave = new JMenuItem();\r
709 jMenuItemFileSave.setText("Save");\r
710 jMenuItemFileSave.setMnemonic('S');\r
711 jMenuItemFileSave.addActionListener(this);\r
712 jMenuItemFileSave.setEnabled(true);\r
713 }\r
714 return jMenuItemFileSave;\r
715 }\r
716\r
717 /**\r
718 This method initializes jMenuItemModuleClose \r
719 \r
720 @return javax.swing.JMenuItem jMenuItemModuleClose\r
721 \r
722 **/\r
723 private JMenuItem getJMenuItemFileClose() {\r
724 if (jMenuItemFileClose == null) {\r
725 jMenuItemFileClose = new JMenuItem();\r
726 jMenuItemFileClose.setText("Close");\r
727 jMenuItemFileClose.setMnemonic('C');\r
728 jMenuItemFileClose.setEnabled(true);\r
729 jMenuItemFileClose.addActionListener(this);\r
730 }\r
731 return jMenuItemFileClose;\r
732 }\r
733\r
734 /**\r
735 This method initializes jMenuTools\r
736 Reserved \r
737 \r
738 @return javax.swing.JMenu jMenuTools\r
739 \r
740 **/\r
741 private JMenu getJMenuTools() {\r
742 if (jMenuTools == null) {\r
43dc3851 743 //\r
744 // Set jMenuTools's attributes\r
745 //\r
a13899c5 746 jMenuTools = new JMenu();\r
747 jMenuTools.setText("Tools");\r
748 jMenuTools.setMnemonic('T');\r
43dc3851 749 jMenuTools.addMenuListener(this);\r
750\r
751 //\r
752 // Add sub menu items\r
753 //\r
a13899c5 754 jMenuTools.add(getJMenuItemToolsToolChainConfiguration());\r
79cb6fdb 755 jMenuTools.addSeparator();\r
43dc3851 756\r
a13899c5 757 jMenuTools.add(getJMenuItemToolsClone());\r
a13899c5 758 jMenuTools.add(getJMenuItemToolsCodeScan());\r
a13899c5 759 }\r
760 return jMenuTools;\r
761 }\r
762\r
763 /**\r
764 This method initializes jMenuWindow \r
765 Reserved\r
766 \r
767 @return javax.swing.JMenu jMenuWindow\r
768 \r
769 **/\r
770 private JMenu getJMenuWindow() {\r
771 if (jMenuWindow == null) {\r
43dc3851 772 //\r
773 // Set jMenuWindow's attribute\r
774 //\r
a13899c5 775 jMenuWindow = new JMenu();\r
776 jMenuWindow.setText("Window");\r
777 jMenuWindow.setMnemonic('W');\r
43dc3851 778 jMenuWindow.setVisible(false);\r
779\r
780 //\r
781 // Add sub menu items\r
782 //\r
a13899c5 783 jMenuWindow.add(getJMenuItemWindowDisplaySide());\r
784 jMenuWindow.add(getJMenuItemWindowDisplayTopBottom());\r
785 jMenuWindow.addSeparator();\r
43dc3851 786\r
a13899c5 787 jMenuWindow.add(getJMenuItemWindowTabView());\r
788 jMenuWindow.addSeparator();\r
43dc3851 789\r
a13899c5 790 jMenuWindow.add(getJMenuItemWindowSource());\r
791 jMenuWindow.add(getJMenuItemWindowXML());\r
792 jMenuWindow.addSeparator();\r
43dc3851 793\r
a13899c5 794 jMenuWindow.add(getJMenuItemWindowPreferences());\r
a13899c5 795 }\r
796 return jMenuWindow;\r
797 }\r
798\r
799 /**\r
43dc3851 800 This method initializes jPanelOperation\r
801 Reserved\r
a13899c5 802 \r
803 @return javax.swing.JPanel jPanelOperation\r
804 \r
805 **/\r
806 private JPanel getJPanelOperation() {\r
807 if (jPanelOperation == null) {\r
808 jPanelOperation = new JPanel();\r
809 jPanelOperation.setLayout(null);\r
810 jPanelOperation.setBounds(new java.awt.Rectangle(295, 520, 500, 25));\r
811 jPanelOperation.add(getJButtonOk(), null);\r
812 jPanelOperation.add(getJButtonCancel(), null);\r
813 jPanelOperation.setVisible(false);\r
814 }\r
815 return jPanelOperation;\r
816 }\r
817\r
818 /**\r
43dc3851 819 This method initializes jButtonOk\r
820 Reserved\r
a13899c5 821 \r
822 @return javax.swing.JButton jButtonOk\r
823 \r
824 **/\r
825 private JButton getJButtonOk() {\r
826 if (jButtonOk == null) {\r
827 jButtonOk = new JButton();\r
828 jButtonOk.setBounds(new java.awt.Rectangle(395, 2, 90, 20));\r
829 jButtonOk.setText("Ok");\r
830 jButtonOk.setEnabled(false);\r
831 jButtonOk.addActionListener(this);\r
832 }\r
833 return jButtonOk;\r
834 }\r
835\r
836 /**\r
43dc3851 837 This method initializes jButtonCancel\r
838 Reserved\r
a13899c5 839 \r
840 @return javax.swing.JButton jButtonCancel\r
841 \r
842 **/\r
843 private JButton getJButtonCancel() {\r
844 if (jButtonCancel == null) {\r
845 jButtonCancel = new JButton();\r
846 jButtonCancel.setBounds(new java.awt.Rectangle(395, 2, 90, 20));\r
847 jButtonCancel.setText("Cancel");\r
848 jButtonCancel.setEnabled(false);\r
849 jButtonCancel.addActionListener(this);\r
850 jButtonCancel.setVisible(false);\r
851 }\r
852 return jButtonCancel;\r
853 }\r
854\r
855 /**\r
856 This method initializes jMenuItemFileOpen \r
857 \r
858 @return javax.swing.JMenuItem jMenuItemFileOpen\r
43dc3851 859 \r
860 **/\r
a13899c5 861 private JMenuItem getJMenuItemFileOpen() {\r
862 if (jMenuItemFileOpen == null) {\r
863 jMenuItemFileOpen = new JMenuItem();\r
864 jMenuItemFileOpen.setText("Open...");\r
865 jMenuItemFileOpen.setMnemonic('O');\r
866 jMenuItemFileOpen.addActionListener(this);\r
867 }\r
868 return jMenuItemFileOpen;\r
869 }\r
870\r
871 /**\r
872 This method initializes jMenuItemFileCloseAll \r
873 \r
874 @return javax.swing.JMenuItem jMenuItemFileOpen\r
43dc3851 875 \r
876 **/\r
a13899c5 877 private JMenuItem getJMenuItemFileCloseAll() {\r
878 if (jMenuItemFileCloseAll == null) {\r
879 jMenuItemFileCloseAll = new JMenuItem();\r
880 jMenuItemFileCloseAll.setText("Close All");\r
881 jMenuItemFileCloseAll.setEnabled(true);\r
882 jMenuItemFileCloseAll.addActionListener(this);\r
883 }\r
884 return jMenuItemFileCloseAll;\r
885 }\r
886\r
887 /**\r
888 This method initializes jMenuItemFileSaveAll \r
889 \r
890 @return javax.swing.JMenuItem jMenuItemFileSaveAll\r
43dc3851 891 \r
892 **/\r
a13899c5 893 private JMenuItem getJMenuItemFileSaveAll() {\r
894 if (jMenuItemFileSaveAll == null) {\r
895 jMenuItemFileSaveAll = new JMenuItem();\r
896 jMenuItemFileSaveAll.setText("Save All");\r
897 jMenuItemFileSaveAll.setMnemonic('v');\r
898 jMenuItemFileSaveAll.setEnabled(true);\r
899 jMenuItemFileSaveAll.addActionListener(this);\r
900 }\r
901 return jMenuItemFileSaveAll;\r
902 }\r
903\r
904 /**\r
905 This method initializes jMenuItemFilePageSetup \r
906 \r
907 @return javax.swing.JMenuItem \r
43dc3851 908 \r
909 **/\r
a13899c5 910 private JMenuItem getJMenuItemFilePageSetup() {\r
911 if (jMenuItemFilePageSetup == null) {\r
912 jMenuItemFilePageSetup = new JMenuItem();\r
913 jMenuItemFilePageSetup.setText("Page Setup");\r
914 jMenuItemFilePageSetup.setMnemonic('u');\r
915 jMenuItemFilePageSetup.setEnabled(false);\r
916 jMenuItemFilePageSetup.addActionListener(this);\r
917 jMenuItemFilePageSetup.setVisible(false);\r
918 }\r
919 return jMenuItemFilePageSetup;\r
920 }\r
921\r
922 /**\r
923 This method initializes jMenuItemFilePrint \r
924 \r
925 @return javax.swing.JMenuItem \r
43dc3851 926 \r
927 **/\r
a13899c5 928 private JMenuItem getJMenuItemFilePrint() {\r
929 if (jMenuItemFilePrint == null) {\r
930 jMenuItemFilePrint = new JMenuItem();\r
931 jMenuItemFilePrint.setText("Print");\r
932 jMenuItemFilePrint.setMnemonic('P');\r
933 jMenuItemFilePrint.setEnabled(false);\r
934 jMenuItemFilePrint.addActionListener(this);\r
935 jMenuItemFilePrint.setVisible(false);\r
936 }\r
937 return jMenuItemFilePrint;\r
938 }\r
939\r
940 /**\r
941 This method initializes jMenuItemFileImport \r
942 \r
943 @return javax.swing.JMenuItem \r
43dc3851 944 \r
945 **/\r
a13899c5 946 private JMenuItem getJMenuItemFileImport() {\r
947 if (jMenuItemFileImport == null) {\r
948 jMenuItemFileImport = new JMenuItem();\r
949 jMenuItemFileImport.setText("Import");\r
950 jMenuItemFileImport.setMnemonic('I');\r
951 jMenuItemFileImport.setEnabled(false);\r
952 jMenuItemFileImport.addActionListener(this);\r
953 jMenuItemFileImport.setVisible(false);\r
954 }\r
955 return jMenuItemFileImport;\r
956 }\r
957\r
958 /**\r
43dc3851 959 This method initializes jMenuItemFileProperties \r
960 \r
961 @return javax.swing.JMenuItem \r
962 \r
963 **/\r
a13899c5 964 private JMenuItem getJMenuItemFileProperties() {\r
965 if (jMenuItemFileProperties == null) {\r
966 jMenuItemFileProperties = new JMenuItem();\r
967 jMenuItemFileProperties.setText("Properties");\r
968 jMenuItemFileProperties.setMnemonic('t');\r
969 jMenuItemFileProperties.setEnabled(false);\r
970 jMenuItemFileProperties.addActionListener(this);\r
971 jMenuItemFileProperties.setVisible(false);\r
972 }\r
973 return jMenuItemFileProperties;\r
974 }\r
975\r
976 /**\r
43dc3851 977 This method initializes jMenuFileRecentFiles \r
978 \r
979 @return javax.swing.JMenu \r
980 \r
981 **/\r
a13899c5 982 private JMenu getJMenuFileRecentFiles() {\r
983 if (jMenuFileRecentFiles == null) {\r
984 jMenuFileRecentFiles = new JMenu();\r
985 jMenuFileRecentFiles.setText("Recent Files");\r
986 jMenuFileRecentFiles.setMnemonic('F');\r
987 jMenuFileRecentFiles.setEnabled(false);\r
988 jMenuFileRecentFiles.addActionListener(this);\r
989 jMenuFileRecentFiles.setVisible(false);\r
990 }\r
991 return jMenuFileRecentFiles;\r
992 }\r
993\r
994 /**\r
995 This method initializes jMenuItemEditUndo \r
996 \r
43dc3851 997 @return javax.swing.JMenuItem\r
998 \r
999 **/\r
a13899c5 1000 private JMenuItem getJMenuItemEditUndo() {\r
1001 if (jMenuItemEditUndo == null) {\r
1002 jMenuItemEditUndo = new JMenuItem();\r
1003 jMenuItemEditUndo.setText("Undo");\r
1004 jMenuItemEditUndo.setMnemonic('U');\r
1005 jMenuItemEditUndo.setEnabled(false);\r
1006 jMenuItemEditUndo.addActionListener(this);\r
1007 }\r
1008 return jMenuItemEditUndo;\r
1009 }\r
1010\r
1011 /**\r
1012 This method initializes jMenuItemEditRedo \r
1013 \r
1014 @return javax.swing.JMenuItem \r
43dc3851 1015 \r
1016 **/\r
a13899c5 1017 private JMenuItem getJMenuItemEditRedo() {\r
1018 if (jMenuItemEditRedo == null) {\r
1019 jMenuItemEditRedo = new JMenuItem();\r
1020 jMenuItemEditRedo.setText("Redo");\r
1021 jMenuItemEditRedo.setMnemonic('R');\r
1022 jMenuItemEditRedo.setEnabled(false);\r
1023 jMenuItemEditRedo.addActionListener(this);\r
1024 }\r
1025 return jMenuItemEditRedo;\r
1026 }\r
1027\r
1028 /**\r
1029 This method initializes jMenuItemEditCut \r
1030 \r
1031 @return javax.swing.JMenuItem \r
43dc3851 1032 \r
1033 **/\r
a13899c5 1034 private JMenuItem getJMenuItemEditCut() {\r
1035 if (jMenuItemEditCut == null) {\r
1036 jMenuItemEditCut = new JMenuItem();\r
1037 jMenuItemEditCut.setText("Cut");\r
1038 jMenuItemEditCut.setMnemonic('t');\r
1039 jMenuItemEditCut.setEnabled(false);\r
1040 jMenuItemEditCut.addActionListener(this);\r
1041 }\r
1042 return jMenuItemEditCut;\r
1043 }\r
1044\r
1045 /**\r
1046 This method initializes jMenuItemEditCopy \r
1047 \r
1048 @return javax.swing.JMenuItem \r
43dc3851 1049 \r
1050 **/\r
a13899c5 1051 private JMenuItem getJMenuItemEditCopy() {\r
1052 if (jMenuItemEditCopy == null) {\r
1053 jMenuItemEditCopy = new JMenuItem();\r
1054 jMenuItemEditCopy.setText("Copy");\r
1055 jMenuItemEditCopy.setMnemonic('C');\r
1056 jMenuItemEditCopy.setEnabled(false);\r
1057 jMenuItemEditCopy.addActionListener(this);\r
1058 }\r
1059 return jMenuItemEditCopy;\r
1060 }\r
1061\r
1062 /**\r
1063 This method initializes jMenuItemEditPaste \r
1064 \r
1065 return javax.swing.JMenuItem \r
43dc3851 1066 \r
1067 **/\r
a13899c5 1068 private JMenuItem getJMenuItemEditPaste() {\r
1069 if (jMenuItemEditPaste == null) {\r
1070 jMenuItemEditPaste = new JMenuItem();\r
1071 jMenuItemEditPaste.setText("Paste");\r
1072 jMenuItemEditPaste.setMnemonic('P');\r
1073 jMenuItemEditPaste.setEnabled(false);\r
1074 jMenuItemEditPaste.addActionListener(this);\r
1075 }\r
1076 return jMenuItemEditPaste;\r
1077 }\r
1078\r
1079 /**\r
1080 This method initializes jMenuItem \r
1081 \r
1082 @return javax.swing.JMenuItem \r
43dc3851 1083 \r
1084 **/\r
a13899c5 1085 private JMenuItem getJMenuItemEditSelectAll() {\r
1086 if (jMenuItemEditSelectAll == null) {\r
1087 jMenuItemEditSelectAll = new JMenuItem();\r
1088 jMenuItemEditSelectAll.setText("Select All");\r
1089 jMenuItemEditSelectAll.setMnemonic('A');\r
1090 jMenuItemEditSelectAll.setEnabled(false);\r
1091 jMenuItemEditSelectAll.addActionListener(this);\r
1092 }\r
1093 return jMenuItemEditSelectAll;\r
1094 }\r
1095\r
1096 /**\r
1097 This method initializes jMenuItemEditFind \r
1098 \r
1099 @return javax.swing.JMenuItem \r
43dc3851 1100 \r
1101 **/\r
a13899c5 1102 private JMenuItem getJMenuItemEditFind() {\r
1103 if (jMenuItemEditFind == null) {\r
1104 jMenuItemEditFind = new JMenuItem();\r
1105 jMenuItemEditFind.setText("Find");\r
1106 jMenuItemEditFind.setMnemonic('F');\r
1107 jMenuItemEditFind.setEnabled(false);\r
1108 jMenuItemEditFind.addActionListener(this);\r
1109 }\r
1110 return jMenuItemEditFind;\r
1111 }\r
1112\r
1113 /**\r
1114 This method initializes jMenuItemEditFindNext \r
1115 \r
1116 @return javax.swing.JMenuItem \r
1117 \r
43dc3851 1118 **/\r
a13899c5 1119 private JMenuItem getJMenuItemEditFindNext() {\r
1120 if (jMenuItemEditFindNext == null) {\r
1121 jMenuItemEditFindNext = new JMenuItem();\r
1122 jMenuItemEditFindNext.setText("Find Next");\r
1123 jMenuItemEditFindNext.setMnemonic('n');\r
1124 jMenuItemEditFindNext.setEnabled(false);\r
1125 jMenuItemEditFindNext.addActionListener(this);\r
1126 }\r
1127 return jMenuItemEditFindNext;\r
1128 }\r
1129\r
1130 /**\r
1131 This method initializes jMenuView \r
1132 \r
1133 @return javax.swing.JMenu \r
1134 \r
43dc3851 1135 **/\r
a13899c5 1136 private JMenu getJMenuView() {\r
1137 if (jMenuView == null) {\r
43dc3851 1138 //\r
1139 // Set jMenuView's attributes\r
1140 //\r
a13899c5 1141 jMenuView = new JMenu();\r
1142 jMenuView.setText("View");\r
1143 jMenuView.setMnemonic('V');\r
43dc3851 1144 jMenuView.setVisible(false);\r
1145\r
1146 //\r
1147 // Add sub menu items\r
1148 //\r
a13899c5 1149 jMenuView.add(getJMenuViewToolbars());\r
1150 jMenuView.add(getJMenuItemViewAdvanced());\r
1151 jMenuView.add(getJMenuItemViewStandard());\r
1152 jMenuView.add(getJMenuItemViewXML());\r
a13899c5 1153 }\r
1154 return jMenuView;\r
1155 }\r
1156\r
1157 /**\r
1158 This method initializes jMenuViewToolbars \r
1159 \r
1160 @return javax.swing.JMenu \r
1161 \r
43dc3851 1162 **/\r
a13899c5 1163 private JMenu getJMenuViewToolbars() {\r
1164 if (jMenuViewToolbars == null) {\r
1165 jMenuViewToolbars = new JMenu();\r
1166 jMenuViewToolbars.setText("Toolbars");\r
1167 jMenuViewToolbars.setMnemonic('T');\r
43dc3851 1168\r
a13899c5 1169 jMenuViewToolbars.add(getJCheckBoxMenuItemViewToolbarsFile());\r
1170 jMenuViewToolbars.add(getJCheckBoxMenuItemViewToolbarsEdit());\r
1171 jMenuViewToolbars.add(getJCheckBoxMenuItemViewToolbarsWindow());\r
1172 }\r
1173 return jMenuViewToolbars;\r
1174 }\r
1175\r
1176 /**\r
1177 This method initializes jCheckBoxMenuItemViewToolbarsFile \r
1178 \r
1179 @return javax.swing.JCheckBoxMenuItem \r
1180 \r
43dc3851 1181 **/\r
a13899c5 1182 private JCheckBoxMenuItem getJCheckBoxMenuItemViewToolbarsFile() {\r
1183 if (jCheckBoxMenuItemViewToolbarsFile == null) {\r
1184 jCheckBoxMenuItemViewToolbarsFile = new JCheckBoxMenuItem();\r
1185 jCheckBoxMenuItemViewToolbarsFile.setText("File");\r
1186 jCheckBoxMenuItemViewToolbarsFile.setEnabled(false);\r
1187 jCheckBoxMenuItemViewToolbarsFile.addActionListener(this);\r
1188 }\r
1189 return jCheckBoxMenuItemViewToolbarsFile;\r
1190 }\r
1191\r
1192 /**\r
1193 This method initializes jCheckBoxMenuItemViewToolbarsEdit \r
1194 \r
1195 @return javax.swing.JCheckBoxMenuItem \r
1196 \r
43dc3851 1197 **/\r
a13899c5 1198 private JCheckBoxMenuItem getJCheckBoxMenuItemViewToolbarsEdit() {\r
1199 if (jCheckBoxMenuItemViewToolbarsEdit == null) {\r
1200 jCheckBoxMenuItemViewToolbarsEdit = new JCheckBoxMenuItem();\r
1201 jCheckBoxMenuItemViewToolbarsEdit.setText("Edit");\r
1202 jCheckBoxMenuItemViewToolbarsEdit.setEnabled(false);\r
1203 jCheckBoxMenuItemViewToolbarsEdit.addActionListener(this);\r
1204 }\r
1205 return jCheckBoxMenuItemViewToolbarsEdit;\r
1206 }\r
1207\r
1208 /**\r
1209 This method initializes jCheckBoxMenuItemViewToolbarsWindow \r
1210 \r
1211 @return javax.swing.JCheckBoxMenuItem \r
1212 \r
43dc3851 1213 **/\r
a13899c5 1214 private JCheckBoxMenuItem getJCheckBoxMenuItemViewToolbarsWindow() {\r
1215 if (jCheckBoxMenuItemViewToolbarsWindow == null) {\r
1216 jCheckBoxMenuItemViewToolbarsWindow = new JCheckBoxMenuItem();\r
1217 jCheckBoxMenuItemViewToolbarsWindow.setText("Window");\r
1218 jCheckBoxMenuItemViewToolbarsWindow.setEnabled(false);\r
1219 jCheckBoxMenuItemViewToolbarsWindow.addActionListener(this);\r
1220 }\r
1221 return jCheckBoxMenuItemViewToolbarsWindow;\r
1222 }\r
1223\r
1224 /**\r
1225 This method initializes jMenuItemStandard \r
1226 \r
1227 @return javax.swing.JMenuItem \r
1228 \r
43dc3851 1229 **/\r
a13899c5 1230 private JMenuItem getJMenuItemViewStandard() {\r
1231 if (jMenuItemViewStandard == null) {\r
1232 jMenuItemViewStandard = new JMenuItem();\r
1233 jMenuItemViewStandard.setText("Standard");\r
1234 jMenuItemViewStandard.setMnemonic('S');\r
1235 jMenuItemViewStandard.setEnabled(false);\r
1236 jMenuItemViewStandard.addActionListener(this);\r
1237 }\r
1238 return jMenuItemViewStandard;\r
1239 }\r
1240\r
1241 /**\r
1242 This method initializes jMenuItemAdvanced \r
1243 \r
1244 @return javax.swing.JMenuItem \r
1245 \r
43dc3851 1246 **/\r
a13899c5 1247 private JMenuItem getJMenuItemViewAdvanced() {\r
1248 if (jMenuItemViewAdvanced == null) {\r
1249 jMenuItemViewAdvanced = new JMenuItem();\r
1250 jMenuItemViewAdvanced.setText("Advanced");\r
1251 jMenuItemViewAdvanced.setMnemonic('A');\r
1252 jMenuItemViewAdvanced.setEnabled(false);\r
1253 jMenuItemViewAdvanced.addActionListener(this);\r
1254 }\r
1255 return jMenuItemViewAdvanced;\r
1256 }\r
1257\r
1258 /**\r
1259 This method initializes jMenuProject \r
1260 \r
1261 @return javax.swing.JMenu \r
1262 \r
43dc3851 1263 **/\r
a13899c5 1264 private JMenu getJMenuProject() {\r
1265 if (jMenuProject == null) {\r
43dc3851 1266 //\r
1267 // Set jMenuProject's attributes\r
1268 //\r
a13899c5 1269 jMenuProject = new JMenu();\r
1270 jMenuProject.setText("Project");\r
1271 jMenuProject.setMnemonic('P');\r
43dc3851 1272\r
1273 //\r
1274 // Add sub menu items\r
1275 //\r
a13899c5 1276 jMenuProject.add(getJMenuItemProjectAdmin());\r
43dc3851 1277\r
a13899c5 1278 jMenuProject.add(getJMenuItemProjectChangeWorkspace());\r
1279 jMenuProject.addSeparator();\r
43dc3851 1280\r
92e29378 1281 jMenuProject.add(getJMenuItemProjectCreateFar());\r
1282 jMenuProject.add(getJMenuItemProjectInstallFar());\r
1283 jMenuProject.add(getJMenuItemProjectUpdateFar());\r
1284 jMenuProject.add(getJMenuItemProjectRemoveFar());\r
43dc3851 1285\r
a13899c5 1286 jMenuProject.add(getJMenuProjectBuildTargets());\r
1287 }\r
1288 return jMenuProject;\r
1289 }\r
1290\r
1291 /**\r
1292 This method initializes jMenuItemProjectAdmin \r
1293 \r
1294 @return javax.swing.JMenuItem \r
1295 \r
43dc3851 1296 **/\r
a13899c5 1297 private JMenuItem getJMenuItemProjectAdmin() {\r
1298 if (jMenuItemProjectAdmin == null) {\r
1299 jMenuItemProjectAdmin = new JMenuItem();\r
1300 jMenuItemProjectAdmin.setText("Admin...");\r
1301 jMenuItemProjectAdmin.setMnemonic('A');\r
1302 jMenuItemProjectAdmin.setEnabled(false);\r
1303 jMenuItemProjectAdmin.addActionListener(this);\r
1304 jMenuItemProjectAdmin.setVisible(false);\r
1305 }\r
1306 return jMenuItemProjectAdmin;\r
1307 }\r
1308\r
1309 /**\r
1310 This method initializes jMenuItemProjectChangeWorkspace \r
1311 \r
1312 @return javax.swing.JMenuItem \r
1313 \r
43dc3851 1314 **/\r
a13899c5 1315 private JMenuItem getJMenuItemProjectChangeWorkspace() {\r
1316 if (jMenuItemProjectChangeWorkspace == null) {\r
1317 jMenuItemProjectChangeWorkspace = new JMenuItem();\r
1318 jMenuItemProjectChangeWorkspace.setText("Change WORKSPACE...");\r
1319 jMenuItemProjectChangeWorkspace.setMnemonic('W');\r
1320 jMenuItemProjectChangeWorkspace.setEnabled(true);\r
1321 jMenuItemProjectChangeWorkspace.addActionListener(this);\r
1322 }\r
1323 return jMenuItemProjectChangeWorkspace;\r
1324 }\r
1325\r
1326 /**\r
1327 This method initializes jMenuProjectBuildTargets \r
1328 \r
1329 @return javax.swing.JMenu \r
1330 \r
43dc3851 1331 **/\r
a13899c5 1332 private JMenu getJMenuProjectBuildTargets() {\r
1333 if (jMenuProjectBuildTargets == null) {\r
1334 jMenuProjectBuildTargets = new JMenu();\r
1335 jMenuProjectBuildTargets.setText("Build Targets");\r
1336 jMenuProjectBuildTargets.setMnemonic('T');\r
43dc3851 1337 jMenuProjectBuildTargets.setVisible(false);\r
1338\r
a13899c5 1339 jMenuProjectBuildTargets.add(getJCheckBoxMenuItemProjectBuildTargetsDebug());\r
1340 jMenuProjectBuildTargets.add(getJCheckBoxMenuItemProjectBuildTargetsRelease());\r
a13899c5 1341 }\r
1342 return jMenuProjectBuildTargets;\r
1343 }\r
1344\r
1345 /**\r
1346 This method initializes jCheckBoxMenuItemProjectBuildTargetsDebug \r
1347 \r
1348 @return javax.swing.JCheckBoxMenuItem \r
1349 \r
43dc3851 1350 **/\r
a13899c5 1351 private JCheckBoxMenuItem getJCheckBoxMenuItemProjectBuildTargetsDebug() {\r
1352 if (jCheckBoxMenuItemProjectBuildTargetsDebug == null) {\r
1353 jCheckBoxMenuItemProjectBuildTargetsDebug = new JCheckBoxMenuItem();\r
1354 jCheckBoxMenuItemProjectBuildTargetsDebug.setText("Debug");\r
1355 jCheckBoxMenuItemProjectBuildTargetsDebug.setEnabled(false);\r
1356 }\r
1357 return jCheckBoxMenuItemProjectBuildTargetsDebug;\r
1358 }\r
1359\r
1360 /**\r
1361 This method initializes jCheckBoxMenuItemProjectBuildTargetsRelease \r
1362 \r
1363 @return javax.swing.JCheckBoxMenuItem \r
1364 \r
43dc3851 1365 **/\r
a13899c5 1366 private JCheckBoxMenuItem getJCheckBoxMenuItemProjectBuildTargetsRelease() {\r
1367 if (jCheckBoxMenuItemProjectBuildTargetsRelease == null) {\r
1368 jCheckBoxMenuItemProjectBuildTargetsRelease = new JCheckBoxMenuItem();\r
1369 jCheckBoxMenuItemProjectBuildTargetsRelease.setText("Release");\r
1370 jCheckBoxMenuItemProjectBuildTargetsRelease.setEnabled(false);\r
1371 }\r
1372 return jCheckBoxMenuItemProjectBuildTargetsRelease;\r
1373 }\r
1374\r
1375 /**\r
1376 This method initializes jMenuItemToolsToolChainConfiguration \r
1377 \r
1378 @return javax.swing.JMenuItem \r
1379 \r
43dc3851 1380 **/\r
a13899c5 1381 private JMenuItem getJMenuItemToolsToolChainConfiguration() {\r
1382 if (jMenuItemToolsToolChainConfiguration == null) {\r
1383 jMenuItemToolsToolChainConfiguration = new JMenuItem();\r
1384 jMenuItemToolsToolChainConfiguration.setText("Tool Chain Configuration...");\r
1385 jMenuItemToolsToolChainConfiguration.setMnemonic('C');\r
1386 jMenuItemToolsToolChainConfiguration.addActionListener(this);\r
a13899c5 1387 }\r
1388 return jMenuItemToolsToolChainConfiguration;\r
1389 }\r
1390\r
1391 /**\r
1392 This method initializes jMenuItemToolsClone \r
1393 \r
1394 @return javax.swing.JMenuItem \r
1395 \r
43dc3851 1396 **/\r
a13899c5 1397 private JMenuItem getJMenuItemToolsClone() {\r
1398 if (jMenuItemToolsClone == null) {\r
1399 jMenuItemToolsClone = new JMenuItem();\r
1400 jMenuItemToolsClone.setText("Clone...");\r
1401 jMenuItemToolsClone.setMnemonic('l');\r
1402 jMenuItemToolsClone.setEnabled(true);\r
1403 jMenuItemToolsClone.addActionListener(this);\r
1404 }\r
1405 return jMenuItemToolsClone;\r
1406 }\r
1407\r
1408 /**\r
1409 This method initializes jMenuItemToolsCodeScan \r
1410 \r
1411 @return javax.swing.JMenuItem \r
1412 \r
43dc3851 1413 **/\r
a13899c5 1414 private JMenuItem getJMenuItemToolsCodeScan() {\r
1415 if (jMenuItemToolsCodeScan == null) {\r
1416 jMenuItemToolsCodeScan = new JMenuItem();\r
1417 jMenuItemToolsCodeScan.setText("Code Scan...");\r
1418 jMenuItemToolsCodeScan.setMnemonic('S');\r
1419 jMenuItemToolsCodeScan.setEnabled(false);\r
1420 jMenuItemToolsCodeScan.addActionListener(this);\r
1421 jMenuItemToolsCodeScan.setVisible(false);\r
1422 }\r
1423 return jMenuItemToolsCodeScan;\r
1424 }\r
1425\r
1426 /**\r
1427 This method initializes jMenuItemWindowSplitVertical \r
1428 \r
1429 @return javax.swing.JMenuItem \r
1430 \r
43dc3851 1431 **/\r
a13899c5 1432 private JMenuItem getJMenuItemWindowDisplaySide() {\r
1433 if (jMenuItemWindowDisplaySide == null) {\r
1434 jMenuItemWindowDisplaySide = new JMenuItem();\r
1435 jMenuItemWindowDisplaySide.setText("Display Side by Side");\r
1436 jMenuItemWindowDisplaySide.setMnemonic('S');\r
1437 jMenuItemWindowDisplaySide.setEnabled(false);\r
1438 jMenuItemWindowDisplaySide.addActionListener(this);\r
1439 }\r
1440 return jMenuItemWindowDisplaySide;\r
1441 }\r
1442\r
1443 /**\r
1444 This method initializes jMenuItemWindowSplitHorizontal \r
1445 \r
1446 @return javax.swing.JMenuItem \r
1447 \r
43dc3851 1448 **/\r
a13899c5 1449 private JMenuItem getJMenuItemWindowDisplayTopBottom() {\r
1450 if (jMenuItemWindowDisplayTopBottom == null) {\r
1451 jMenuItemWindowDisplayTopBottom = new JMenuItem();\r
1452 jMenuItemWindowDisplayTopBottom.setText("Display Top and Bottom");\r
1453 jMenuItemWindowDisplayTopBottom.setMnemonic('B');\r
1454 jMenuItemWindowDisplayTopBottom.setEnabled(false);\r
1455 jMenuItemWindowDisplayTopBottom.addActionListener(this);\r
1456 }\r
1457 return jMenuItemWindowDisplayTopBottom;\r
1458 }\r
1459\r
1460 /**\r
1461 This method initializes jMenuItemViewXML \r
1462 \r
1463 @return javax.swing.JMenuItem \r
1464 \r
43dc3851 1465 **/\r
a13899c5 1466 private JMenuItem getJMenuItemViewXML() {\r
1467 if (jMenuItemViewXML == null) {\r
1468 jMenuItemViewXML = new JMenuItem();\r
1469 jMenuItemViewXML.setText("XML");\r
1470 jMenuItemViewXML.setMnemonic('X');\r
1471 jMenuItemViewXML.setEnabled(false);\r
1472 jMenuItemViewXML.addActionListener(this);\r
1473 }\r
1474 return jMenuItemViewXML;\r
1475 }\r
1476\r
1477 /**\r
1478 This method initializes jMenuItemWindowTabView \r
1479 \r
1480 @return javax.swing.JMenuItem \r
1481 \r
43dc3851 1482 **/\r
a13899c5 1483 private JMenuItem getJMenuItemWindowTabView() {\r
1484 if (jMenuItemWindowTabView == null) {\r
1485 jMenuItemWindowTabView = new JMenuItem();\r
1486 jMenuItemWindowTabView.setText("Tab View");\r
1487 jMenuItemWindowTabView.setMnemonic('T');\r
1488 jMenuItemWindowTabView.setEnabled(false);\r
1489 jMenuItemWindowTabView.addActionListener(this);\r
1490 }\r
1491 return jMenuItemWindowTabView;\r
1492 }\r
1493\r
1494 /**\r
1495 This method initializes jMenuItemWindowSource \r
1496 \r
1497 @return javax.swing.JMenuItem \r
1498 \r
43dc3851 1499 **/\r
a13899c5 1500 private JMenuItem getJMenuItemWindowSource() {\r
1501 if (jMenuItemWindowSource == null) {\r
1502 jMenuItemWindowSource = new JMenuItem();\r
1503 jMenuItemWindowSource.setText("Source");\r
1504 jMenuItemWindowSource.setMnemonic('S');\r
1505 jMenuItemWindowSource.setEnabled(false);\r
1506 jMenuItemWindowSource.addActionListener(this);\r
1507 }\r
1508 return jMenuItemWindowSource;\r
1509 }\r
1510\r
1511 /**\r
1512 This method initializes jMenuItemWindowXML \r
1513 \r
1514 @return javax.swing.JMenuItem \r
1515 \r
43dc3851 1516 **/\r
a13899c5 1517 private JMenuItem getJMenuItemWindowXML() {\r
1518 if (jMenuItemWindowXML == null) {\r
1519 jMenuItemWindowXML = new JMenuItem();\r
1520 jMenuItemWindowXML.setText("XML");\r
1521 jMenuItemWindowXML.setMnemonic('X');\r
1522 jMenuItemWindowXML.setEnabled(false);\r
1523 jMenuItemWindowXML.addActionListener(this);\r
1524 }\r
1525 return jMenuItemWindowXML;\r
1526 }\r
1527\r
1528 /**\r
1529 This method initializes jMenuItemWindowPreferences \r
1530 \r
1531 @return javax.swing.JMenuItem \r
1532 \r
43dc3851 1533 **/\r
a13899c5 1534 private JMenuItem getJMenuItemWindowPreferences() {\r
1535 if (jMenuItemWindowPreferences == null) {\r
1536 jMenuItemWindowPreferences = new JMenuItem();\r
1537 jMenuItemWindowPreferences.setText("Preferences");\r
1538 jMenuItemWindowPreferences.setMnemonic('P');\r
1539 jMenuItemWindowPreferences.setEnabled(false);\r
1540 jMenuItemWindowPreferences.addActionListener(this);\r
1541 }\r
1542 return jMenuItemWindowPreferences;\r
1543 }\r
1544\r
1545 /**\r
1546 This method initializes jMenuItemHelpContents \r
1547 \r
1548 @return javax.swing.JMenuItem \r
1549 \r
43dc3851 1550 **/\r
a13899c5 1551 private JMenuItem getJMenuItemHelpContents() {\r
1552 if (jMenuItemHelpContents == null) {\r
1553 jMenuItemHelpContents = new JMenuItem();\r
1554 jMenuItemHelpContents.setText("Contents");\r
1555 jMenuItemHelpContents.setMnemonic('C');\r
1556 jMenuItemHelpContents.setEnabled(false);\r
1557 jMenuItemHelpContents.addActionListener(this);\r
1558 jMenuItemHelpContents.setVisible(false);\r
1559 }\r
1560 return jMenuItemHelpContents;\r
1561 }\r
1562\r
1563 /**\r
1564 This method initializes jMenuItemHelpIndex \r
1565 \r
1566 @return javax.swing.JMenuItem \r
1567 \r
43dc3851 1568 **/\r
a13899c5 1569 private JMenuItem getJMenuItemHelpIndex() {\r
1570 if (jMenuItemHelpIndex == null) {\r
1571 jMenuItemHelpIndex = new JMenuItem();\r
1572 jMenuItemHelpIndex.setText("Index");\r
1573 jMenuItemHelpIndex.setMnemonic('I');\r
1574 jMenuItemHelpIndex.setEnabled(false);\r
1575 jMenuItemHelpIndex.addActionListener(this);\r
1576 jMenuItemHelpIndex.setVisible(false);\r
1577 }\r
1578 return jMenuItemHelpIndex;\r
1579 }\r
1580\r
1581 /**\r
1582 This method initializes jMenuItemHelpSearch \r
1583 \r
1584 @return javax.swing.JMenuItem \r
1585 \r
1586 */\r
1587 private JMenuItem getJMenuItemHelpSearch() {\r
1588 if (jMenuItemHelpSearch == null) {\r
1589 jMenuItemHelpSearch = new JMenuItem();\r
1590 jMenuItemHelpSearch.setText("Search");\r
1591 jMenuItemHelpSearch.setMnemonic('S');\r
1592 jMenuItemHelpSearch.setEnabled(false);\r
1593 jMenuItemHelpSearch.addActionListener(this);\r
1594 jMenuItemHelpSearch.setVisible(false);\r
1595 }\r
1596 return jMenuItemHelpSearch;\r
1597 }\r
1598\r
a13899c5 1599 /**\r
1600 * This method initializes jMenuItemToolsInstallPackage \r
1601 * \r
1602 * @return javax.swing.JMenuItem \r
1603 */\r
92e29378 1604 private JMenuItem getJMenuItemProjectInstallFar() {\r
1605 if (jMenuItemProjectInstallFar == null) {\r
1606 jMenuItemProjectInstallFar = new JMenuItem();\r
1607 jMenuItemProjectInstallFar.setText("Install FAR");\r
1608 jMenuItemProjectInstallFar.setMnemonic('I');\r
1609 jMenuItemProjectInstallFar.setEnabled(true);\r
1610 jMenuItemProjectInstallFar.addActionListener(this);\r
a13899c5 1611 }\r
92e29378 1612 return jMenuItemProjectInstallFar;\r
a13899c5 1613 }\r
1614\r
1615 /**\r
1616 * This method initializes jMenuItemToolsUpdatePackage \r
1617 * \r
1618 * @return javax.swing.JMenuItem \r
1619 */\r
92e29378 1620 private JMenuItem getJMenuItemProjectUpdateFar() {\r
1621 if (jMenuItemProjectUpdateFar == null) {\r
1622 jMenuItemProjectUpdateFar = new JMenuItem();\r
1623 jMenuItemProjectUpdateFar.setText("Update FAR");\r
1624 jMenuItemProjectUpdateFar.setMnemonic('U');\r
1625 jMenuItemProjectUpdateFar.setEnabled(true);\r
1626 jMenuItemProjectUpdateFar.addActionListener(this);\r
ef6e2efe 1627 jMenuItemProjectUpdateFar.setVisible(true);\r
a13899c5 1628 }\r
92e29378 1629 return jMenuItemProjectUpdateFar;\r
a13899c5 1630 }\r
1631\r
1632 /**\r
1633 * This method initializes jMenuItemRemovePackage \r
1634 * \r
1635 * @return javax.swing.JMenuItem \r
1636 */\r
92e29378 1637 private JMenuItem getJMenuItemProjectRemoveFar() {\r
1638 if (jMenuItemProjectRemoveFar == null) {\r
1639 jMenuItemProjectRemoveFar = new JMenuItem();\r
1640 jMenuItemProjectRemoveFar.setText("Remove FAR");\r
1641 jMenuItemProjectRemoveFar.setMnemonic('R');\r
1642 jMenuItemProjectRemoveFar.setEnabled(true);\r
1643 jMenuItemProjectRemoveFar.addActionListener(this);\r
1644 }\r
1645 return jMenuItemProjectRemoveFar;\r
1646 }\r
1647\r
1648 /**\r
1649 * This method initializes jMenuItemProjectCreateFar \r
1650 * \r
1651 * @return javax.swing.JMenuItem \r
1652 */\r
1653 private JMenuItem getJMenuItemProjectCreateFar() {\r
1654 if (jMenuItemProjectCreateFar == null) {\r
1655 jMenuItemProjectCreateFar = new JMenuItem();\r
1656 jMenuItemProjectCreateFar.setText("Create FAR");\r
1657 jMenuItemProjectCreateFar.setMnemonic('C');\r
1658 jMenuItemProjectCreateFar.addActionListener(this);\r
a13899c5 1659 }\r
92e29378 1660 return jMenuItemProjectCreateFar;\r
a13899c5 1661 }\r
1662\r
1663 /* (non-Javadoc)\r
1664 * @see org.tianocore.packaging.common.ui.IFrame#main(java.lang.String[])\r
1665 *\r
1666 * Main class, start the GUI\r
1667 * \r
1668 */\r
1669 public static void main(String[] args) {\r
8f4f211c 1670 FrameworkWizardUI module = FrameworkWizardUI.getInstance();\r
a13899c5 1671 module.setVisible(true);\r
1672 }\r
1673\r
1674 /**\r
1675 This is the default constructor\r
1676 \r
1677 **/\r
1678 public FrameworkWizardUI() {\r
1679 super();\r
1680 init();\r
1681 }\r
1682\r
1683 /**\r
1684 This method initializes this\r
1685 \r
1686 \r
1687 **/\r
1688 private void init() {\r
1689 //\r
1690 // Set current workspace and check\r
1691 // Check if exists WORKSPACE\r
1692 // \r
1693 //\r
1694 Workspace.setCurrentWorkspace(System.getenv("WORKSPACE"));\r
1695 if (!Workspace.checkCurrentWorkspace()) {\r
1696 JOptionPane.showConfirmDialog(null, "Workspace is not setup correctly. Please setup first.", "Warning",\r
1697 JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE);\r
1698 this.dispose();\r
1699 System.exit(0);\r
1700 }\r
1701\r
1702 this.setSize(DataType.MAIN_FRAME_PREFERRED_SIZE_WIDTH, DataType.MAIN_FRAME_PREFERRED_SIZE_HEIGHT);\r
1703 this.setResizable(true);\r
1704 this.setJMenuBar(getjJMenuBar());\r
1705 this.addComponentListener(this);\r
1706 this.getCompontentsFromFrameworkDatabase();\r
1707 this.setContentPane(getJContentPane());\r
92e29378 1708 this.setTitle(DataType.PROJECT_NAME + " " + DataType.PROJECT_VERSION + " " + "- ["\r
1709 + Workspace.getCurrentWorkspace() + "]");\r
a13899c5 1710 this.setExitType(1);\r
79cb6fdb 1711\r
a13899c5 1712 //\r
1713 // max the window\r
1714 //\r
1715 this.setExtendedState(JFrame.MAXIMIZED_BOTH);\r
1716 }\r
1717\r
1718 /**\r
1719 This method initializes jContentPane\r
1720 \r
1721 @return javax.swing.JPanel jContentPane\r
1722 \r
1723 **/\r
1724 private JPanel getJContentPane() {\r
1725 if (jContentPane == null) {\r
1726 jContentPane = new JPanel();\r
1727 jContentPane.setLayout(null);\r
1728 jContentPane.add(getJPanelOperation(), null);\r
1729 jContentPane.add(getJSplitPane(), null);\r
1730 }\r
1731 return jContentPane;\r
1732 }\r
1733\r
1734 /* (non-Javadoc)\r
1735 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
1736 *\r
1737 * Override actionPerformed to listen all actions\r
1738 *\r
1739 */\r
1740 public void actionPerformed(ActionEvent arg0) {\r
1741 //\r
1742 // Operations of Menu\r
1743 //\r
1744 if (arg0.getSource() == jMenuItemFileNew) {\r
1745 this.fileNew();\r
1746 }\r
1747\r
1748 if (arg0.getSource() == jMenuItemFileOpen) {\r
1749 this.open();\r
1750 }\r
1751\r
1752 if (arg0.getSource() == jMenuItemFileClose) {\r
1753 this.close();\r
1754 }\r
1755\r
1756 if (arg0.getSource() == jMenuItemFileCloseAll) {\r
1757 this.closeAll();\r
1758 }\r
1759\r
1760 if (arg0.getSource() == jMenuItemFileSave) {\r
1761 this.save();\r
1762 }\r
1763\r
1764 if (arg0.getSource() == jMenuItemFileSaveAs) {\r
1765 this.saveAs();\r
1766 }\r
1767\r
1768 if (arg0.getSource() == jMenuItemFileSaveAll) {\r
1769 this.saveAll();\r
1770 }\r
1771\r
1772 if (arg0.getSource() == jMenuItemFileExit) {\r
1773 this.exit();\r
1774 }\r
1775\r
1776 if (arg0.getSource() == jMenuItemProjectChangeWorkspace) {\r
1777 changeWorkspace();\r
1778 }\r
1779\r
92e29378 1780 if (arg0.getSource() == jMenuItemProjectCreateFar) {\r
43dc3851 1781 createFar();\r
92e29378 1782 }\r
1783\r
1784 if (arg0.getSource() == jMenuItemProjectInstallFar) {\r
43dc3851 1785 installFar();\r
92e29378 1786 }\r
1787\r
1788 if (arg0.getSource() == jMenuItemProjectRemoveFar) {\r
43dc3851 1789 removeFar();\r
92e29378 1790 }\r
1791\r
1792 if (arg0.getSource() == jMenuItemProjectUpdateFar) {\r
43dc3851 1793 updateFar();\r
92e29378 1794 }\r
1795\r
a13899c5 1796 if (arg0.getSource() == jMenuItemToolsClone) {\r
1797 cloneItem();\r
1798 }\r
92e29378 1799\r
79cb6fdb 1800 if (arg0.getSource() == jMenuItemToolsToolChainConfiguration) {\r
1801 setupToolChainConfiguration();\r
1802 }\r
a13899c5 1803\r
1804 if (arg0.getSource() == jMenuItemHelpAbout) {\r
1805 About a = new About(this, true);\r
1806 int result = a.showDialog();\r
1807 if (result == DataType.RETURN_TYPE_OK) {\r
1808 a.dispose();\r
1809 }\r
1810 }\r
1811 }\r
1812\r
1813 /**\r
1814 Create an empty tree if no file is open\r
1815 \r
1816 **/\r
1817 private void makeEmptyTree() {\r
43dc3851 1818 //\r
a13899c5 1819 // Make root\r
43dc3851 1820 //\r
a13899c5 1821 dmtnRoot = new IDefaultMutableTreeNode("WORKSPACE", IDefaultMutableTreeNode.WORKSPACE, -1);\r
1822\r
43dc3851 1823 //\r
a13899c5 1824 // Make Module Description\r
43dc3851 1825 //\r
a13899c5 1826 dmtnModuleDescription = new IDefaultMutableTreeNode("ModuleDescription", IDefaultMutableTreeNode.MODULE, -1);\r
1827\r
92e29378 1828 //\r
1829 // First add package\r
1830 //\r
1831 if (this.vPackageList.size() > 0) {\r
1832 for (int index = 0; index < this.vPackageList.size(); index++) {\r
1833 IDefaultMutableTreeNode dmtnModulePackage = null;\r
1834 IDefaultMutableTreeNode dmtnModulePackageLibrary = null;\r
1835 IDefaultMutableTreeNode dmtnModulePackageModule = null;\r
1836\r
1837 dmtnModulePackage = new IDefaultMutableTreeNode(this.vPackageList.elementAt(index).getName(),\r
1838 IDefaultMutableTreeNode.MODULE_PACKAGE, false,\r
1839 this.vPackageList.elementAt(index));\r
1840 dmtnModulePackageLibrary = new IDefaultMutableTreeNode("Library",\r
1841 IDefaultMutableTreeNode.MODULE_PACKAGE_LIBRARY,\r
1842 false, this.vPackageList.elementAt(index));\r
1843 dmtnModulePackageModule = new IDefaultMutableTreeNode("Module",\r
1844 IDefaultMutableTreeNode.MODULE_PACKAGE_MODULE,\r
1845 false, this.vPackageList.elementAt(index));\r
43dc3851 1846 //\r
1847 // And then add each module in its package\r
1848 //\r
92e29378 1849 Vector<ModuleIdentification> vModule = wt.getAllModules(this.vPackageList.elementAt(index));\r
1850 for (int indexJ = 0; indexJ < vModule.size(); indexJ++) {\r
1851 if (vModule.get(indexJ).isLibrary()) {\r
1852 dmtnModulePackageLibrary.add(new IDefaultMutableTreeNode(vModule.get(indexJ).getName(),\r
535329b5 1853 IDefaultMutableTreeNode.MODULE,\r
92e29378 1854 false, vModule.get(indexJ)));\r
1855 } else {\r
1856 dmtnModulePackageModule.add(new IDefaultMutableTreeNode(vModule.get(indexJ).getName(),\r
535329b5 1857 IDefaultMutableTreeNode.MODULE,\r
92e29378 1858 false, vModule.get(indexJ)));\r
1859 }\r
1860 }\r
1861 if (dmtnModulePackageModule.getChildCount() > 0) {\r
1862 dmtnModulePackage.add(dmtnModulePackageModule);\r
1863 }\r
1864 if (dmtnModulePackageLibrary.getChildCount() > 0) {\r
1865 dmtnModulePackage.add(dmtnModulePackageLibrary);\r
1866 }\r
1867\r
1868 dmtnModuleDescription.add(dmtnModulePackage);\r
a13899c5 1869 }\r
1870 }\r
1871\r
43dc3851 1872 //\r
a13899c5 1873 // Make Package Description\r
43dc3851 1874 //\r
a13899c5 1875 dmtnPackageDescription = new IDefaultMutableTreeNode("PackageDescription", IDefaultMutableTreeNode.PACKAGE, -1);\r
1876 if (this.vPackageList.size() > 0) {\r
1877 for (int index = 0; index < this.vPackageList.size(); index++) {\r
1878 dmtnPackageDescription.add(new IDefaultMutableTreeNode(this.vPackageList.elementAt(index).getName(),\r
535329b5 1879 IDefaultMutableTreeNode.PACKAGE, false,\r
a13899c5 1880 this.vPackageList.elementAt(index)));\r
1881 }\r
1882 }\r
1883\r
43dc3851 1884 //\r
a13899c5 1885 // Make Platform Description\r
43dc3851 1886 //\r
a13899c5 1887 dmtnPlatformDescription = new IDefaultMutableTreeNode("PlatformDescription", IDefaultMutableTreeNode.PLATFORM,\r
1888 -1);\r
1889 if (this.vPlatformList.size() > 0) {\r
1890 for (int index = 0; index < this.vPlatformList.size(); index++) {\r
1891 dmtnPlatformDescription.add(new IDefaultMutableTreeNode(this.vPlatformList.elementAt(index).getName(),\r
535329b5 1892 IDefaultMutableTreeNode.PLATFORM,\r
a13899c5 1893 false, this.vPlatformList.elementAt(index)));\r
1894 }\r
1895 }\r
1896\r
43dc3851 1897 //\r
1898 // Add sub nodes to root node\r
1899 //\r
a13899c5 1900 dmtnRoot.add(dmtnModuleDescription);\r
1901 dmtnRoot.add(dmtnPackageDescription);\r
1902 dmtnRoot.add(dmtnPlatformDescription);\r
1903 iTree = new ITree(dmtnRoot);\r
1904 iTree.addMouseListener(this);\r
1905 jScrollPaneTree.setViewportView(iTree);\r
1906 }\r
1907\r
1908 /* (non-Javadoc)\r
1909 * @see java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent)\r
1910 *\r
1911 * Override windowClosing to popup warning message to confirm quit\r
1912 * \r
1913 */\r
1914 public void windowClosing(WindowEvent arg0) {\r
1915 this.exit();\r
1916 }\r
1917\r
1918 /* (non-Javadoc)\r
1919 * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)\r
1920 * \r
1921 * Override mouseClicked to check if need display popup menu\r
1922 * \r
1923 */\r
1924 public void mouseClicked(MouseEvent arg0) {\r
1925 if (arg0.getButton() == MouseEvent.BUTTON1) {\r
1926 }\r
1927 if (arg0.getButton() == MouseEvent.BUTTON3) {\r
1928 }\r
1929 //\r
1930 // When double click\r
1931 //\r
1932 if (arg0.getClickCount() == 2) {\r
1933 doubleClickModuleTreeNode();\r
1934 }\r
1935 }\r
1936\r
1937 public void mouseEntered(MouseEvent arg0) {\r
1938 // TODO Auto-generated method stub\r
1939 }\r
1940\r
1941 public void mouseExited(MouseEvent arg0) {\r
1942 // TODO Auto-generated method stub\r
1943 }\r
1944\r
1945 public void mousePressed(MouseEvent arg0) {\r
1946 // TODO Auto-generated method stub\r
1947 }\r
1948\r
1949 public void mouseReleased(MouseEvent arg0) {\r
1950 // TODO Auto-generated method stub\r
1951 }\r
1952\r
1953 /**\r
1954 Remove all Internal Frame of Module Desktop Pane\r
1955 \r
1956 **/\r
1957 private void cleanDesktopPaneModule() {\r
1958 if (jDesktopPaneModule != null) {\r
1959 JInternalFrame[] iif = this.jDesktopPaneModule.getAllFrames();\r
1960 for (int index = 0; index < iif.length; index++) {\r
1961 iif[index].dispose();\r
1962 }\r
1963 }\r
1964 }\r
1965\r
1966 /**\r
1967 Remove all Internal Frame of package Desktop Pane\r
1968 \r
1969 **/\r
1970 private void cleanDesktopPanePackage() {\r
1971 if (jDesktopPanePlatform != null) {\r
1972 JInternalFrame[] iif = this.jDesktopPanePackage.getAllFrames();\r
1973 for (int index = 0; index < iif.length; index++) {\r
1974 iif[index].dispose();\r
1975 }\r
1976 }\r
1977 }\r
1978\r
1979 /**\r
1980 Remove all Internal Frame of platform Desktop Pane\r
1981 \r
1982 **/\r
1983 private void cleanDesktopPanePlatform() {\r
1984 if (jDesktopPanePlatform != null) {\r
1985 JInternalFrame[] iif = this.jDesktopPanePlatform.getAllFrames();\r
1986 for (int index = 0; index < iif.length; index++) {\r
1987 iif[index].dispose();\r
1988 }\r
1989 }\r
1990 }\r
1991\r
1992 /**\r
1993 Remove all Internal Frame of all Desktop Panes\r
1994 \r
1995 **/\r
1996 private void cleanDesktopPane() {\r
1997 cleanDesktopPaneModule();\r
1998 cleanDesktopPanePackage();\r
1999 cleanDesktopPanePlatform();\r
2000 }\r
2001\r
2002 /**\r
2003 Set file filter as input ext\r
2004 \r
2005 @param ext\r
2006 @return\r
2007 \r
2008 **/\r
2009 private int getNewFilePath(String ext) {\r
2010 JFileChooser fc = new JFileChooser(Workspace.getCurrentWorkspace());\r
2011 fc.setAcceptAllFileFilterUsed(false);\r
2012 fc.addChoosableFileFilter(new IFileFilter(ext));\r
2013 return fc.showSaveDialog(new JPanel());\r
2014 }\r
55a2762d 2015\r
2016 /**\r
2017 Add a module to tree\r
2018 \r
2019 @param mid The module node to be added\r
2020 \r
2021 **/\r
2022 private void addModuleToTree(ModuleIdentification mid) {\r
2023 //\r
2024 // Add new MsaHeader node to the tree\r
2025 //\r
2026 IDefaultMutableTreeNode node = new IDefaultMutableTreeNode(mid.getName(), IDefaultMutableTreeNode.MSA_HEADER,\r
2027 true, mid);\r
2028 //\r
2029 // First find the module belongs to which package\r
2030 //\r
2031 IDefaultMutableTreeNode packageNode = iTree.getNodeById(dmtnModuleDescription, mid.getPackageId(),\r
2032 IDefaultMutableTreeNode.MODULE_PACKAGE);\r
2033 //\r
2034 // To check if has module node or library node\r
2035 //\r
2036 IDefaultMutableTreeNode parentModuleNode = null;\r
2037 IDefaultMutableTreeNode parentLibraryNode = null;\r
2038 boolean hasModule = false;\r
2039 boolean hasLibrary = false;\r
2040 for (int index = 0; index < packageNode.getChildCount(); index++) {\r
2041 IDefaultMutableTreeNode iNode = (IDefaultMutableTreeNode) packageNode.getChildAt(index);\r
2042 if (iNode.getCategory() == IDefaultMutableTreeNode.MODULE_PACKAGE_LIBRARY) {\r
2043 hasLibrary = true;\r
2044 parentLibraryNode = iNode;\r
2045 }\r
2046 if (iNode.getCategory() == IDefaultMutableTreeNode.MODULE_PACKAGE_MODULE) {\r
2047 hasModule = true;\r
2048 parentModuleNode = iNode;\r
2049 }\r
2050 }\r
2051\r
2052 //\r
2053 // If is a module\r
2054 //\r
2055 if (!mid.isLibrary()) {\r
2056 //\r
2057 // Create parent node first if has no parent node\r
2058 //\r
2059 if (!hasModule) {\r
2060 parentModuleNode = new IDefaultMutableTreeNode("Module", IDefaultMutableTreeNode.MODULE_PACKAGE_MODULE,\r
2061 false, mid.getPackageId());\r
2062 iTree.addNode(packageNode, parentModuleNode);\r
2063 }\r
2064\r
2065 iTree.addNode(parentModuleNode, node);\r
2066 }\r
2067\r
2068 //\r
2069 // If is a Library\r
2070 //\r
2071 if (mid.isLibrary()) {\r
2072 //\r
2073 // Create parent node first if has no parent node\r
2074 //\r
2075 if (!hasLibrary) {\r
2076 parentLibraryNode = new IDefaultMutableTreeNode("Library",\r
2077 IDefaultMutableTreeNode.MODULE_PACKAGE_LIBRARY, false,\r
2078 mid.getPackageId());\r
2079 iTree.addNode(packageNode, parentLibraryNode);\r
2080 }\r
2081\r
2082 iTree.addNode(parentLibraryNode, node);\r
2083 }\r
2084 }\r
a13899c5 2085\r
2086 /**\r
2087 Open Module\r
2088\r
2089 @param path input file path\r
2090 \r
2091 **/\r
55a2762d 2092 private void openModule(String path, ModuleIdentification moduleId) {\r
a13899c5 2093 ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = null;\r
2094 try {\r
2095 msa = OpenFile.openMsaFile(path);\r
2096 } catch (IOException e) {\r
ed1665f2 2097 Log.wrn("Open Module Surface Area " + path, e.getMessage());\r
a13899c5 2098 Log.err("Open Module Surface Area " + path, e.getMessage());\r
2099 return;\r
2100 } catch (XmlException e) {\r
ed1665f2 2101 Log.wrn("Open Module Surface Area " + path, e.getMessage());\r
a13899c5 2102 Log.err("Open Module Surface Area " + path, e.getMessage());\r
2103 return;\r
2104 } catch (Exception e) {\r
ed1665f2 2105 Log.wrn("Open Module Surface Area " + path, "Invalid file type");\r
a13899c5 2106 Log.err("Open Module Surface Area " + path, "Invalid file type");\r
2107 return;\r
2108 }\r
2109 Identification id = new Identification(msa.getMsaHeader().getModuleName(), msa.getMsaHeader().getGuidValue(),\r
2110 msa.getMsaHeader().getVersion(), path);\r
2111 //\r
2112 // Generate module id\r
2113 //\r
2114 PackageIdentification pid = wt.getPackageIdByModuleId(id);\r
2115 if (pid != null) {\r
2116 //\r
2117 // To judge if the module existed in vModuleList\r
2118 // If not, add it to vModuleList\r
2119 //\r
2120 boolean isFind = false;\r
2121 for (int index = 0; index < vModuleList.size(); index++) {\r
2122 if (vModuleList.elementAt(index).equals(id)) {\r
2123 isFind = true;\r
2124 break;\r
2125 }\r
2126 }\r
2127 if (!isFind) {\r
55a2762d 2128 ModuleIdentification mid = new ModuleIdentification(id, pid, moduleId.isLibrary());\r
92e29378 2129 vModuleList.addElement(mid);\r
55a2762d 2130 addModuleToTree(mid);\r
2131 }\r
2132 } else {\r
2133 //\r
2134 // The module is not in existing packages\r
2135 //\r
2136 Log.err("The module hasn't been added to any package of current workspace!");\r
2137 return;\r
2138 }\r
92e29378 2139\r
55a2762d 2140 //\r
2141 // Make the node selected\r
2142 //\r
2143 iTree.setSelectionPath(iTree.getPathOfNode(iTree.getNodeById(this.dmtnModuleDescription, id,\r
535329b5 2144 IDefaultMutableTreeNode.MODULE)));\r
55a2762d 2145 //\r
2146 // Update opening Module list information\r
2147 //\r
2148 if (!openingModuleList.existsModule(id)) {\r
2149 //\r
2150 // Insert sub node of module\r
2151 //\r
2152 insertModuleTreeNode(id);\r
2153 iTree.getSelectNode().setOpening(true);\r
92e29378 2154\r
55a2762d 2155 //\r
2156 // Update opening module list\r
2157 //\r
2158 openingModuleList.insertToOpeningModuleList(id, msa);\r
2159 openingModuleList.setTreePathById(id, iTree.getSelectionPath());\r
2160 }\r
2161 //\r
535329b5 2162 // Select msa header node and show it in editor panel\r
55a2762d 2163 //\r
535329b5 2164 iTree.setSelectionPath(iTree.getPathOfNode(iTree.getNodeById(this.dmtnModuleDescription, id,\r
2165 IDefaultMutableTreeNode.MSA_HEADER)));\r
55a2762d 2166 showModuleElement(IDefaultMutableTreeNode.MSA_HEADER, openingModuleList.getOpeningModuleById(id));\r
2167 this.currentOpeningModuleIndex = openingModuleList.findIndexOfListById(id);\r
2168 }\r
92e29378 2169\r
55a2762d 2170 /**\r
2171 Open Module\r
92e29378 2172\r
55a2762d 2173 @param path input file path\r
2174 \r
2175 **/\r
2176 private void openModule(String path) {\r
2177 ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = null;\r
2178 try {\r
2179 msa = OpenFile.openMsaFile(path);\r
2180 } catch (IOException e) {\r
ed1665f2 2181 Log.wrn("Open Module Surface Area " + path, e.getMessage());\r
55a2762d 2182 Log.err("Open Module Surface Area " + path, e.getMessage());\r
2183 return;\r
2184 } catch (XmlException e) {\r
ed1665f2 2185 Log.wrn("Open Module Surface Area " + path, e.getMessage());\r
55a2762d 2186 Log.err("Open Module Surface Area " + path, e.getMessage());\r
2187 return;\r
2188 } catch (Exception e) {\r
ed1665f2 2189 Log.wrn("Open Module Surface Area " + path, "Invalid file type");\r
55a2762d 2190 Log.err("Open Module Surface Area " + path, "Invalid file type");\r
2191 return;\r
2192 }\r
2193 Identification id = new Identification(msa.getMsaHeader().getModuleName(), msa.getMsaHeader().getGuidValue(),\r
2194 msa.getMsaHeader().getVersion(), path);\r
2195 //\r
2196 // Generate module id\r
2197 //\r
2198 PackageIdentification pid = wt.getPackageIdByModuleId(id);\r
2199 if (pid != null) {\r
2200 //\r
2201 // To judge if the module existed in vModuleList\r
2202 // If not, add it to vModuleList\r
2203 //\r
2204 boolean isFind = false;\r
2205 for (int index = 0; index < vModuleList.size(); index++) {\r
2206 if (vModuleList.elementAt(index).equals(id)) {\r
2207 isFind = true;\r
2208 break;\r
92e29378 2209 }\r
a13899c5 2210 }\r
55a2762d 2211 if (!isFind) {\r
2212 ModuleIdentification mid = new ModuleIdentification(id, pid);\r
2213 vModuleList.addElement(mid);\r
2214 addModuleToTree(mid);\r
2215 }\r
a13899c5 2216 } else {\r
2217 //\r
2218 // The module is not in existing packages\r
2219 //\r
ed1665f2 2220 Log.wrn("Open Module", "The module hasn't been added to any package of current workspace!");\r
a13899c5 2221 return;\r
2222 }\r
55a2762d 2223\r
92e29378 2224 //\r
a13899c5 2225 // Make the node selected\r
2226 //\r
2227 iTree.setSelectionPath(iTree.getPathOfNode(iTree.getNodeById(this.dmtnModuleDescription, id,\r
535329b5 2228 IDefaultMutableTreeNode.MODULE)));\r
a13899c5 2229 //\r
2230 // Update opening Module list information\r
2231 //\r
2232 if (!openingModuleList.existsModule(id)) {\r
2233 //\r
2234 // Insert sub node of module\r
2235 //\r
2236 insertModuleTreeNode(id);\r
2237 iTree.getSelectNode().setOpening(true);\r
2238\r
2239 //\r
2240 // Update opening module list\r
2241 //\r
2242 openingModuleList.insertToOpeningModuleList(id, msa);\r
2243 openingModuleList.setTreePathById(id, iTree.getSelectionPath());\r
2244 }\r
2245 //\r
535329b5 2246 // Select msa header node and show it in editor panel\r
a13899c5 2247 //\r
535329b5 2248 iTree.setSelectionPath(iTree.getPathOfNode(iTree.getNodeById(this.dmtnModuleDescription, id,\r
2249 IDefaultMutableTreeNode.MSA_HEADER)));\r
a13899c5 2250 showModuleElement(IDefaultMutableTreeNode.MSA_HEADER, openingModuleList.getOpeningModuleById(id));\r
2251 this.currentOpeningModuleIndex = openingModuleList.findIndexOfListById(id);\r
2252 }\r
2253\r
2254 /**\r
2255 Open Package\r
2256\r
2257 @param path input file path\r
2258 \r
2259 **/\r
2260 private void openPackage(String path) {\r
2261 PackageSurfaceAreaDocument.PackageSurfaceArea spd = null;\r
2262 try {\r
2263 spd = OpenFile.openSpdFile(path);\r
2264 } catch (IOException e) {\r
ed1665f2 2265 Log.wrn("Open Package Surface Area " + path, e.getMessage());\r
a13899c5 2266 Log.err("Open Package Surface Area " + path, e.getMessage());\r
2267 return;\r
2268 } catch (XmlException e) {\r
ed1665f2 2269 Log.wrn("Open Package Surface Area " + path, e.getMessage());\r
a13899c5 2270 Log.err("Open Package Surface Area " + path, e.getMessage());\r
2271 return;\r
2272 } catch (Exception e) {\r
ed1665f2 2273 Log.wrn("Open Package Surface Area " + path, "Invalid file type");\r
a13899c5 2274 Log.err("Open Package Surface Area " + path, "Invalid file type");\r
2275 return;\r
2276 }\r
2277 Identification id = new Identification(spd.getSpdHeader().getPackageName(), spd.getSpdHeader().getGuidValue(),\r
2278 spd.getSpdHeader().getVersion(), path);\r
2279 //\r
2280 // To judge if the package existed in vPackageList\r
2281 // If not, add it to vPackageList\r
2282 //\r
2283 boolean isFind = false;\r
2284 for (int index = 0; index < vPackageList.size(); index++) {\r
2285 if (vPackageList.elementAt(index).equals(id)) {\r
2286 isFind = true;\r
2287 break;\r
2288 }\r
2289 }\r
2290 if (!isFind) {\r
2291 //\r
2292 // The module is not in existing packages\r
2293 //\r
ed1665f2 2294 Log.wrn("Open Package", "The package hasn't been added to current workspace!");\r
a13899c5 2295 return;\r
2296 }\r
2297\r
2298 //\r
2299 // Make the node selected\r
2300 //\r
2301 iTree.setSelectionPath(iTree.getPathOfNode(iTree.getNodeById(this.dmtnPackageDescription, id,\r
535329b5 2302 IDefaultMutableTreeNode.PACKAGE)));\r
a13899c5 2303 //\r
2304 // Update opening package list information\r
2305 //\r
2306 if (!openingPackageList.existsPackage(id)) {\r
2307 //\r
2308 // Insert sub node of module\r
2309 //\r
2310 insertPackageTreeNode(id);\r
2311 iTree.getSelectNode().setOpening(true);\r
2312\r
2313 //\r
2314 // Update opening module list\r
2315 //\r
2316 openingPackageList.insertToOpeningPackageList(id, spd);\r
2317 openingPackageList.setTreePathById(id, iTree.getSelectionPath());\r
2318 }\r
2319 //\r
2320 // Show spd header in editor panel\r
2321 //\r
535329b5 2322 iTree.setSelectionPath(iTree.getPathOfNode(iTree.getNodeById(this.dmtnPackageDescription, id,\r
2323 IDefaultMutableTreeNode.SPD_HEADER)));\r
a13899c5 2324 showPackageElement(IDefaultMutableTreeNode.SPD_HEADER, openingPackageList.getOpeningPackageById(id));\r
2325 this.currentOpeningPackageIndex = openingPackageList.findIndexOfListById(id);\r
2326 }\r
2327\r
2328 /**\r
2329 Open Package\r
2330\r
2331 @param path input file path\r
2332 \r
2333 **/\r
2334 private void openPlatform(String path) {\r
2335 PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd = null;\r
2336 try {\r
2337 fpd = OpenFile.openFpdFile(path);\r
2338 } catch (IOException e) {\r
ed1665f2 2339 Log.wrn("Open Platform Surface Area " + path, e.getMessage());\r
a13899c5 2340 Log.err("Open Platform Surface Area " + path, e.getMessage());\r
2341 return;\r
2342 } catch (XmlException e) {\r
ed1665f2 2343 Log.wrn("Open Platform Surface Area " + path, e.getMessage());\r
a13899c5 2344 Log.err("Open Platform Surface Area " + path, e.getMessage());\r
2345 return;\r
2346 } catch (Exception e) {\r
ed1665f2 2347 Log.wrn("Open Platform Surface Area " + path, "Invalid file type");\r
a13899c5 2348 Log.err("Open Platform Surface Area " + path, "Invalid file type");\r
2349 return;\r
2350 }\r
2351 Identification id = new Identification(fpd.getPlatformHeader().getPlatformName(), fpd.getPlatformHeader()\r
2352 .getGuidValue(),\r
2353 fpd.getPlatformHeader().getVersion(), path);\r
2354 //\r
2355 // To judge if the platform existed in vPlatformList\r
2356 // If not, add it to vPlatformList\r
2357 //\r
2358 boolean isFind = false;\r
2359 for (int index = 0; index < vPlatformList.size(); index++) {\r
2360 if (vPlatformList.elementAt(index).equals(id)) {\r
2361 isFind = true;\r
2362 break;\r
2363 }\r
2364 }\r
2365 if (!isFind) {\r
2366 //\r
2367 // The module is not in existing packages\r
2368 //\r
ed1665f2 2369 Log.wrn("Open Platform", "The platform hasn't been added to current workspace!");\r
a13899c5 2370 return;\r
2371 }\r
2372\r
2373 //\r
2374 // Make the node selected\r
2375 //\r
2376 iTree.setSelectionPath(iTree.getPathOfNode(iTree.getNodeById(this.dmtnPlatformDescription, id,\r
535329b5 2377 IDefaultMutableTreeNode.PLATFORM)));\r
a13899c5 2378 //\r
2379 // Update opening package list information\r
2380 //\r
2381 if (!openingPlatformList.existsPlatform(id)) {\r
2382 //\r
2383 // Insert sub node of module\r
2384 //\r
2385 insertPlatformTreeNode(id);\r
2386 iTree.getSelectNode().setOpening(true);\r
2387\r
2388 //\r
2389 // Update opening module list\r
2390 //\r
2391 openingPlatformList.insertToOpeningPlatformList(id, fpd);\r
2392 openingPlatformList.setTreePathById(id, iTree.getSelectionPath());\r
2393 }\r
2394 //\r
2395 // Show fpd header in editor panel\r
2396 //\r
535329b5 2397 iTree.setSelectionPath(iTree.getPathOfNode(iTree.getNodeById(this.dmtnPlatformDescription, id,\r
2398 IDefaultMutableTreeNode.FPD_PLATFORMHEADER)));\r
a13899c5 2399 showPlatformElement(IDefaultMutableTreeNode.FPD_PLATFORMHEADER, openingPlatformList.getOpeningPlatformById(id));\r
2400 this.currentOpeningPlatformIndex = openingPlatformList.findIndexOfListById(id);\r
2401 }\r
2402\r
2403 /**\r
2404 Save module \r
2405 \r
2406 **/\r
2407 private void saveModule(int index) {\r
2408 OpeningModuleType omt = openingModuleList.getOpeningModuleByIndex(index);\r
2409 if (omt.isNew()) {\r
2410 if (getNewFilePath(DataType.MODULE_SURFACE_AREA_EXT) != JFileChooser.APPROVE_OPTION) {\r
2411 return;\r
2412 }\r
2413 }\r
2414 try {\r
2415 SaveFile.saveMsaFile(omt.getId().getPath(), omt.getXmlMsa());\r
2416 openingModuleList.setNew(omt.getId(), false);\r
2417 openingModuleList.setModuleSaved(omt.getId(), true);\r
2418 } catch (Exception e) {\r
ed1665f2 2419 Log.wrn("Save Module", e.getMessage());\r
a13899c5 2420 Log.err("Save Module", e.getMessage());\r
2421 }\r
2422 }\r
2423\r
2424 /**\r
2425 Save package \r
2426 \r
2427 **/\r
2428 private void savePackage(int index) {\r
2429 OpeningPackageType opt = openingPackageList.getOpeningPackageByIndex(index);\r
2430 if (opt.isNew()) {\r
2431 if (getNewFilePath(DataType.PACKAGE_SURFACE_AREA_EXT) != JFileChooser.APPROVE_OPTION) {\r
2432 return;\r
2433 }\r
2434 }\r
2435 try {\r
2436 SaveFile.saveSpdFile(opt.getId().getPath(), opt.getXmlSpd());\r
2437 openingPackageList.setNew(opt.getId(), false);\r
2438 openingPackageList.setPackageSaved(opt.getId(), true);\r
2439 } catch (Exception e) {\r
ed1665f2 2440 Log.wrn("Save Package", e.getMessage());\r
a13899c5 2441 Log.err("Save Package", e.getMessage());\r
2442 }\r
2443 }\r
2444\r
2445 /**\r
2446 Save platform \r
2447 \r
2448 **/\r
2449 private void savePlatform(int index) {\r
2450 OpeningPlatformType opt = openingPlatformList.getOpeningPlatformByIndex(index);\r
2451 if (opt.isNew()) {\r
2452 if (getNewFilePath(DataType.PACKAGE_SURFACE_AREA_EXT) != JFileChooser.APPROVE_OPTION) {\r
2453 return;\r
2454 }\r
2455 }\r
2456 try {\r
2457 SaveFile.saveFpdFile(opt.getId().getPath(), opt.getXmlFpd());\r
2458 openingPlatformList.setNew(opt.getId(), false);\r
2459 openingPlatformList.setPlatformSaved(opt.getId(), true);\r
2460 } catch (Exception e) {\r
ed1665f2 2461 Log.wrn("Save Package", e.getMessage());\r
a13899c5 2462 Log.err("Save Package", e.getMessage());\r
2463 }\r
2464 }\r
2465\r
2466 public void componentHidden(ComponentEvent arg0) {\r
2467 // TODO Auto-generated method stub\r
2468\r
2469 }\r
2470\r
2471 public void componentMoved(ComponentEvent arg0) {\r
2472 // TODO Auto-generated method stub\r
2473\r
2474 }\r
2475\r
2476 public void componentResized(ComponentEvent arg0) {\r
2477 this.jSplitPane.setSize(this.getWidth() - DataType.MAIN_FRAME_WIDTH_SPACING,\r
2478 this.getHeight() - DataType.MAIN_FRAME_HEIGHT_SPACING);\r
2479 this.jSplitPane.validate();\r
2480 resizeDesktopPanel();\r
2481 }\r
2482\r
2483 public void componentShown(ComponentEvent arg0) {\r
2484 // TODO Auto-generated method stub\r
2485\r
2486 }\r
2487\r
2488 /**\r
2489 Resize JDesktopPanel\r
2490 \r
2491 */\r
2492 private void resizeDesktopPanel() {\r
2493 resizeDesktopPanel(this.jDesktopPaneModule);\r
2494 resizeDesktopPanel(this.jDesktopPanePackage);\r
2495 resizeDesktopPanel(this.jDesktopPanePlatform);\r
2496 }\r
2497\r
2498 /**\r
2499 Resize JDesktopPanel\r
2500 \r
2501 */\r
2502 private void resizeDesktopPanel(JDesktopPane jdk) {\r
2503 JInternalFrame[] iif = jdk.getAllFrames();\r
2504 for (int index = 0; index < iif.length; index++) {\r
2505 iif[index].setSize(jdk.getWidth(), jdk.getHeight());\r
2506 }\r
2507 }\r
2508\r
2509 private void getCompontentsFromFrameworkDatabase() {\r
2510 this.vModuleList = wt.getAllModules();\r
2511 this.vPackageList = wt.getAllPackages();\r
2512 this.vPlatformList = wt.getAllPlatforms();\r
2513 }\r
2514\r
2515 private void insertModuleTreeNode(Identification id) {\r
535329b5 2516 iTree.addNode(new IDefaultMutableTreeNode("Module Header", IDefaultMutableTreeNode.MSA_HEADER, true, id));\r
a13899c5 2517 iTree.addNode(new IDefaultMutableTreeNode("Module Definitions", IDefaultMutableTreeNode.MSA_MODULEDEFINITIONS,\r
2518 true, id));\r
2519 iTree.addNode(new IDefaultMutableTreeNode("Library Class Definitions",\r
2520 IDefaultMutableTreeNode.MSA_LIBRARYCLASSDEFINITIONS, true, id));\r
2521 iTree.addNode(new IDefaultMutableTreeNode("Source Files", IDefaultMutableTreeNode.MSA_SOURCEFILES, true, id));\r
2522 iTree.addNode(new IDefaultMutableTreeNode("Package Dependencies",\r
2523 IDefaultMutableTreeNode.MSA_PACKAGEDEPENDENCIES, true, id));\r
2524 iTree.addNode(new IDefaultMutableTreeNode("Protocols", IDefaultMutableTreeNode.MSA_PROTOCOLS, true, id));\r
2525 iTree.addNode(new IDefaultMutableTreeNode("Events", IDefaultMutableTreeNode.MSA_EVENTS, true, id));\r
2526 iTree.addNode(new IDefaultMutableTreeNode("Hobs", IDefaultMutableTreeNode.MSA_HOBS, true, id));\r
2527 iTree.addNode(new IDefaultMutableTreeNode("Ppis", IDefaultMutableTreeNode.MSA_PPIS, true, id));\r
2528 iTree.addNode(new IDefaultMutableTreeNode("Variables", IDefaultMutableTreeNode.MSA_VARIABLES, true, id));\r
2529 iTree.addNode(new IDefaultMutableTreeNode("Boot Modes", IDefaultMutableTreeNode.MSA_BOOTMODES, true, id));\r
2530 iTree.addNode(new IDefaultMutableTreeNode("System Tables", IDefaultMutableTreeNode.MSA_SYSTEMTABLES, true, id));\r
2531 iTree.addNode(new IDefaultMutableTreeNode("Data Hubs", IDefaultMutableTreeNode.MSA_DATAHUBS, true, id));\r
2532 iTree.addNode(new IDefaultMutableTreeNode("Hii Packages", IDefaultMutableTreeNode.MSA_HIIPACKAGES, true, id));\r
2533 iTree.addNode(new IDefaultMutableTreeNode("Guids", IDefaultMutableTreeNode.MSA_GUIDS, true, id));\r
2534 iTree.addNode(new IDefaultMutableTreeNode("Externs", IDefaultMutableTreeNode.MSA_EXTERNS, true, id));\r
2535 iTree.addNode(new IDefaultMutableTreeNode("PcdCoded", IDefaultMutableTreeNode.MSA_PCDS, true, id));\r
2536 }\r
2537\r
2538 private void insertPackageTreeNode(Identification id) {\r
535329b5 2539 iTree.addNode(new IDefaultMutableTreeNode("Package Header", IDefaultMutableTreeNode.SPD_HEADER, true, id));\r
a13899c5 2540 iTree.addNode(new IDefaultMutableTreeNode("Package Definitions",\r
2541 IDefaultMutableTreeNode.SPD_PACKAGEDEFINITIONS, true, id));\r
2542 iTree.addNode(new IDefaultMutableTreeNode("Library Class Declarations",\r
2543 IDefaultMutableTreeNode.SPD_LIBRARYCLASSDECLARATIONS, true, id));\r
2544 iTree.addNode(new IDefaultMutableTreeNode("Msa Files", IDefaultMutableTreeNode.SPD_MSAFILES, false, id));\r
535329b5 2545 iTree.addNode(new IDefaultMutableTreeNode("Package Includes", IDefaultMutableTreeNode.SPD_PACKAGEHEADERS, true,\r
a13899c5 2546 id));\r
2547 iTree.addNode(new IDefaultMutableTreeNode("Guid Declarations", IDefaultMutableTreeNode.SPD_GUIDDECLARATIONS,\r
2548 true, id));\r
2549 iTree.addNode(new IDefaultMutableTreeNode("Protocol Declarations",\r
2550 IDefaultMutableTreeNode.SPD_PROTOCOLDECLARATIONS, true, id));\r
2551 iTree.addNode(new IDefaultMutableTreeNode("Ppi Declarations", IDefaultMutableTreeNode.SPD_PPIDECLARATIONS,\r
2552 true, id));\r
2553 iTree.addNode(new IDefaultMutableTreeNode("Pcd Declarations", IDefaultMutableTreeNode.SPD_PCDDECLARATIONS,\r
2554 true, id));\r
2555 }\r
2556\r
2557 private void insertPlatformTreeNode(Identification id) {\r
535329b5 2558 iTree.addNode(new IDefaultMutableTreeNode("Platform Header", IDefaultMutableTreeNode.FPD_PLATFORMHEADER, true,\r
2559 id));\r
92e29378 2560 iTree.addNode(new IDefaultMutableTreeNode("Platform Definitions",\r
2561 IDefaultMutableTreeNode.FPD_PLATFORMDEFINITIONS, true, id));\r
a13899c5 2562 iTree.addNode(new IDefaultMutableTreeNode("Flash", IDefaultMutableTreeNode.FPD_FLASH, true, id));\r
2563 iTree.addNode(new IDefaultMutableTreeNode("Framework Modules", IDefaultMutableTreeNode.FPD_FRAMEWORKMODULES,\r
2564 true, id));\r
2565 iTree.addNode(new IDefaultMutableTreeNode("Pcd Dynamic Build Declarations",\r
2566 IDefaultMutableTreeNode.FPD_PCDDYNAMICBUILDDECLARATIONS, true, id));\r
2567 iTree.addNode(new IDefaultMutableTreeNode("Build Options", IDefaultMutableTreeNode.FPD_BUILDOPTIONS, true, id));\r
2568 }\r
2569\r
2570 /**\r
2571 Operate when double click a tree node\r
2572 \r
2573 **/\r
2574 private void doubleClickModuleTreeNode() {\r
a929458e 2575 Identification id = null;\r
2576 int intCategory = -1;\r
a13899c5 2577 String path = null;\r
535329b5 2578 boolean isOpen = false;\r
ed1665f2 2579 try {\r
a929458e 2580 id = iTree.getSelectNode().getId();\r
2581 intCategory = iTree.getSelectCategory();\r
535329b5 2582 isOpen = iTree.getSelectNode().isOpening();\r
2583 \r
2584 if (!isOpen) {\r
2585 // \r
2586 // If the node is not opened yet\r
2587 // Insert top level elements first\r
2588 //\r
2589 if (intCategory == IDefaultMutableTreeNode.MODULE) {\r
ed1665f2 2590\r
535329b5 2591 if (intCategory == IDefaultMutableTreeNode.MODULE) {\r
2592 path = iTree.getSelectNode().getId().getPath();\r
2593 }\r
2594 if (intCategory == IDefaultMutableTreeNode.PACKAGE) {\r
2595 path = iTree.getSelectNode().getId().getPath();\r
2596 }\r
2597 openModule(path);\r
2598 return;\r
2599 }\r
2600 if (intCategory == IDefaultMutableTreeNode.PACKAGE) {\r
ed1665f2 2601 path = iTree.getSelectNode().getId().getPath();\r
535329b5 2602 openPackage(path);\r
2603 return;\r
ed1665f2 2604 }\r
535329b5 2605 if (intCategory == IDefaultMutableTreeNode.PLATFORM) {\r
ed1665f2 2606 path = iTree.getSelectNode().getId().getPath();\r
535329b5 2607 openPlatform(path);\r
2608 return;\r
ed1665f2 2609 }\r
a13899c5 2610 }\r
535329b5 2611 \r
ed1665f2 2612 //\r
2613 // Show editor panel\r
2614 //\r
2615 if (intCategory >= IDefaultMutableTreeNode.MSA_HEADER && intCategory < IDefaultMutableTreeNode.SPD_HEADER) {\r
2616 showModuleElement(intCategory, openingModuleList.getOpeningModuleById(id));\r
2617 this.currentOpeningModuleIndex = openingModuleList.findIndexOfListById(id);\r
2618 }\r
2619 if (intCategory >= IDefaultMutableTreeNode.SPD_HEADER\r
2620 && intCategory < IDefaultMutableTreeNode.FPD_PLATFORMHEADER) {\r
2621 showPackageElement(intCategory, openingPackageList.getOpeningPackageById(id));\r
2622 this.currentOpeningPackageIndex = openingPackageList.findIndexOfListById(id);\r
2623 }\r
2624 if (intCategory >= IDefaultMutableTreeNode.FPD_PLATFORMHEADER) {\r
2625 showPlatformElement(intCategory, openingPlatformList.getOpeningPlatformById(id));\r
2626 this.currentOpeningPlatformIndex = openingPlatformList.findIndexOfListById(id);\r
2627 }\r
2628 } catch (RuntimeException e) {\r
2629 Log.log("double click category: " + intCategory);\r
535329b5 2630 Log.log("double click id path: " + id);\r
ed1665f2 2631 Log.log("double click exception: " + e.getMessage());\r
a13899c5 2632 }\r
2633 }\r
2634\r
2635 /**\r
2636 Show content of editor panel via selected element\r
2637 \r
2638 @param elementType\r
2639 @param fpd\r
2640 \r
92e29378 2641 **/\r
a13899c5 2642 private void showPlatformElement(int elementType, OpeningPlatformType fpd) {\r
2643 this.cleanDesktopPanePlatform();\r
92e29378 2644\r
a13899c5 2645 switch (elementType) {\r
2646 case IDefaultMutableTreeNode.FPD_PLATFORMDEFINITIONS:\r
d6d24759 2647 FpdPlatformDefs frmFpdPlatformDefs = new FpdPlatformDefs(fpd);\r
a13899c5 2648 getJDesktopPanePlatform().add(frmFpdPlatformDefs, 1);\r
2649 break;\r
2650 case IDefaultMutableTreeNode.FPD_PLATFORMHEADER:\r
d6d24759 2651 FpdHeader frmFpdHeader = new FpdHeader(fpd);\r
a13899c5 2652 getJDesktopPanePlatform().add(frmFpdHeader, 1);\r
2653 break;\r
2654 case IDefaultMutableTreeNode.FPD_FLASH:\r
d6d24759 2655 FpdFlash frmFpdFlash = new FpdFlash(fpd);\r
a13899c5 2656 getJDesktopPanePlatform().add(frmFpdFlash, 1);\r
2657 break;\r
2658 case IDefaultMutableTreeNode.FPD_FRAMEWORKMODULES:\r
d6d24759 2659 FpdFrameworkModules frmFpdFrameworkModules = new FpdFrameworkModules(fpd);\r
a13899c5 2660 getJDesktopPanePlatform().add(frmFpdFrameworkModules, 1);\r
2661 break;\r
2662 case IDefaultMutableTreeNode.FPD_PCDDYNAMICBUILDDECLARATIONS:\r
d6d24759 2663 FpdDynamicPcdBuildDefinitions frmFpdDynamicPcdBuildDefinitions = new FpdDynamicPcdBuildDefinitions(fpd);\r
a13899c5 2664 getJDesktopPanePlatform().add(frmFpdDynamicPcdBuildDefinitions, 1);\r
2665 break;\r
2666 case IDefaultMutableTreeNode.FPD_BUILDOPTIONS:\r