3 The file is used to let user choose to create module in an existing package
4 or to create a new package first.
6 Copyright (c) 2006, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 package org
.tianocore
.frameworkwizard
;
18 import java
.awt
.Component
;
19 import java
.awt
.event
.ActionEvent
;
21 import java
.util
.Vector
;
23 import javax
.swing
.ButtonGroup
;
24 import javax
.swing
.JButton
;
25 import javax
.swing
.JComboBox
;
26 import javax
.swing
.JFileChooser
;
27 import javax
.swing
.JLabel
;
28 import javax
.swing
.JPanel
;
29 import javax
.swing
.JTextField
;
31 import org
.tianocore
.ModuleTypeDef
;
32 import org
.tianocore
.MsaHeaderDocument
;
33 import org
.tianocore
.SpdHeaderDocument
;
34 import org
.tianocore
.ModuleSurfaceAreaDocument
.ModuleSurfaceArea
;
35 import org
.tianocore
.PackageSurfaceAreaDocument
.PackageSurfaceArea
;
36 import org
.tianocore
.PlatformHeaderDocument
.PlatformHeader
;
37 import org
.tianocore
.PlatformSurfaceAreaDocument
.PlatformSurfaceArea
;
38 import org
.tianocore
.frameworkwizard
.common
.DataType
;
39 import org
.tianocore
.frameworkwizard
.common
.DataValidation
;
40 import org
.tianocore
.frameworkwizard
.common
.GlobalData
;
41 import org
.tianocore
.frameworkwizard
.common
.IFileFilter
;
42 import org
.tianocore
.frameworkwizard
.common
.Log
;
43 import org
.tianocore
.frameworkwizard
.common
.SaveFile
;
44 import org
.tianocore
.frameworkwizard
.common
.Tools
;
45 import org
.tianocore
.frameworkwizard
.common
.ui
.IDialog
;
46 import org
.tianocore
.frameworkwizard
.common
.ui
.IFrame
;
47 import org
.tianocore
.frameworkwizard
.common
.ui
.StarLabel
;
48 import org
.tianocore
.frameworkwizard
.module
.Identifications
.ModuleIdentification
;
49 import org
.tianocore
.frameworkwizard
.packaging
.PackageIdentification
;
50 import org
.tianocore
.frameworkwizard
.platform
.PlatformIdentification
;
51 import org
.tianocore
.frameworkwizard
.workspace
.Workspace
;
52 import org
.tianocore
.frameworkwizard
.workspace
.WorkspaceTools
;
53 import javax
.swing
.JRadioButton
;
55 public class SelectModuleBelong
extends IDialog
{
61 private static final long serialVersionUID
= 4171355136991448972L;
63 private JPanel jContentPane
= null;
65 private JComboBox jComboBoxExistingPackage
= null;
67 private JButton jButtonOk
= null;
69 private JButton jButtonCancel
= null;
71 private Vector
<PackageIdentification
> packages
= null;
73 private JLabel jLabelPackage
= null;
75 private JLabel jLabelFilePath
= null;
77 private JTextField jTextFieldFilePath
= null;
79 private JButton jButtonBrowse
= null;
81 private JLabel jLabelName
= null;
83 private JTextField jTextFieldName
= null;
85 private JLabel jLabelGuid
= null;
87 private JTextField jTextFieldGuid
= null;
89 private JButton jButtonGen
= null;
91 private JLabel jLabelVersion
= null;
93 private JTextField jTextFieldVersion
= null;
95 private StarLabel jStarLabel1
= null;
97 private StarLabel jStarLabel2
= null;
99 private StarLabel jStarLabel3
= null;
101 private StarLabel jStarLabel4
= null;
103 private StarLabel jStarLabel5
= null;
105 private ButtonGroup bg
= new ButtonGroup();
107 private WorkspaceTools wt
= new WorkspaceTools();
109 private ModuleIdentification mid
= null;
111 private PackageIdentification pid
= null;
113 private PlatformIdentification fid
= null;
115 private ModuleSurfaceArea msa
= null;
117 private PackageSurfaceArea spd
= null;
119 private PlatformSurfaceArea fpd
= null;
121 private int mode
= -1;
123 private JLabel jLabelIsLibrary
= null;
125 private JRadioButton jRadioButtonYes
= null;
127 private JRadioButton jRadioButtonNo
= null;
130 * This method initializes jComboBoxExistingPackage
132 * @return javax.swing.JComboBox
134 private JComboBox
getJComboBoxExistingPackage() {
135 if (jComboBoxExistingPackage
== null) {
136 jComboBoxExistingPackage
= new JComboBox();
137 jComboBoxExistingPackage
.setBounds(new java
.awt
.Rectangle(140, 10, 340, 20));
139 return jComboBoxExistingPackage
;
143 * This method initializes jButtonNext
145 * @return javax.swing.JButton
147 private JButton
getJButtonOk() {
148 if (jButtonOk
== null) {
149 jButtonOk
= new JButton();
150 jButtonOk
.setBounds(new java
.awt
.Rectangle(310, 165, 80, 20));
151 jButtonOk
.setText("Ok");
152 jButtonOk
.addActionListener(this);
158 * This method initializes jButtonCancel
160 * @return javax.swing.JButton
162 private JButton
getJButtonCancel() {
163 if (jButtonCancel
== null) {
164 jButtonCancel
= new JButton();
165 jButtonCancel
.setBounds(new java
.awt
.Rectangle(395, 165, 80, 20));
166 jButtonCancel
.setText("Cancel");
167 jButtonCancel
.addActionListener(this);
169 return jButtonCancel
;
173 * This method initializes jTextFieldFilePath
175 * @return javax.swing.JTextField
177 private JTextField
getJTextFieldFilePath() {
178 if (jTextFieldFilePath
== null) {
179 jTextFieldFilePath
= new JTextField();
180 jTextFieldFilePath
.setBounds(new java
.awt
.Rectangle(140, 60, 250, 20));
182 return jTextFieldFilePath
;
186 * This method initializes jButtonBrowse
188 * @return javax.swing.JButton
190 private JButton
getJButtonBrowse() {
191 if (jButtonBrowse
== null) {
192 jButtonBrowse
= new JButton();
193 jButtonBrowse
.setBounds(new java
.awt
.Rectangle(395, 60, 85, 20));
194 jButtonBrowse
.setText("Browse");
195 jButtonBrowse
.addActionListener(this);
197 return jButtonBrowse
;
201 * This method initializes jTextFieldModuleName
203 * @return javax.swing.JTextField
205 private JTextField
getJTextFieldName() {
206 if (jTextFieldName
== null) {
207 jTextFieldName
= new JTextField();
208 jTextFieldName
.setBounds(new java
.awt
.Rectangle(140, 85, 340, 20));
210 return jTextFieldName
;
214 * This method initializes jTextFieldGuid
216 * @return javax.swing.JTextField
218 private JTextField
getJTextFieldGuid() {
219 if (jTextFieldGuid
== null) {
220 jTextFieldGuid
= new JTextField();
221 jTextFieldGuid
.setBounds(new java
.awt
.Rectangle(140, 110, 250, 20));
223 return jTextFieldGuid
;
227 * This method initializes jButtonGen
229 * @return javax.swing.JButton
231 private JButton
getJButtonGen() {
232 if (jButtonGen
== null) {
233 jButtonGen
= new JButton();
234 jButtonGen
.setBounds(new java
.awt
.Rectangle(395, 110, 85, 20));
235 jButtonGen
.setText("GEN");
236 jButtonGen
.addActionListener(this);
242 * This method initializes jTextFieldVersion
244 * @return javax.swing.JTextField
246 private JTextField
getJTextFieldVersion() {
247 if (jTextFieldVersion
== null) {
248 jTextFieldVersion
= new JTextField();
249 jTextFieldVersion
.setBounds(new java
.awt
.Rectangle(140, 135, 340, 20));
251 return jTextFieldVersion
;
255 * This method initializes jRadioButtonYes
257 * @return javax.swing.JRadioButton
259 private JRadioButton
getJRadioButtonYes() {
260 if (jRadioButtonYes
== null) {
261 jRadioButtonYes
= new JRadioButton();
262 jRadioButtonYes
.setBounds(new java
.awt
.Rectangle(140, 35, 100, 20));
263 jRadioButtonYes
.setSelected(false);
264 jRadioButtonYes
.setText("Yes");
266 return jRadioButtonYes
;
270 * This method initializes jRadioButtonNo
272 * @return javax.swing.JRadioButton
274 private JRadioButton
getJRadioButtonNo() {
275 if (jRadioButtonNo
== null) {
276 jRadioButtonNo
= new JRadioButton();
277 jRadioButtonNo
.setBounds(new java
.awt
.Rectangle(300, 35, 110, 20));
278 jRadioButtonNo
.setSelected(true);
279 jRadioButtonNo
.setText("No");
281 return jRadioButtonNo
;
287 public static void main(String
[] args
) {
288 SelectModuleBelong smb
= new SelectModuleBelong();
289 smb
.setVisible(true);
293 * This is the default constructor
295 public SelectModuleBelong() {
301 * This is the default constructor
303 public SelectModuleBelong(IFrame parentFrame
, boolean modal
, int fileType
) {
304 super(parentFrame
, modal
);
305 this.mode
= fileType
;
307 initExistingPackage();
308 if (mode
!= DataType
.RETURN_TYPE_MODULE_SURFACE_AREA
) {
309 this.jStarLabel1
.setVisible(false);
310 this.jLabelPackage
.setVisible(false);
311 this.jComboBoxExistingPackage
.setVisible(false);
312 this.jLabelIsLibrary
.setVisible(false);
313 this.jRadioButtonYes
.setVisible(false);
314 this.jRadioButtonNo
.setVisible(false);
315 upLocation(this.jStarLabel2
, 50);
316 upLocation(this.jStarLabel3
, 50);
317 upLocation(this.jStarLabel4
, 50);
318 upLocation(this.jStarLabel5
, 50);
319 upLocation(this.jLabelFilePath
, 50);
320 upLocation(this.jLabelName
, 50);
321 upLocation(this.jLabelGuid
, 50);
322 upLocation(this.jLabelVersion
, 50);
323 upLocation(this.jTextFieldFilePath
, 50);
324 upLocation(this.jTextFieldName
, 50);
325 upLocation(this.jTextFieldGuid
, 50);
326 upLocation(this.jTextFieldVersion
, 50);
327 upLocation(this.jButtonBrowse
, 50);
328 upLocation(this.jButtonGen
, 50);
333 * This method initializes this
337 private void init() {
338 this.setSize(500, 230);
339 this.setContentPane(getJContentPane());
340 this.setTitle("New");
345 * This method initializes jContentPane
347 * @return javax.swing.JPanel
349 private JPanel
getJContentPane() {
350 if (jContentPane
== null) {
351 jLabelIsLibrary
= new JLabel();
352 jLabelIsLibrary
.setBounds(new java
.awt
.Rectangle(15, 35, 120, 20));
353 jLabelIsLibrary
.setText("Is this a Library");
354 jLabelVersion
= new JLabel();
355 jLabelVersion
.setBounds(new java
.awt
.Rectangle(15, 135, 120, 20));
356 jLabelVersion
.setText("Version");
357 jLabelGuid
= new JLabel();
358 jLabelGuid
.setBounds(new java
.awt
.Rectangle(15, 110, 120, 20));
359 jLabelGuid
.setText("Guid");
360 jLabelName
= new JLabel();
361 jLabelName
.setBounds(new java
.awt
.Rectangle(15, 85, 120, 20));
362 jLabelName
.setText("Module Name");
363 jLabelFilePath
= new JLabel();
364 jLabelFilePath
.setBounds(new java
.awt
.Rectangle(15, 60, 120, 20));
365 jLabelFilePath
.setText("File Path");
366 jLabelPackage
= new JLabel();
367 jLabelPackage
.setBounds(new java
.awt
.Rectangle(15, 10, 120, 20));
368 jLabelPackage
.setText("Choose a Package");
369 jContentPane
= new JPanel();
370 jContentPane
.setLayout(null);
371 jContentPane
.setSize(new java
.awt
.Dimension(490, 198));
372 jContentPane
.add(getJComboBoxExistingPackage(), null);
373 jContentPane
.add(getJButtonOk(), null);
374 jContentPane
.add(getJButtonCancel(), null);
375 jContentPane
.add(jLabelPackage
, null);
376 jContentPane
.add(jLabelFilePath
, null);
377 jContentPane
.add(getJTextFieldFilePath(), null);
378 jContentPane
.add(getJButtonBrowse(), null);
379 jContentPane
.add(jLabelName
, null);
380 jContentPane
.add(getJTextFieldName(), null);
381 jContentPane
.add(jLabelGuid
, null);
382 jContentPane
.add(getJTextFieldGuid(), null);
383 jContentPane
.add(getJButtonGen(), null);
384 jContentPane
.add(jLabelVersion
, null);
385 jContentPane
.add(getJTextFieldVersion(), null);
387 jStarLabel1
= new StarLabel();
388 jStarLabel1
.setLocation(new java
.awt
.Point(0, 10));
389 jStarLabel2
= new StarLabel();
390 jStarLabel2
.setLocation(new java
.awt
.Point(0, 60));
391 jStarLabel3
= new StarLabel();
392 jStarLabel3
.setLocation(new java
.awt
.Point(0, 85));
393 jStarLabel4
= new StarLabel();
394 jStarLabel4
.setLocation(new java
.awt
.Point(0, 110));
395 jStarLabel5
= new StarLabel();
396 jStarLabel5
.setLocation(new java
.awt
.Point(0, 135));
397 jContentPane
.add(jStarLabel1
, null);
398 jContentPane
.add(jStarLabel2
, null);
399 jContentPane
.add(jStarLabel3
, null);
400 jContentPane
.add(jStarLabel4
, null);
401 jContentPane
.add(jStarLabel5
, null);
402 jContentPane
.add(jLabelIsLibrary
, null);
403 jContentPane
.add(getJRadioButtonYes(), null);
404 jContentPane
.add(getJRadioButtonNo(), null);
405 bg
.add(getJRadioButtonNo());
406 bg
.add(getJRadioButtonYes());
412 Query all existing packages and fill them into combox
415 private void initExistingPackage() {
416 packages
= wt
.getAllPackages();
417 for (int index
= 0; index
< packages
.size(); index
++) {
418 this.jComboBoxExistingPackage
.addItem(packages
.elementAt(index
).getName());
423 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
425 * Override actionPerformed to listen all actions
427 public void actionPerformed(ActionEvent arg0
) {
428 if (arg0
.getSource() == jButtonCancel
) {
429 this.setVisible(false);
430 this.returnType
= DataType
.RETURN_TYPE_CANCEL
;
433 if (arg0
.getSource() == jButtonOk
) {
439 this.setVisible(false);
440 this.returnType
= DataType
.RETURN_TYPE_OK
;
443 if (arg0
.getSource() == this.jButtonGen
) {
444 this.jTextFieldGuid
.setText(Tools
.generateUuidString());
447 if (arg0
.getSource() == this.jButtonBrowse
) {
448 JFileChooser fc
= new JFileChooser();
449 fc
.setAcceptAllFileFilterUsed(false);
451 if (mode
== DataType
.RETURN_TYPE_MODULE_SURFACE_AREA
) {
452 fc
.setCurrentDirectory(new File(packages
.elementAt(this.jComboBoxExistingPackage
.getSelectedIndex())
454 fc
.addChoosableFileFilter(new IFileFilter(DataType
.MODULE_SURFACE_AREA_EXT
));
456 if (mode
== DataType
.RETURN_TYPE_PACKAGE_SURFACE_AREA
) {
457 fc
.setCurrentDirectory(new File(Workspace
.getCurrentWorkspace()));
458 fc
.addChoosableFileFilter(new IFileFilter(DataType
.PACKAGE_SURFACE_AREA_EXT
));
460 if (mode
== DataType
.RETURN_TYPE_PLATFORM_SURFACE_AREA
) {
461 fc
.setCurrentDirectory(new File(Workspace
.getCurrentWorkspace()));
462 fc
.addChoosableFileFilter(new IFileFilter(DataType
.PLATFORM_SURFACE_AREA_EXT
));
464 int result
= fc
.showSaveDialog(new JPanel());
465 if (result
== JFileChooser
.APPROVE_OPTION
) {
466 this.jTextFieldFilePath
.setText(Tools
.addPathExt(fc
.getSelectedFile().getPath(), mode
));
472 Data validation for all fields
474 @retval true - All datas are valid
475 @retval false - At least one data is invalid
478 public boolean check() {
479 String path
= this.jTextFieldFilePath
.getText();
480 String guid
= this.jTextFieldGuid
.getText();
481 String version
= this.jTextFieldVersion
.getText();
484 // Check if all required fields are not empty
487 Log
.wrn("New File", "A File Path must be entered!");
490 if (isEmpty(this.jTextFieldName
.getText())) {
491 Log
.wrn("New File", "A Name must be entered");
495 Log
.wrn("New File", "The Guid must be entered!");
498 if (isEmpty(version
)) {
499 Log
.wrn("New File", "A Version number must be entered!");
504 // Check if all fields have correct data types
506 if (!DataValidation
.isBaseName(this.jTextFieldName
.getText())) {
507 Log
.wrn("New File", "Incorrect data type for the Name!");
510 if (!DataValidation
.isGuid((guid
))) {
511 Log
.wrn("New File", "Incorrect data type for Guid, which must be in registry format! (8-4-4-4-12)");
517 if (mode
== DataType
.RETURN_TYPE_MODULE_SURFACE_AREA
) {
519 // Check if the module is already existed in current package
521 String packagePath
= packages
.elementAt(this.jComboBoxExistingPackage
.getSelectedIndex()).getPath();
522 String modulePath
= Tools
.convertPathToCurrentOsType(path
);
523 Vector
<String
> msaFile
= wt
.getAllModulesOfPackage(packagePath
);
525 for (int index
= 0; index
< msaFile
.size(); index
++) {
526 if (msaFile
.elementAt(index
).equals(modulePath
)) {
527 Log
.wrn("New File", "This module is already exists in the selected package!");
533 // Check if path already exists
535 if (GlobalData
.isDuplicateRelativePath(Tools
.getFilePathOnly(modulePath
), mode
)) {
536 Log
.wrn("New File", "There already exists a same directory with a module");
541 // Check if Guid+Version is unique
543 String packageGuid
= packages
.elementAt(this.jComboBoxExistingPackage
.getSelectedIndex()).getGuid();
544 String packageVersion
= packages
.elementAt(this.jComboBoxExistingPackage
.getSelectedIndex()).getVersion();
545 if (GlobalData
.findModuleId(guid
, version
, packageGuid
, packageVersion
) != null) {
546 Log
.wrn("New File", "A module with same Guid and same Version already exists, please selece a new Guid or Version!");
551 if (mode
== DataType
.RETURN_TYPE_PACKAGE_SURFACE_AREA
) {
553 // Check if the package is already existed in database
555 path
= Tools
.convertPathToCurrentOsType(path
);
556 Vector
<PackageIdentification
> vPackageList
= wt
.getAllPackages();
557 if (vPackageList
!= null && vPackageList
.size() > 0) {
558 for (int index
= 0; index
< vPackageList
.size(); index
++) {
559 if (vPackageList
.get(index
).getPath().equals(path
)) {
560 Log
.wrn("New File", "This package is already exists in this workspace!");
567 // Check if path already exists
569 if (GlobalData
.isDuplicateRelativePath(Tools
.getFilePathOnly(path
), mode
)) {
570 Log
.wrn("New File", "There already exists a same directory with a package");
575 // Check if Guid+Version is unique
577 if (GlobalData
.findPackageId(guid
, version
) != null) {
578 Log
.wrn("New File", "A package with same Guid and same Version already exists, please selece a new Guid or Version!");
583 if (mode
== DataType
.RETURN_TYPE_PLATFORM_SURFACE_AREA
) {
585 // Check if the platform is already existed in database
587 path
= Tools
.convertPathToCurrentOsType(path
);
588 Vector
<PlatformIdentification
> vPlatfromList
= wt
.getAllPlatforms();
589 if (vPlatfromList
!= null && vPlatfromList
.size() > 0) {
590 for (int index
= 0; index
< vPlatfromList
.size(); index
++) {
591 if (vPlatfromList
.get(index
).getPath().equals(path
)) {
592 Log
.wrn("New File", "This platform is already exists in this workspace!");
599 // Check if path already exists
601 if (GlobalData
.isDuplicateRelativePath(Tools
.getFilePathOnly(path
), mode
)) {
602 Log
.wrn("New File", "There already exists a same directory with a platform");
607 // Check if Guid+Version is unique
609 if (GlobalData
.findPlatformId(guid
, version
) != null) {
610 Log
.wrn("New File", "A platform with same Guid and same Version already exists, please selece a new Guid or Version!");
623 if (mode
== DataType
.RETURN_TYPE_MODULE_SURFACE_AREA
) {
626 if (mode
== DataType
.RETURN_TYPE_PACKAGE_SURFACE_AREA
) {
629 if (mode
== DataType
.RETURN_TYPE_PLATFORM_SURFACE_AREA
) {
635 Save all components of Msa Header
638 private void saveModule() {
640 String path
= Tools
.convertPathToCurrentOsType(this.jTextFieldFilePath
.getText());
646 MsaHeaderDocument
.MsaHeader msaHeader
= null;
648 msa
= ModuleSurfaceArea
.Factory
.newInstance();
649 msaHeader
= MsaHeaderDocument
.MsaHeader
.Factory
.newInstance();
651 msaHeader
.setModuleName(this.jTextFieldName
.getText());
652 msaHeader
.setGuidValue(this.jTextFieldGuid
.getText());
653 msaHeader
.setVersion(this.jTextFieldVersion
.getText());
654 msaHeader
.setModuleType(ModuleTypeDef
.BASE
);
656 msa
.setMsaHeader(msaHeader
);
657 } catch (Exception e
) {
658 Log
.err("Save ModuleSurfaceArea Document", e
.getMessage());
666 SaveFile
.saveMsaFile(path
, msa
);
667 } catch (Exception e
) {
668 Log
.wrn("Save Module to file system", e
.getMessage());
669 Log
.err("Save Module to file system", e
.getMessage());
674 // Save to identification
676 mid
= new ModuleIdentification(this.jTextFieldName
.getText(), this.jTextFieldGuid
.getText(),
677 this.jTextFieldVersion
.getText(), path
, jRadioButtonYes
.isSelected());
678 mid
.setPackageId(packages
.elementAt(this.jComboBoxExistingPackage
.getSelectedIndex()));
682 Save all components of Spd Header
685 private void savePackage() {
687 String path
= Tools
.convertPathToCurrentOsType(this.jTextFieldFilePath
.getText());
693 SpdHeaderDocument
.SpdHeader spdHeader
= null;
695 spd
= PackageSurfaceArea
.Factory
.newInstance();
696 spdHeader
= SpdHeaderDocument
.SpdHeader
.Factory
.newInstance();
698 spdHeader
.setPackageName(this.jTextFieldName
.getText());
699 spdHeader
.setGuidValue(this.jTextFieldGuid
.getText());
700 spdHeader
.setVersion(this.jTextFieldVersion
.getText());
702 spd
.setSpdHeader(spdHeader
);
703 } catch (Exception e
) {
704 Log
.wrn("Save Package Surface Area Description Document", e
.getMessage());
712 SaveFile
.saveSpdFile(path
, spd
);
714 } catch (Exception e
) {
715 Log
.wrn("Save Package to file system", e
.getMessage());
716 Log
.err("Save Package to file system", e
.getMessage());
721 // Save to identification
723 pid
= new PackageIdentification(this.jTextFieldName
.getText(), this.jTextFieldGuid
.getText(),
724 this.jTextFieldVersion
.getText(), path
);
728 Save all components of Fpd Header
731 private void savePlatform() {
733 String path
= Tools
.convertPathToCurrentOsType(this.jTextFieldFilePath
.getText());
739 PlatformHeader fpdHeader
= null;
741 fpd
= PlatformSurfaceArea
.Factory
.newInstance();
742 fpdHeader
= PlatformHeader
.Factory
.newInstance();
744 fpdHeader
.setPlatformName(this.jTextFieldName
.getText());
745 fpdHeader
.setGuidValue(this.jTextFieldGuid
.getText());
746 fpdHeader
.setVersion(this.jTextFieldVersion
.getText());
748 fpd
.setPlatformHeader(fpdHeader
);
749 } catch (Exception e
) {
750 Log
.wrn("Save Framework Platform Description Document", e
.getMessage());
758 SaveFile
.saveFpdFile(path
, fpd
);
760 } catch (Exception e
) {
761 Log
.wrn("Save Platform to file system", e
.getMessage());
762 Log
.err("Save Platform to file system", e
.getMessage());
767 // Save to identification
769 fid
= new PlatformIdentification(this.jTextFieldName
.getText(), this.jTextFieldGuid
.getText(),
770 this.jTextFieldVersion
.getText(), path
);
773 public ModuleIdentification
getMid() {
777 public PlatformIdentification
getFid() {
781 public PackageIdentification
getPid() {
785 private void upLocation(Component c
, int size
) {
786 c
.setLocation(c
.getLocation().x
, c
.getLocation().y
- size
);
789 public PlatformSurfaceArea
getFpd() {
793 public ModuleSurfaceArea
getMsa() {
797 public PackageSurfaceArea
getSpd() {