From 79cb6fdbc073e47380880d84c3eef43bef0c0826 Mon Sep 17 00:00:00 2001 From: hche10x Date: Wed, 5 Jul 2006 02:07:26 +0000 Subject: [PATCH] 1. Restructure some folders and files 2. Adjust the arithmetic of "Clone" function 3. Add image in "About" frame git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@750 6f19259b-4bc3-4df7-8a09-765794883524 --- .../org/tianocore/frameworkwizard/About.java | 21 +- .../org/tianocore/frameworkwizard/Clone.java | 81 +++++- .../frameworkwizard/FrameworkWizardUI.java | 50 +++- .../frameworkwizard/SelectModuleBelong.java | 6 +- .../frameworkwizard/ToolChainConfig.java | 265 ++++++++++++++++++ .../frameworkwizard/common/FileOperation.java | 16 +- .../Identifications/Identification.java | 93 ++++++ .../common/Identifications/OpenFile.java | 96 +++++++ .../Identifications/OpeningFileType.java | 78 ++++++ .../Identifications/OpeningModuleList.java | 167 +++++++++++ .../Identifications/OpeningModuleType.java | 49 ++++ .../Identifications/OpeningPackageList.java | 168 +++++++++++ .../Identifications/OpeningPackageType.java | 48 ++++ .../Identifications/OpeningPlatformList.java | 170 +++++++++++ .../Identifications/OpeningPlatformType.java | 48 ++++ .../Identifications/ToolChainConfigId.java | 55 ++++ .../ToolChainConfigVector.java | 137 +++++++++ .../frameworkwizard/common/Tools.java | 39 ++- .../common/ui/IDefaultMutableTreeNode.java | 2 +- .../frameworkwizard/common/ui/ITree.java | 2 +- .../BootModes/BootModesIdentification.java | 2 +- .../BootModes/BootModesVector.java | 2 +- .../DataHubs/DataHubsIdentification.java | 2 +- .../DataHubs/DataHubsVector.java | 2 +- .../Events/EventsIdentification.java | 2 +- .../Events/EventsVector.java | 2 +- .../Externs/ExternsIdentification.java | 2 +- .../Externs/ExternsVector.java | 2 +- .../Guids/GuidsIdentification.java | 2 +- .../Guids/GuidsVector.java | 2 +- .../HiiPackagesIdentification.java | 2 +- .../HiiPackages/HiiPackagesVector.java | 2 +- .../Hobs/HobsIdentification.java | 2 +- .../Hobs/HobsVector.java | 2 +- .../LibraryClassIdentification.java | 2 +- .../LibraryClass/LibraryClassVector.java | 2 +- .../ModuleIdentification.java | 4 +- .../PackageDependenciesIdentification.java | 2 +- .../PackageDependenciesVector.java | 2 +- .../PcdCoded/PcdCodedIdentification.java | 2 +- .../PcdCoded/PcdCodedVector.java | 2 +- .../Ppis/PpisIdentification.java | 2 +- .../Ppis/PpisVector.java | 2 +- .../Protocols/ProtocolsIdentification.java | 2 +- .../Protocols/ProtocolsVector.java | 2 +- .../SourceFilesIdentification.java | 2 +- .../SourceFiles/SourceFilesVector.java | 2 +- .../SystemTablesIdentification.java | 2 +- .../SystemTables/SystemTablesVector.java | 2 +- .../Variables/VariablesIdentification.java | 2 +- .../Variables/VariablesVector.java | 2 +- .../module/ui/ModuleBootModes.java | 6 +- .../module/ui/ModuleDataHubs.java | 7 +- .../module/ui/ModuleDefinitions.java | 6 +- .../module/ui/ModuleEvents.java | 42 +-- .../module/ui/ModuleExterns.java | 6 +- .../module/ui/ModuleGuids.java | 6 +- .../module/ui/ModuleHiiPackages.java | 7 +- .../frameworkwizard/module/ui/ModuleHobs.java | 41 +-- .../ui/ModuleLibraryClassDefinitions.java | 6 +- .../frameworkwizard/module/ui/ModulePCDs.java | 6 +- .../module/ui/ModulePackageDependencies.java | 6 +- .../frameworkwizard/module/ui/ModulePpis.java | 6 +- .../module/ui/ModuleProtocols.java | 7 +- .../module/ui/ModuleSourceFiles.java | 6 +- .../module/ui/ModuleSystemTables.java | 7 +- .../module/ui/ModuleVariables.java | 8 +- .../frameworkwizard/module/ui/MsaHeader.java | 2 +- .../packaging/PackageIdentification.java | 2 +- .../platform/PlatformIdentification.java | 2 +- .../workspace/WorkspaceTools.java | 93 +++++- 71 files changed, 1746 insertions(+), 181 deletions(-) create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/ToolChainConfig.java create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/Identification.java create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpenFile.java create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningFileType.java create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleList.java create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleType.java create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageList.java create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageType.java create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformList.java create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformType.java create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigId.java create mode 100644 Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigVector.java rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/BootModes/BootModesIdentification.java (92%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/BootModes/BootModesVector.java (94%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/DataHubs/DataHubsIdentification.java (92%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/DataHubs/DataHubsVector.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Events/EventsIdentification.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Events/EventsVector.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Externs/ExternsIdentification.java (92%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Externs/ExternsVector.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Guids/GuidsIdentification.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Guids/GuidsVector.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/HiiPackages/HiiPackagesIdentification.java (92%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/HiiPackages/HiiPackagesVector.java (94%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Hobs/HobsIdentification.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Hobs/HobsVector.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/LibraryClass/LibraryClassIdentification.java (94%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/LibraryClass/LibraryClassVector.java (94%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/ModuleIdentification.java (91%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/PackageDependencies/PackageDependenciesIdentification.java (92%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/PackageDependencies/PackageDependenciesVector.java (94%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/PcdCoded/PcdCodedIdentification.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/PcdCoded/PcdCodedVector.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Ppis/PpisIdentification.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Ppis/PpisVector.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Protocols/ProtocolsIdentification.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Protocols/ProtocolsVector.java (94%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/SourceFiles/SourceFilesIdentification.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/SourceFiles/SourceFilesVector.java (94%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/SystemTables/SystemTablesIdentification.java (92%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/SystemTables/SystemTablesVector.java (94%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Variables/VariablesIdentification.java (93%) rename Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/{Identification => Identifications}/Variables/VariablesVector.java (94%) diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/About.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/About.java index 0e4cfd2a98..c27ba89ed7 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/About.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/About.java @@ -25,6 +25,7 @@ import javax.swing.JPanel; import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.ui.IDialog; import org.tianocore.frameworkwizard.common.ui.IFrame; +import javax.swing.ImageIcon; /** The class is used to show a about window with copyright information @@ -51,6 +52,8 @@ public class About extends IDialog { private JButton jButtonOK = null; + private JLabel jLabelImage = null; + /** This method initializes jButtonOK @@ -60,7 +63,7 @@ public class About extends IDialog { private JButton getJButtonOK() { if (jButtonOK == null) { jButtonOK = new JButton(); - jButtonOK.setBounds(new java.awt.Rectangle(105, 120, 90, 20)); + jButtonOK.setBounds(new java.awt.Rectangle(115,200,90,20)); jButtonOK.setText("OK"); jButtonOK.addActionListener(this); } @@ -95,7 +98,7 @@ public class About extends IDialog { **/ private void init() { - this.setSize(300, 200); + this.setSize(320, 265); this.setContentPane(getJContentPane()); this.setTitle("About"); this.getRootPane().setDefaultButton(jButtonOK); @@ -110,25 +113,31 @@ public class About extends IDialog { **/ private JPanel getJContentPane() { if (jContentPane == null) { + jLabelImage = new JLabel(); + jLabelImage.setBounds(new java.awt.Rectangle(63,20,193,58)); + jLabelImage.setIcon(new ImageIcon(getClass().getResource("/resources/images/logo.gif"))); + jLabel2 = new JLabel(); - jLabel2.setBounds(new java.awt.Rectangle(15, 80, 270, 20)); + jLabel2.setBounds(new java.awt.Rectangle(25,160,270,20)); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("All rights reserved"); jLabel1 = new JLabel(); - jLabel1.setBounds(new java.awt.Rectangle(15, 50, 270, 20)); + jLabel1.setBounds(new java.awt.Rectangle(25,130,270,20)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Copyright (c) 2006, Intel Corporation"); jLabel = new JLabel(); jLabel.setToolTipText(""); - jLabel.setBounds(new java.awt.Rectangle(15, 20, 270, 20)); + jLabel.setBounds(new java.awt.Rectangle(25,90,270,20)); jLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - jLabel.setText("Framework Development Package System 1.0"); + jLabel.setText("Framework Wizard 1.0"); jContentPane = new JPanel(); jContentPane.setLayout(null); + jContentPane.setSize(new java.awt.Dimension(320,235)); jContentPane.add(jLabel, null); jContentPane.add(jLabel1, null); jContentPane.add(jLabel2, null); jContentPane.add(getJButtonOK(), null); + jContentPane.add(jLabelImage, null); } return jContentPane; } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java index baf03795ee..09e8f6d00f 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java @@ -17,6 +17,7 @@ package org.tianocore.frameworkwizard; import java.awt.event.ActionEvent; import java.io.File; import java.io.IOException; +import java.math.BigInteger; import java.util.Vector; import javax.swing.JFileChooser; @@ -36,14 +37,14 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.FileOperation; import org.tianocore.frameworkwizard.common.IFileFilter; -import org.tianocore.frameworkwizard.common.Identification; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpenFile; import org.tianocore.frameworkwizard.common.SaveFile; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.Identification; +import org.tianocore.frameworkwizard.common.Identifications.OpenFile; import org.tianocore.frameworkwizard.common.ui.IDialog; import org.tianocore.frameworkwizard.common.ui.IFrame; -import org.tianocore.frameworkwizard.module.Identification.ModuleIdentification; +import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification; import org.tianocore.frameworkwizard.packaging.PackageIdentification; import org.tianocore.frameworkwizard.platform.PlatformIdentification; import org.tianocore.frameworkwizard.workspace.Workspace; @@ -589,6 +590,20 @@ public class Clone extends IDialog { // Check for Module // if (mode == DataType.RETURN_TYPE_MODULE_SURFACE_AREA) { +// if (trg.indexOf(DataType.DOS_FILE_SEPARATOR) == -1 && trg.indexOf(DataType.UNIX_FILE_SEPARATOR) == -1) { +// Log.err("The module name must include a path"); +// return false; +// } + trg = this.getModulePath(); + if (src.equals(trg)) { + Log.err("The source and destination couldn't be same"); + return false; + } + trgFile = new File(trg); + if (trgFile.exists()) { + Log.err("The target module already exists"); + return false; + } return checkId(); } @@ -635,6 +650,7 @@ public class Clone extends IDialog { private void save() throws IOException, XmlException, Exception { String src = this.jTextFieldSource.getText(); String trg = this.jTextFieldFilePath.getText(); + Vector vFiles = new Vector(); // // Clone Workspace @@ -659,16 +675,17 @@ public class Clone extends IDialog { // trg = getModulePath(); newId.setPath(trg); + vFiles = wt.getAllModuleFiles(src); // // First copy all files to new directory // - FileOperation.copyFolder(Tools.getFilePathOnly(src), Tools.getFilePathOnly(trg)); - - // - // Delete old spd file - // - FileOperation.delFile(Tools.getFilePathOnly(trg) + DataType.FILE_SEPARATOR + Tools.getFileNameOnly(src)); + FileOperation.copyFile(src, trg); + for (int index = 1; index < vFiles.size(); index++) { + String oldFile = vFiles.get(index); + String newFile = vFiles.get(index).replace(Tools.getFilePathOnly(src), Tools.getFilePathOnly(trg)); + FileOperation.copyFile(oldFile, newFile); + } // // Create new msa file @@ -721,16 +738,24 @@ public class Clone extends IDialog { // trg = this.getPackagePath(); newId.setPath(trg); + vFiles = wt.getAllPakcageFiles(src); + + FileOperation.copyFile(src, trg); + for (int index = 1; index < vFiles.size(); index++) { + String oldFile = vFiles.get(index); + String newFile = vFiles.get(index).replace(Tools.getFilePathOnly(src), Tools.getFilePathOnly(trg)); + FileOperation.copyFile(oldFile, newFile); + } // // First copy all files to new directory // - FileOperation.copyFolder(Tools.getFilePathOnly(src), Tools.getFilePathOnly(trg)); + //FileOperation.copyFolder(Tools.getFilePathOnly(src), Tools.getFilePathOnly(trg)); // // Delete old spd file // - FileOperation.delFile(Tools.getFilePathOnly(trg) + DataType.FILE_SEPARATOR + Tools.getFileNameOnly(src)); + //FileOperation.delFile(Tools.getFilePathOnly(trg) + DataType.FILE_SEPARATOR + Tools.getFileNameOnly(src)); // // Create new spd file @@ -804,6 +829,7 @@ public class Clone extends IDialog { this.returnType = DataType.RETURN_TYPE_PLATFORM_SURFACE_AREA; } + vFiles = null; } private String getSelectPackagePath() { @@ -813,7 +839,7 @@ public class Clone extends IDialog { private String getModulePath() { String trg = this.jTextFieldFilePath.getText(); trg = Tools.addPathExt(trg, mode); - trg = getSelectPackagePath() + DataType.FILE_SEPARATOR + trg; + trg = Tools.addFileSeparator(getSelectPackagePath()) + trg; Tools.convertPathToCurrentOsType(trg); return trg; } @@ -821,7 +847,7 @@ public class Clone extends IDialog { private String getPackagePath() { String trg = this.jTextFieldFilePath.getText(); trg = Tools.addPathExt(trg, mode); - trg = Workspace.getCurrentWorkspace() + DataType.FILE_SEPARATOR + trg; + trg = Tools.addFileSeparator(Workspace.getCurrentWorkspace()) + trg; trg = Tools.convertPathToCurrentOsType(trg); return trg; } @@ -849,10 +875,18 @@ public class Clone extends IDialog { // Get ClonedFrom then // ModuleDefinitions.ClonedFrom cf = null; + BigInteger count = new BigInteger("-1"); if (pd.getClonedFrom() == null) { cf = ModuleDefinitions.ClonedFrom.Factory.newInstance(); } else { cf = pd.getClonedFrom(); + if (cf != null) { + for (int index = 0; index < cf.getClonedList().size(); index++) { + if (cf.getClonedList().get(index).getId() != null) { + count = count.max(cf.getClonedList().get(index).getId()); + } + } + } } // @@ -861,6 +895,9 @@ public class Clone extends IDialog { ModuleDefinitions.ClonedFrom.Cloned c = ModuleDefinitions.ClonedFrom.Cloned.Factory.newInstance(); c.setModuleGuid(id.getGuid()); c.setModuleVersion(id.getVersion()); + c.setPackageGuid(wt.getPackageIdByModuleId(oldId).getGuid()); + c.setPackageVersion(wt.getPackageIdByModuleId(oldId).getVersion()); + c.setId(count.add(new BigInteger("1"))); cf.addNewCloned(); cf.setClonedArray(cf.getClonedList().size() - 1, c); @@ -892,10 +929,18 @@ public class Clone extends IDialog { // Get ClonedFrom then // PackageDefinitions.ClonedFrom cf = null; + BigInteger count = new BigInteger("-1"); if (pd.getClonedFrom() == null) { cf = PackageDefinitions.ClonedFrom.Factory.newInstance(); } else { cf = pd.getClonedFrom(); + if (cf != null) { + for (int index = 0; index < cf.getClonedList().size(); index++) { + if (cf.getClonedList().get(index).getId() != null) { + count = count.max(cf.getClonedList().get(index).getId()); + } + } + } } // @@ -904,6 +949,7 @@ public class Clone extends IDialog { PackageDefinitions.ClonedFrom.Cloned c = PackageDefinitions.ClonedFrom.Cloned.Factory.newInstance(); c.setPackageGuid(id.getGuid()); c.setPackageVersion(id.getVersion()); + c.setId(count.add(new BigInteger("1"))); cf.addNewCloned(); cf.setClonedArray(cf.getClonedList().size() - 1, c); @@ -935,10 +981,18 @@ public class Clone extends IDialog { // Get ClonedFrom then // PlatformDefinitions.ClonedFrom cf = null; + BigInteger count = new BigInteger("-1"); if (pd.getClonedFrom() == null) { cf = PlatformDefinitions.ClonedFrom.Factory.newInstance(); } else { cf = pd.getClonedFrom(); + if (cf != null) { + for (int index = 0; index < cf.getClonedList().size(); index++) { + if (cf.getClonedList().get(index).getId() != null) { + count = count.max(cf.getClonedList().get(index).getId()); + } + } + } } // @@ -947,6 +1001,7 @@ public class Clone extends IDialog { PlatformDefinitions.ClonedFrom.Cloned c = PlatformDefinitions.ClonedFrom.Cloned.Factory.newInstance(); c.setPlatformGuid(id.getGuid()); c.setPlatformVersion(id.getVersion()); + c.setId(count.add(new BigInteger("1"))); cf.addNewCloned(); cf.setClonedArray(cf.getClonedList().size() - 1, c); diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java index 9748e5f5e4..e5d59195bc 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java @@ -49,22 +49,22 @@ import org.tianocore.PackageSurfaceAreaDocument; import org.tianocore.PlatformSurfaceAreaDocument; import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.IFileFilter; -import org.tianocore.frameworkwizard.common.Identification; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpenFile; -import org.tianocore.frameworkwizard.common.OpeningModuleList; -import org.tianocore.frameworkwizard.common.OpeningModuleType; -import org.tianocore.frameworkwizard.common.OpeningPackageList; -import org.tianocore.frameworkwizard.common.OpeningPackageType; -import org.tianocore.frameworkwizard.common.OpeningPlatformList; -import org.tianocore.frameworkwizard.common.OpeningPlatformType; import org.tianocore.frameworkwizard.common.SaveFile; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.Identification; +import org.tianocore.frameworkwizard.common.Identifications.OpenFile; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleList; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; +import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageList; +import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageType; +import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformList; +import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType; import org.tianocore.frameworkwizard.common.ui.IDefaultMutableTreeNode; import org.tianocore.frameworkwizard.common.ui.IDesktopManager; import org.tianocore.frameworkwizard.common.ui.IFrame; import org.tianocore.frameworkwizard.common.ui.ITree; -import org.tianocore.frameworkwizard.module.Identification.ModuleIdentification; +import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification; import org.tianocore.frameworkwizard.module.ui.ModuleBootModes; import org.tianocore.frameworkwizard.module.ui.ModuleDataHubs; import org.tianocore.frameworkwizard.module.ui.ModuleDefinitions; @@ -136,7 +136,9 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele private int currentOpeningPlatformIndex = -1; - private String windowTitle = "FrameworkWizard 1.0 "; + private String projectName = "FrameworkWizard"; + + private String projectVersion = "0.5"; private IDefaultMutableTreeNode dmtnRoot = null; @@ -772,7 +774,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele jMenuTools.setText("Tools"); jMenuTools.setMnemonic('T'); jMenuTools.add(getJMenuItemToolsToolChainConfiguration()); - //jMenuTools.addSeparator(); + jMenuTools.addSeparator(); jMenuTools.add(getJMenuItemToolsClone()); //jMenuTools.addSeparator(); jMenuTools.add(getJMenuItemToolsCodeScan()); @@ -1359,7 +1361,6 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele jMenuItemToolsToolChainConfiguration.setText("Tool Chain Configuration..."); jMenuItemToolsToolChainConfiguration.setMnemonic('C'); jMenuItemToolsToolChainConfiguration.addActionListener(this); - jMenuItemToolsToolChainConfiguration.setVisible(false); } return jMenuItemToolsToolChainConfiguration; } @@ -1689,8 +1690,9 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele this.addComponentListener(this); this.getCompontentsFromFrameworkDatabase(); this.setContentPane(getJContentPane()); - this.setTitle(windowTitle + "- [" + Workspace.getCurrentWorkspace() + "]"); + this.setTitle(projectName + " " + projectVersion + " " + "- [" + Workspace.getCurrentWorkspace() + "]"); this.setExitType(1); + // // max the window // @@ -1762,6 +1764,10 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele if (arg0.getSource() == jMenuItemToolsClone) { cloneItem(); } + + if (arg0.getSource() == jMenuItemToolsToolChainConfiguration) { + setupToolChainConfiguration(); + } if (arg0.getSource() == jMenuItemHelpAbout) { About a = new About(this, true); @@ -2876,11 +2882,24 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele // Reinit whole window // closeAll(); - this.setTitle(windowTitle + "- [" + Workspace.getCurrentWorkspace() + "]"); + this.setTitle(projectName + " " + projectVersion + " " + "- [" + Workspace.getCurrentWorkspace() + "]"); } sw.dispose(); } - + + /** + Show Tool Chain Configuration Dialog to setup Tool Chain + + **/ + private void setupToolChainConfiguration() { + ToolChainConfig tcc = new ToolChainConfig(this, true); + int result = tcc.showDialog(); + + if (result == DataType.RETURN_TYPE_CANCEL) { + tcc.dispose(); + } + } + /** Clone selected item @@ -2916,6 +2935,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele if (category >= IDefaultMutableTreeNode.FPD_PLATFORMHEADER) { mode = DataType.RETURN_TYPE_PLATFORM_SURFACE_AREA; } + Clone c = new Clone(this, true, mode, id); int result = c.showDialog(); diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/SelectModuleBelong.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/SelectModuleBelong.java index c33e8ebec4..6b1731dc0e 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/SelectModuleBelong.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/SelectModuleBelong.java @@ -41,7 +41,7 @@ import org.tianocore.frameworkwizard.common.Tools; import org.tianocore.frameworkwizard.common.ui.IDialog; import org.tianocore.frameworkwizard.common.ui.IFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; -import org.tianocore.frameworkwizard.module.Identification.ModuleIdentification; +import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification; import org.tianocore.frameworkwizard.packaging.PackageIdentification; import org.tianocore.frameworkwizard.platform.PlatformIdentification; import org.tianocore.frameworkwizard.workspace.Workspace; @@ -441,11 +441,9 @@ public class SelectModuleBelong extends IDialog { String packagePath = packages.elementAt(this.jComboBoxExistingPackage.getSelectedIndex()).getPath(); String modulePath = Tools.convertPathToCurrentOsType(this.jTextFieldFilePath.getText()); Vector msaFile = wt.getAllModulesOfPackage(packagePath); - packagePath = packagePath.substring(0, packagePath.lastIndexOf(DataType.FILE_SEPARATOR)); - String path = Tools.getRelativePath(modulePath, packagePath); for (int index = 0; index < msaFile.size(); index++) { - if (msaFile.elementAt(index).equals(path)) { + if (msaFile.elementAt(index).equals(modulePath)) { Log.err("This module is already existing in selected package"); return false; } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/ToolChainConfig.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/ToolChainConfig.java new file mode 100644 index 0000000000..393e70cb76 --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/ToolChainConfig.java @@ -0,0 +1,265 @@ +/** @file + + The file is used to setup tool chain configuration + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ +package org.tianocore.frameworkwizard; + +import java.awt.event.ActionEvent; +import java.io.File; +import java.io.IOException; + +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTable; +import javax.swing.table.DefaultTableModel; + +import org.tianocore.frameworkwizard.common.DataType; +import org.tianocore.frameworkwizard.common.Log; +import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.ToolChainConfigVector; +import org.tianocore.frameworkwizard.common.ui.IDialog; +import org.tianocore.frameworkwizard.common.ui.IFrame; +import org.tianocore.frameworkwizard.workspace.Workspace; + +public class ToolChainConfig extends IDialog { + + /// + /// Define Class Members + /// + private static final long serialVersionUID = 1486930966278269085L; + + private JPanel jContentPane = null; + + private JScrollPane jScrollPane = null; + + private DefaultTableModel model = null; + + private JTable jTable = null; + + private JButton jButtonOpen = null; + + private JButton jButtonSave = null; + + private JButton jButtonClose = null; + + private String toolsDir = Tools.addFileSeparator(Workspace.getCurrentWorkspace()) + "Tools" + + DataType.FILE_SEPARATOR + "Conf"; + + private String currentFile = Tools.addFileSeparator(toolsDir) + "tools_def.template"; + + private ToolChainConfigVector vtcc = new ToolChainConfigVector(); + + /** + * This method initializes jScrollPane + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPane() { + if (jScrollPane == null) { + jScrollPane = new JScrollPane(); + jScrollPane.setBounds(new java.awt.Rectangle(15, 15, 555, 345)); + jScrollPane.setViewportView(getJTable()); + } + return jScrollPane; + } + + /** + * This method initializes jTable + * + * @return javax.swing.JTable + */ + private JTable getJTable() { + if (jTable == null) { + jTable = new JTable(); + // model = new DefaultTableModel(); + // jTable = new JTable(model); + // jTable.setRowHeight(20); + } + return jTable; + } + + /** + * This method initializes jButtonOpen + * + * @return javax.swing.JButton + */ + private JButton getJButtonOpen() { + if (jButtonOpen == null) { + jButtonOpen = new JButton(); + jButtonOpen.setBounds(new java.awt.Rectangle(140, 390, 120, 25)); + jButtonOpen.setText("Open a file"); + jButtonOpen.addActionListener(this); + } + return jButtonOpen; + } + + /** + * This method initializes jButtonSave + * + * @return javax.swing.JButton + */ + private JButton getJButtonSave() { + if (jButtonSave == null) { + jButtonSave = new JButton(); + jButtonSave.setBounds(new java.awt.Rectangle(280, 390, 120, 25)); + jButtonSave.setText("Save to a file"); + jButtonSave.addActionListener(this); + } + return jButtonSave; + } + + /** + * This method initializes jButtonClose + * + * @return javax.swing.JButton + */ + private JButton getJButtonClose() { + if (jButtonClose == null) { + jButtonClose = new JButton(); + jButtonClose.setBounds(new java.awt.Rectangle(465, 390, 100, 25)); + jButtonClose.setText("Close"); + jButtonClose.addActionListener(this); + } + return jButtonClose; + } + + /** + + @param args + + **/ + public static void main(String[] args) { + // TODO Auto-generated method stub + + } + + /** + * This is the default constructor + */ + public ToolChainConfig(IFrame parentFrame, boolean modal) { + super(parentFrame, modal); + init(); + } + + /** + * This method initializes this + * + * @return void + */ + private void init() { + this.setSize(600, 480); + this.setContentPane(getJContentPane()); + this.setTitle("Tool Chain Configuration"); + this.centerWindow(); + + // + // Read default file + // + File f = new File(currentFile); + if (f.exists()) { + try { + vtcc.removeAll(); + vtcc.parseFile(this.currentFile); + this.setTitle("Tool Chain Configuration" + " [" + currentFile + "]"); + } catch (IOException e) { + Log.log(this.currentFile + "Read Error", e.getMessage()); + e.printStackTrace(); + } + } else { + Log.log("Open file", this.currentFile + " Not Found"); + } + + showTable(); + } + + /** + * This method initializes jContentPane + * + * @return javax.swing.JPanel + */ + private JPanel getJContentPane() { + if (jContentPane == null) { + jContentPane = new JPanel(); + jContentPane.setLayout(null); + jContentPane.add(getJScrollPane(), null); + jContentPane.add(getJButtonOpen(), null); + jContentPane.add(getJButtonSave(), null); + jContentPane.add(getJButtonClose(), null); + } + return jContentPane; + } + + /* (non-Javadoc) + * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) + * + * Override actionPerformed to listen all actions + */ + public void actionPerformed(ActionEvent arg0) { + if (arg0.getSource() == jButtonClose) { + this.setVisible(false); + this.returnType = DataType.RETURN_TYPE_CANCEL; + } + + if (arg0.getSource() == jButtonOpen) { + JFileChooser fc = new JFileChooser(); + fc.setAcceptAllFileFilterUsed(false); + fc.setCurrentDirectory(new File(toolsDir)); + + int result = fc.showSaveDialog(new JPanel()); + if (result == JFileChooser.APPROVE_OPTION) { + try { + vtcc.removeAll(); + vtcc.parseFile(fc.getSelectedFile().getPath()); + currentFile = fc.getSelectedFile().getPath(); + this.setTitle("Tool Chain Configuration" + " [" + currentFile + "]"); + } catch (IOException e) { + Log.err(this.currentFile + "Read Error", e.getMessage()); + e.printStackTrace(); + return; + } + this.showTable(); + } + } + + if (arg0.getSource() == jButtonSave) { + JFileChooser fc = new JFileChooser(); + fc.setAcceptAllFileFilterUsed(false); + fc.setCurrentDirectory(new File(toolsDir)); + + int result = fc.showOpenDialog(new JPanel()); + if (result == JFileChooser.APPROVE_OPTION) { + } + } + } + + /** + Read content of vector and put then into table + + **/ + private void showTable() { + model = new DefaultTableModel(); + jTable = new JTable(model); + jTable.setRowHeight(20); + + model.addColumn("Name"); + model.addColumn("Value"); + if (vtcc.size() > 0) { + for (int index = 0; index < vtcc.size(); index++) { + model.addRow(vtcc.toStringVector(index)); + } + } + this.jScrollPane.setViewportView(this.jTable); + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/FileOperation.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/FileOperation.java index 21d6cfa596..b0802a60e8 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/FileOperation.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/FileOperation.java @@ -28,7 +28,7 @@ public class FileOperation { **/ public static void main(String[] args) throws Exception { - FileOperation.newFolder("C:\\aaa\\bbb\\ccc\\ddd\\eee"); + FileOperation.newFolder("C:\\aaa\\aaa\\aaa\\aaa\\aaa"); } /** @@ -45,14 +45,14 @@ public class FileOperation { if (folderPath.indexOf(DataType.FILE_SEPARATOR) > -1) { temp = temp + folderPath.substring(0, folderPath.indexOf(DataType.FILE_SEPARATOR)); if (temp.endsWith(":")) { - temp = temp + DataType.FILE_SEPARATOR; + temp = Tools.addFileSeparator(temp); folderPath = folderPath.substring(folderPath.indexOf(DataType.FILE_SEPARATOR) + DataType.FILE_SEPARATOR.length()); continue; } - temp = temp + DataType.FILE_SEPARATOR; + temp = Tools.addFileSeparator(temp); folderPath = folderPath.substring(folderPath.indexOf(DataType.FILE_SEPARATOR) + DataType.FILE_SEPARATOR.length()); } else { - temp = temp + DataType.FILE_SEPARATOR + folderPath; + temp = Tools.addFileSeparator(temp) + folderPath; folderPath = ""; } File f = new File(temp); @@ -140,8 +140,16 @@ public class FileOperation { **/ public static void copyFile(String oldPath, String newPath) throws Exception { + oldPath = Tools.convertPathToCurrentOsType(oldPath); + newPath = Tools.convertPathToCurrentOsType(newPath); + int byteCount = 0; File oldFile = new File(oldPath); + + File newFile = new File(Tools.getFilePathOnly(newPath)); + if (!newFile.exists()) { + newFolder(Tools.getFilePathOnly(newPath)); + } if (oldFile.exists()) { InputStream is = new FileInputStream(oldPath); diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/Identification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/Identification.java new file mode 100644 index 0000000000..3a8420ce29 --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/Identification.java @@ -0,0 +1,93 @@ +/** @file + + The file is used to save basic information + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ + +package org.tianocore.frameworkwizard.common.Identifications; + +public class Identification { + + /// + /// Define class members + /// + private String name; + + private String guid; + + private String version; + + private String path; + + public Identification(String name, String guid, String version) { + this.name = name; + this.guid = guid; + this.version = version; + } + + public Identification() { + + } + + public Identification(String name, String guid, String version, String path) { + this.name = name; + this.guid = guid; + this.version = version; + this.path = path; + } + + public boolean equals(Object obj) { + if (obj instanceof Identification) { + Identification id = (Identification)obj; + if (path.equals(id.path)) { + //if ( name.equals(id.name) && guid.equals(id.guid) && version.equals(id.version)) { + return true; + } + return false; + } + else { + return super.equals(obj); + } + } + + public void setName(String name) { + this.name = name; + } + + public void setGuid(String guid) { + this.guid = guid; + } + + public void setVersion(String version) { + this.version = version; + } + + public void setPath(String path) { + this.path = path; + } + + public String getGuid() { + return guid; + } + + public String getName() { + return name; + } + + public String getVersion() { + return version; + } + + public String getPath() { + return path; + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpenFile.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpenFile.java new file mode 100644 index 0000000000..9e16ca12ff --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpenFile.java @@ -0,0 +1,96 @@ +/** @file + + The file provides interface to open xml file. + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ +package org.tianocore.frameworkwizard.common.Identifications; + +import java.io.File; +import java.io.IOException; + +import org.apache.xmlbeans.XmlException; +import org.apache.xmlbeans.XmlObject; +import org.tianocore.FrameworkDatabaseDocument; +import org.tianocore.ModuleSurfaceAreaDocument; +import org.tianocore.PackageSurfaceAreaDocument; +import org.tianocore.PlatformSurfaceAreaDocument; +import org.tianocore.FrameworkDatabaseDocument.FrameworkDatabase; +import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea; +import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea; +import org.tianocore.PlatformSurfaceAreaDocument.PlatformSurfaceArea; +import org.tianocore.frameworkwizard.common.Log; + +public class OpenFile { + /** + + @param args + + **/ + public static void main(String[] args) { + // TODO Auto-generated method stub + + } + + /** + Open specificed Msa file and read its content + + @param strMsaFilePath The input data of Msa File Path + + **/ + public static ModuleSurfaceArea openMsaFile(String strMsaFilePath) throws IOException, XmlException, Exception { + Log.log("Open Msa", strMsaFilePath); + File msaFile = new File(strMsaFilePath); + ModuleSurfaceAreaDocument xmlMsaDoc = (ModuleSurfaceAreaDocument) XmlObject.Factory.parse(msaFile); + return xmlMsaDoc.getModuleSurfaceArea(); + } + + /** + Open specificed Spd file and read its content + + @param strSpdFilePath The input data of Spd File Path + + **/ + public static PackageSurfaceArea openSpdFile(String strSpdFilePath) throws IOException, XmlException, Exception { + Log.log("Open Spd", strSpdFilePath); + File spdFile = new File(strSpdFilePath); + PackageSurfaceAreaDocument xmlSpdDoc = (PackageSurfaceAreaDocument) XmlObject.Factory.parse(spdFile); + return xmlSpdDoc.getPackageSurfaceArea(); + } + + /** + Open specificed Fpd file and read its content + + @param strFpdFilePath The input data of Fpd File Path + + **/ + public static PlatformSurfaceArea openFpdFile(String strFpdFilePath) throws IOException, XmlException, + Exception { + Log.log("Open Fpd", strFpdFilePath); + File fpdFile = new File(strFpdFilePath); + PlatformSurfaceAreaDocument xmlFpdDoc = null; + xmlFpdDoc = (PlatformSurfaceAreaDocument) XmlObject.Factory.parse(fpdFile); + return xmlFpdDoc.getPlatformSurfaceArea(); + } + + /** + + Open specificed Framework Database file and read its content + + */ + public static FrameworkDatabase openFrameworkDb(String strDbFilePath) throws IOException, XmlException, Exception { + Log.log("Open Framework Database", strDbFilePath); + File db = new File(strDbFilePath); + FrameworkDatabaseDocument xmlDb = null; + xmlDb = (FrameworkDatabaseDocument) XmlObject.Factory.parse(db); + return xmlDb.getFrameworkDatabase(); + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningFileType.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningFileType.java new file mode 100644 index 0000000000..c75ee8d835 --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningFileType.java @@ -0,0 +1,78 @@ +/** @file + + The file is used to define common opening file type + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ + +package org.tianocore.frameworkwizard.common.Identifications; + +import javax.swing.tree.TreePath; + + +public class OpeningFileType { + // + // Define class members + // + + private Identification id = null; + + private boolean isSaved = true; + + private boolean isNew = false; + + private TreePath treePath = null; + + public OpeningFileType() { + + } + + public OpeningFileType(Identification identification) { + this.id = identification; + } + + public OpeningFileType(Identification identification, TreePath treePathValue) { + this.id = identification; + this.treePath = treePathValue; + } + + public Identification getId() { + return id; + } + + public void setId(Identification id) { + this.id = id; + } + + public boolean isNew() { + return isNew; + } + + public void setNew(boolean isNew) { + this.isNew = isNew; + } + + public boolean isSaved() { + return isSaved; + } + + public void setSaved(boolean isSaved) { + this.isSaved = isSaved; + } + + public TreePath getTreePath() { + return treePath; + } + + public void setTreePath(TreePath treePath) { + this.treePath = treePath; + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleList.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleList.java new file mode 100644 index 0000000000..6796b17bc9 --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleList.java @@ -0,0 +1,167 @@ +/** @file + + The file is used to define opening module list + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ +package org.tianocore.frameworkwizard.common.Identifications; + +import java.util.Vector; + +import javax.swing.tree.TreePath; + +import org.tianocore.ModuleSurfaceAreaDocument; + +public class OpeningModuleList { + private Vector vOpeningModuleList = new Vector(); + + public OpeningModuleList() { + + } + public Vector getVOpeningModuleList() { + return vOpeningModuleList; + } + + public void setVOpeningModuleList(Vector openingModuleList) { + vOpeningModuleList = openingModuleList; + } + + public void insertToOpeningModuleList(Identification id, ModuleSurfaceAreaDocument.ModuleSurfaceArea xmlMsa) { + vOpeningModuleList.addElement(new OpeningModuleType(id, xmlMsa)); + } + + public OpeningModuleType getOpeningModuleByIndex(int index) { + if (index > -1 && index < vOpeningModuleList.size()) { + return vOpeningModuleList.elementAt(index); + } + return null; + } + + public OpeningModuleType getOpeningModuleById(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return vOpeningModuleList.elementAt(index); + } + return null; + } + + public int findIndexOfListById(Identification id) { + for (int index = 0; index < vOpeningModuleList.size(); index++) { + if (vOpeningModuleList.elementAt(index).getId().equals(id)) { + return index; + } + } + return -1; + } + + public void removeFromOpeningModuleListByIndex(int index) { + if (index > -1 && index < vOpeningModuleList.size()) { + vOpeningModuleList.removeElementAt(index); + } + } + + public void removeFromOpeningModuleListById(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + vOpeningModuleList.removeElementAt(findIndexOfListById(id)); + } + } + + public void removeAllFromOpeningModuleList() { + vOpeningModuleList.removeAllElements(); + } + + public ModuleSurfaceAreaDocument.ModuleSurfaceArea getModuleSurfaceAreaFromId(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return vOpeningModuleList.elementAt(index).getXmlMsa(); + } + return null; + } + + public boolean existsModule(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return true; + } + return false; + } + + public void setModuleSaved(Identification id, boolean isSaved) { + setModuleSaved(findIndexOfListById(id), isSaved); + } + + public void setModuleSaved(int index, boolean isSaved) { + if (index > -1) { + vOpeningModuleList.elementAt(index).setSaved(isSaved); + } + } + + public boolean getModuleSaved(Identification id) { + return getModuleSaved(findIndexOfListById(id)); + } + + public boolean getModuleSaved(int index) { + if (index > -1) { + return vOpeningModuleList.elementAt(index).isSaved(); + } + return true; + } + + public void setTreePathById(Identification id, TreePath treePath) { + int index = findIndexOfListById(id); + if (index > -1) { + vOpeningModuleList.elementAt(index).setTreePath(treePath); + } + } + + public TreePath getTreePathById(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return vOpeningModuleList.elementAt(index).getTreePath(); + } + return null; + } + + public TreePath getTreePathByIndex(int index) { + if (index > -1) { + return vOpeningModuleList.elementAt(index).getTreePath(); + } + return null; + } + + public void setNew(Identification id, boolean isNew) { + int index = findIndexOfListById(id); + if (index > -1) { + vOpeningModuleList.elementAt(index).setNew(isNew); + } + } + + public int size() { + return vOpeningModuleList.size(); + } + + public boolean isSaved() { + for (int index = 0; index < this.size(); index++) { + if (!this.getModuleSaved(index)) { + return false; + } + } + return true; + } + + public boolean isOpend() { + if (this.size() > 0 ) { + return true; + } + return false; + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleType.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleType.java new file mode 100644 index 0000000000..d44c86178d --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleType.java @@ -0,0 +1,49 @@ +/** @file + + The file is used to define opening module type + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ + +package org.tianocore.frameworkwizard.common.Identifications; + +import javax.swing.tree.TreePath; + +import org.tianocore.ModuleSurfaceAreaDocument; + +public class OpeningModuleType extends OpeningFileType{ + // + // Define class members + // + private ModuleSurfaceAreaDocument.ModuleSurfaceArea xmlMsa = null; + + public OpeningModuleType() { + + } + + public OpeningModuleType(Identification identification, ModuleSurfaceAreaDocument.ModuleSurfaceArea msa) { + super(identification); + this.xmlMsa = msa; + } + + public OpeningModuleType(Identification identification, ModuleSurfaceAreaDocument.ModuleSurfaceArea msa, TreePath treePath) { + super(identification, treePath); + this.xmlMsa = msa; + } + + public ModuleSurfaceAreaDocument.ModuleSurfaceArea getXmlMsa() { + return xmlMsa; + } + + public void setXmlMsa(ModuleSurfaceAreaDocument.ModuleSurfaceArea xmlMsa) { + this.xmlMsa = xmlMsa; + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageList.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageList.java new file mode 100644 index 0000000000..0b4f9a5144 --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageList.java @@ -0,0 +1,168 @@ +/** @file + + The file is used to define opening package list + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ +package org.tianocore.frameworkwizard.common.Identifications; + +import java.util.Vector; + +import javax.swing.tree.TreePath; + +import org.tianocore.PackageSurfaceAreaDocument; + +public class OpeningPackageList { + private Vector vOpeningPackageList = new Vector(); + + public OpeningPackageList() { + + } + + public Vector getVOpeningPackageList() { + return vOpeningPackageList; + } + + public void setVOpeningPackageList(Vector openingPackageList) { + vOpeningPackageList = openingPackageList; + } + + public void insertToOpeningPackageList(Identification id, PackageSurfaceAreaDocument.PackageSurfaceArea xmlMsa) { + vOpeningPackageList.addElement(new OpeningPackageType(id, xmlMsa)); + } + + public OpeningPackageType getOpeningPackageByIndex(int index) { + if (index > -1 && index < vOpeningPackageList.size()) { + return vOpeningPackageList.elementAt(index); + } + return null; + } + + public OpeningPackageType getOpeningPackageById(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return vOpeningPackageList.elementAt(index); + } + return null; + } + + public int findIndexOfListById(Identification id) { + for (int index = 0; index < vOpeningPackageList.size(); index++) { + if (vOpeningPackageList.elementAt(index).getId().equals(id)) { + return index; + } + } + return -1; + } + + public void removeFromOpeningPackageListByIndex(int index) { + if (index > -1 && index < vOpeningPackageList.size()) { + vOpeningPackageList.removeElementAt(index); + } + } + + public void removeFromOpeningPackageListById(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + vOpeningPackageList.removeElementAt(findIndexOfListById(id)); + } + } + + public void removeAllFromOpeningPackageList() { + vOpeningPackageList.removeAllElements(); + } + + public PackageSurfaceAreaDocument.PackageSurfaceArea getPackageSurfaceAreaFromId(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return vOpeningPackageList.elementAt(index).getXmlSpd(); + } + return null; + } + + public boolean existsPackage(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return true; + } + return false; + } + + public void setPackageSaved(Identification id, boolean isSaved) { + setPackageSaved(findIndexOfListById(id), isSaved); + } + + public void setPackageSaved(int index, boolean isSaved) { + if (index > -1) { + vOpeningPackageList.elementAt(index).setSaved(isSaved); + } + } + + public boolean getPackageSaved(Identification id) { + return getPackageSaved(findIndexOfListById(id)); + } + + public boolean getPackageSaved(int index) { + if (index > -1) { + return vOpeningPackageList.elementAt(index).isSaved(); + } + return true; + } + + public void setTreePathById(Identification id, TreePath treePath) { + int index = findIndexOfListById(id); + if (index > -1) { + vOpeningPackageList.elementAt(index).setTreePath(treePath); + } + } + + public TreePath getTreePathById(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return vOpeningPackageList.elementAt(index).getTreePath(); + } + return null; + } + + public TreePath getTreePathByIndex(int index) { + if (index > -1) { + return vOpeningPackageList.elementAt(index).getTreePath(); + } + return null; + } + + public void setNew(Identification id, boolean isNew) { + int index = findIndexOfListById(id); + if (index > -1) { + vOpeningPackageList.elementAt(index).setNew(isNew); + } + } + + public int size() { + return vOpeningPackageList.size(); + } + + public boolean isSaved() { + for (int index = 0; index < this.size(); index++) { + if (!this.getPackageSaved(index)) { + return false; + } + } + return true; + } + + public boolean isOpend() { + if (this.size() > 0 ) { + return true; + } + return false; + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageType.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageType.java new file mode 100644 index 0000000000..73df9f2626 --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPackageType.java @@ -0,0 +1,48 @@ +/** @file + + The file is used to define opening package type + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ +package org.tianocore.frameworkwizard.common.Identifications; + +import javax.swing.tree.TreePath; + +import org.tianocore.PackageSurfaceAreaDocument; + +public class OpeningPackageType extends OpeningFileType { + // + // Define class members + // + private PackageSurfaceAreaDocument.PackageSurfaceArea xmlSpd = null; + + public OpeningPackageType() { + + } + + public OpeningPackageType(Identification identification, PackageSurfaceAreaDocument.PackageSurfaceArea spd) { + super(identification); + this.xmlSpd = spd; + } + + public OpeningPackageType(Identification identification, PackageSurfaceAreaDocument.PackageSurfaceArea spd, TreePath treePath) { + super(identification, treePath); + this.xmlSpd = spd; + } + + public PackageSurfaceAreaDocument.PackageSurfaceArea getXmlSpd() { + return xmlSpd; + } + + public void setXmlSpd(PackageSurfaceAreaDocument.PackageSurfaceArea xmlSpd) { + this.xmlSpd = xmlSpd; + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformList.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformList.java new file mode 100644 index 0000000000..3389d7081a --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformList.java @@ -0,0 +1,170 @@ +/** @file + + The file is used to define opening package list + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ +package org.tianocore.frameworkwizard.common.Identifications; + +import java.util.Vector; + +import javax.swing.tree.TreePath; + +import org.tianocore.PlatformSurfaceAreaDocument; + +public class OpeningPlatformList { + + private Vector vOpeningPlatformList = new Vector(); + + public OpeningPlatformList() { + + } + + public Vector getVOpeningPlatformList() { + return vOpeningPlatformList; + } + + public void setVOpeningPlatformList(Vector openingPlatformList) { + vOpeningPlatformList = openingPlatformList; + } + + public void insertToOpeningPlatformList(Identification id, PlatformSurfaceAreaDocument.PlatformSurfaceArea xmlFpd) { + vOpeningPlatformList.addElement(new OpeningPlatformType(id, xmlFpd)); + } + + public OpeningPlatformType getOpeningPlatformByIndex(int index) { + if (index > -1 && index < vOpeningPlatformList.size()) { + return vOpeningPlatformList.elementAt(index); + } + return null; + } + + public OpeningPlatformType getOpeningPlatformById(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return vOpeningPlatformList.elementAt(index); + } + return null; + } + + public int findIndexOfListById(Identification id) { + for (int index = 0; index < vOpeningPlatformList.size(); index++) { + if (vOpeningPlatformList.elementAt(index).getId().equals(id)) { + return index; + } + } + return -1; + } + + public void removeFromOpeningPlatformListByIndex(int index) { + if (index > -1 && index < vOpeningPlatformList.size()) { + vOpeningPlatformList.removeElementAt(index); + } + } + + public void removeFromOpeningPlatformListById(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + vOpeningPlatformList.removeElementAt(findIndexOfListById(id)); + } + } + + public void removeAllFromOpeningPlatformList() { + vOpeningPlatformList.removeAllElements(); + } + + public PlatformSurfaceAreaDocument.PlatformSurfaceArea getPlatformSurfaceAreaFromId(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return vOpeningPlatformList.elementAt(index).getXmlFpd(); + } + return null; + } + + public boolean existsPlatform(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return true; + } + return false; + } + + + public void setPlatformSaved(Identification id, boolean isSaved) { + setPlatformSaved(findIndexOfListById(id), isSaved); + } + + public void setPlatformSaved(int index, boolean isSaved) { + if (index > -1) { + vOpeningPlatformList.elementAt(index).setSaved(isSaved); + } + } + + public boolean getPlatformSaved(Identification id) { + return getPlatformSaved(findIndexOfListById(id)); + } + + public boolean getPlatformSaved(int index) { + if (index > -1) { + return vOpeningPlatformList.elementAt(index).isSaved(); + } + return true; + } + + public void setTreePathById(Identification id, TreePath treePath) { + int index = findIndexOfListById(id); + if (index > -1) { + vOpeningPlatformList.elementAt(index).setTreePath(treePath); + } + } + + public TreePath getTreePathById(Identification id) { + int index = findIndexOfListById(id); + if (index > -1) { + return vOpeningPlatformList.elementAt(index).getTreePath(); + } + return null; + } + + public TreePath getTreePathByIndex(int index) { + if (index > -1) { + return vOpeningPlatformList.elementAt(index).getTreePath(); + } + return null; + } + + public void setNew(Identification id, boolean isNew) { + int index = findIndexOfListById(id); + if (index > -1) { + vOpeningPlatformList.elementAt(index).setNew(isNew); + } + } + + public int size() { + return vOpeningPlatformList.size(); + } + + public boolean isSaved() { + for (int index = 0; index < this.size(); index++) { + if (!this.getPlatformSaved(index)) { + return false; + } + } + return true; + } + + public boolean isOpend() { + if (this.size() > 0 ) { + return true; + } + return false; + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformType.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformType.java new file mode 100644 index 0000000000..cc6a3f9c77 --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpeningPlatformType.java @@ -0,0 +1,48 @@ +/** @file + + The file is used to define opening platform type + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ +package org.tianocore.frameworkwizard.common.Identifications; + +import javax.swing.tree.TreePath; + +import org.tianocore.PlatformSurfaceAreaDocument; + +public class OpeningPlatformType extends OpeningFileType { + // + // Define class members + // + private PlatformSurfaceAreaDocument.PlatformSurfaceArea xmlFpd = null; + + public OpeningPlatformType() { + + } + + public OpeningPlatformType(Identification identification, PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) { + super(identification); + this.xmlFpd = fpd; + } + + public OpeningPlatformType(Identification identification, PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd, TreePath treePath) { + super(identification, treePath); + this.xmlFpd = fpd; + } + + public PlatformSurfaceAreaDocument.PlatformSurfaceArea getXmlFpd() { + return xmlFpd; + } + + public void setXmlFpd(PlatformSurfaceAreaDocument.PlatformSurfaceArea xmlFpd) { + this.xmlFpd = xmlFpd; + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigId.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigId.java new file mode 100644 index 0000000000..f446693004 --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigId.java @@ -0,0 +1,55 @@ +/** @file + + The file is used to define Tool Chain Configuration Identification + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ +package org.tianocore.frameworkwizard.common.Identifications; + +public class ToolChainConfigId { + + public static final String COMMENTS = "#"; + + public static final String EQUALS = "="; + + private String name = ""; + + private String value = ""; + + public ToolChainConfigId(String strName, String strValue) { + this.name = strName; + this.value = strValue; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public boolean equals(ToolChainConfigId id) { + if (this.name.equals(id.name)) { + return true; + } else { + return false; + } + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigVector.java new file mode 100644 index 0000000000..347a66970e --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/ToolChainConfigVector.java @@ -0,0 +1,137 @@ +/** @file + + The file is used to define Tool Chain Configuration Vector + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ +package org.tianocore.frameworkwizard.common.Identifications; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.Vector; + +public class ToolChainConfigVector { + + private Vector vToolChainConfigs = new Vector(); + + public int findToolChainConfigs(ToolChainConfigId sfi) { + for (int index = 0; index < vToolChainConfigs.size(); index++) { + if (vToolChainConfigs.elementAt(index).equals(sfi)) { + return index; + } + } + return -1; + } + + public int findToolChainConfigs(String name) { + for (int index = 0; index < vToolChainConfigs.size(); index++) { + if (vToolChainConfigs.elementAt(index).getName().equals(name)) { + return index; + } + } + return -1; + } + + public ToolChainConfigId getToolChainConfigs(int index) { + if (index > -1) { + return vToolChainConfigs.elementAt(index); + } else { + return null; + } + } + + public Vector toStringVector(int index) { + Vector v = new Vector(); + v.addElement(getToolChainConfigs(index).getName()); + v.addElement(getToolChainConfigs(index).getValue()); + return v; + } + + public void addToolChainConfigs(ToolChainConfigId arg0) { + vToolChainConfigs.addElement(arg0); + } + + public void updateToolChainConfigs(ToolChainConfigId arg0, int arg1) { + vToolChainConfigs.setElementAt(arg0, arg1); + } + + public void removeToolChainConfigs(ToolChainConfigId arg0) { + int index = findToolChainConfigs(arg0); + if (index > -1) { + vToolChainConfigs.removeElementAt(index); + } + } + + public void removeToolChainConfigs(int index) { + if (index > -1 && index < this.size()) { + vToolChainConfigs.removeElementAt(index); + } + } + + public void removeAll() { + vToolChainConfigs = new Vector(); + } + + public Vector getToolChainConfigsName() { + Vector v = new Vector(); + for (int index = 0; index < this.vToolChainConfigs.size(); index++) { + v.addElement(vToolChainConfigs.get(index).getName()); + } + return v; + } + + public Vector getToolChainConfigsValue() { + Vector v = new Vector(); + for (int index = 0; index < this.vToolChainConfigs.size(); index++) { + v.addElement(vToolChainConfigs.get(index).getValue()); + } + return v; + } + + public int size() { + return this.vToolChainConfigs.size(); + } + + /** + + @param file + @throws IOException + @throws FileNotFoundException + + **/ + public void parseFile(String file) throws IOException { + FileReader fr = new FileReader(file); + BufferedReader br = new BufferedReader(fr); + String line = br.readLine(); + while (line != null) { + parseLine(line); + line = br.readLine(); + } + } + + /** + Parse the input string and add name, value to vector + + @param line + + **/ + private void parseLine(String line) { + String name = ""; + String value = ""; + if (line.indexOf(ToolChainConfigId.COMMENTS) != 0 && line.indexOf(ToolChainConfigId.EQUALS) > -1) { + name = line.substring(0, line.indexOf(ToolChainConfigId.EQUALS)).trim(); + value = line.substring(line.indexOf(ToolChainConfigId.EQUALS) + 1).trim(); + this.addToolChainConfigs(new ToolChainConfigId(name, value)); + } + } +} diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java index e63a0f5cf9..3623b2e3c0 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java @@ -141,36 +141,35 @@ public class Tools { } } } - + /** Get path only from a path - + @param filePath @return - - **/ + + **/ public static String getFilePathOnly(String filePath) { String path = filePath.substring(0, filePath.length() - getFileNameOnly(filePath).length()); if (path.endsWith(DataType.FILE_SEPARATOR)) { path = path.substring(0, path.length() - DataType.FILE_SEPARATOR.length()); } - + return path; } - - + /** Get file name from a path @param filePath @return - - **/ + + **/ public static String getFileNameOnly(String filePath) { File f = new File(filePath); return f.getAbsoluteFile().getName(); } - + public static String getFileNameWithoutExt(String filePath) { filePath = getFileNameOnly(filePath); filePath = filePath.substring(0, filePath.lastIndexOf(DataType.FILE_EXT_SEPARATOR)); @@ -265,14 +264,28 @@ public class Tools { } return path; } - + /** Show a message box @param arg0 - - **/ + + **/ public static void showInformationMessage(String arg0) { JOptionPane.showConfirmDialog(null, arg0, "Error", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE); } + + /** + if the string doesn't end with a file separator, append it to the string + + @param arg0 + @return + + **/ + public static String addFileSeparator(String arg0) { + if (!arg0.endsWith(DataType.FILE_SEPARATOR)) { + arg0 = arg0 + DataType.FILE_SEPARATOR; + } + return arg0; + } } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDefaultMutableTreeNode.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDefaultMutableTreeNode.java index 6814741a5c..454f472a23 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDefaultMutableTreeNode.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDefaultMutableTreeNode.java @@ -18,7 +18,7 @@ package org.tianocore.frameworkwizard.common.ui; import javax.swing.tree.DefaultMutableTreeNode; -import org.tianocore.frameworkwizard.common.Identification; +import org.tianocore.frameworkwizard.common.Identifications.Identification; /** The class is used to override DefaultMutableTreeNode to provides customized interfaces diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ITree.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ITree.java index 3d6a65bb83..25da85fa81 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ITree.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ITree.java @@ -21,7 +21,7 @@ import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; -import org.tianocore.frameworkwizard.common.Identification; +import org.tianocore.frameworkwizard.common.Identifications.Identification; /** The class is used to override JTree to provides customized interfaces diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/BootModes/BootModesIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BootModes/BootModesIdentification.java similarity index 92% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/BootModes/BootModesIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BootModes/BootModesIdentification.java index 45944d5771..0005ad1ccc 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/BootModes/BootModesIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BootModes/BootModesIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.BootModes; +package org.tianocore.frameworkwizard.module.Identifications.BootModes; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/BootModes/BootModesVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BootModes/BootModesVector.java similarity index 94% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/BootModes/BootModesVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BootModes/BootModesVector.java index c7c02e9f4b..71255787b1 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/BootModes/BootModesVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BootModes/BootModesVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.BootModes; +package org.tianocore.frameworkwizard.module.Identifications.BootModes; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/DataHubs/DataHubsIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/DataHubs/DataHubsIdentification.java similarity index 92% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/DataHubs/DataHubsIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/DataHubs/DataHubsIdentification.java index deb72d3479..2b5b362acb 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/DataHubs/DataHubsIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/DataHubs/DataHubsIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.DataHubs; +package org.tianocore.frameworkwizard.module.Identifications.DataHubs; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/DataHubs/DataHubsVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/DataHubs/DataHubsVector.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/DataHubs/DataHubsVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/DataHubs/DataHubsVector.java index 4348eb3697..b7899bdd7d 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/DataHubs/DataHubsVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/DataHubs/DataHubsVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.DataHubs; +package org.tianocore.frameworkwizard.module.Identifications.DataHubs; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Events/EventsIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Events/EventsIdentification.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Events/EventsIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Events/EventsIdentification.java index 4258226af1..569123232d 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Events/EventsIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Events/EventsIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.Events; +package org.tianocore.frameworkwizard.module.Identifications.Events; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Events/EventsVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Events/EventsVector.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Events/EventsVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Events/EventsVector.java index a2f597a0e4..bafd98ab09 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Events/EventsVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Events/EventsVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.Events; +package org.tianocore.frameworkwizard.module.Identifications.Events; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Externs/ExternsIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Externs/ExternsIdentification.java similarity index 92% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Externs/ExternsIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Externs/ExternsIdentification.java index b925698109..59b85d7e16 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Externs/ExternsIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Externs/ExternsIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.Externs; +package org.tianocore.frameworkwizard.module.Identifications.Externs; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Externs/ExternsVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Externs/ExternsVector.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Externs/ExternsVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Externs/ExternsVector.java index ac5ce34e16..ee5a031b49 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Externs/ExternsVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Externs/ExternsVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.Externs; +package org.tianocore.frameworkwizard.module.Identifications.Externs; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Guids/GuidsIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Guids/GuidsIdentification.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Guids/GuidsIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Guids/GuidsIdentification.java index 7b11e2ca3f..d167e06fe5 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Guids/GuidsIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Guids/GuidsIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.Guids; +package org.tianocore.frameworkwizard.module.Identifications.Guids; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Guids/GuidsVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Guids/GuidsVector.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Guids/GuidsVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Guids/GuidsVector.java index 68c2d88592..01694cc5a8 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Guids/GuidsVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Guids/GuidsVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.Guids; +package org.tianocore.frameworkwizard.module.Identifications.Guids; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/HiiPackages/HiiPackagesIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/HiiPackages/HiiPackagesIdentification.java similarity index 92% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/HiiPackages/HiiPackagesIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/HiiPackages/HiiPackagesIdentification.java index 546f4b809f..4935d306b0 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/HiiPackages/HiiPackagesIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/HiiPackages/HiiPackagesIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.HiiPackages; +package org.tianocore.frameworkwizard.module.Identifications.HiiPackages; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/HiiPackages/HiiPackagesVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/HiiPackages/HiiPackagesVector.java similarity index 94% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/HiiPackages/HiiPackagesVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/HiiPackages/HiiPackagesVector.java index c4a4bbbe3d..161f6a4a28 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/HiiPackages/HiiPackagesVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/HiiPackages/HiiPackagesVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.HiiPackages; +package org.tianocore.frameworkwizard.module.Identifications.HiiPackages; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Hobs/HobsIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Hobs/HobsIdentification.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Hobs/HobsIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Hobs/HobsIdentification.java index f577724d77..e2144fa583 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Hobs/HobsIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Hobs/HobsIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.Hobs; +package org.tianocore.frameworkwizard.module.Identifications.Hobs; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Hobs/HobsVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Hobs/HobsVector.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Hobs/HobsVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Hobs/HobsVector.java index 5e37245677..fbbf529494 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Hobs/HobsVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Hobs/HobsVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.Hobs; +package org.tianocore.frameworkwizard.module.Identifications.Hobs; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/LibraryClass/LibraryClassIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/LibraryClass/LibraryClassIdentification.java similarity index 94% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/LibraryClass/LibraryClassIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/LibraryClass/LibraryClassIdentification.java index 7f88a97cee..b5d7ead044 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/LibraryClass/LibraryClassIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/LibraryClass/LibraryClassIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.LibraryClass; +package org.tianocore.frameworkwizard.module.Identifications.LibraryClass; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/LibraryClass/LibraryClassVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/LibraryClass/LibraryClassVector.java similarity index 94% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/LibraryClass/LibraryClassVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/LibraryClass/LibraryClassVector.java index ddacdda841..f7af757458 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/LibraryClass/LibraryClassVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/LibraryClass/LibraryClassVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.LibraryClass; +package org.tianocore.frameworkwizard.module.Identifications.LibraryClass; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/ModuleIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/ModuleIdentification.java similarity index 91% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/ModuleIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/ModuleIdentification.java index 95ada64f9f..cef02295f6 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/ModuleIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/ModuleIdentification.java @@ -13,10 +13,10 @@ **/ -package org.tianocore.frameworkwizard.module.Identification; +package org.tianocore.frameworkwizard.module.Identifications; -import org.tianocore.frameworkwizard.common.Identification; +import org.tianocore.frameworkwizard.common.Identifications.Identification; import org.tianocore.frameworkwizard.packaging.PackageIdentification; public class ModuleIdentification extends Identification { diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PackageDependencies/PackageDependenciesIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PackageDependencies/PackageDependenciesIdentification.java similarity index 92% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PackageDependencies/PackageDependenciesIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PackageDependencies/PackageDependenciesIdentification.java index 98a0245797..170c417371 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PackageDependencies/PackageDependenciesIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PackageDependencies/PackageDependenciesIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.PackageDependencies; +package org.tianocore.frameworkwizard.module.Identifications.PackageDependencies; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PackageDependencies/PackageDependenciesVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PackageDependencies/PackageDependenciesVector.java similarity index 94% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PackageDependencies/PackageDependenciesVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PackageDependencies/PackageDependenciesVector.java index 7c09710941..386a803628 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PackageDependencies/PackageDependenciesVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PackageDependencies/PackageDependenciesVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.PackageDependencies; +package org.tianocore.frameworkwizard.module.Identifications.PackageDependencies; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PcdCoded/PcdCodedIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdCodedIdentification.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PcdCoded/PcdCodedIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdCodedIdentification.java index f605add248..7f2f377757 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PcdCoded/PcdCodedIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdCodedIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.PcdCoded; +package org.tianocore.frameworkwizard.module.Identifications.PcdCoded; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PcdCoded/PcdCodedVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdCodedVector.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PcdCoded/PcdCodedVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdCodedVector.java index db2a8dcaf2..023290db77 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/PcdCoded/PcdCodedVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdCodedVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.PcdCoded; +package org.tianocore.frameworkwizard.module.Identifications.PcdCoded; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Ppis/PpisIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Ppis/PpisIdentification.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Ppis/PpisIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Ppis/PpisIdentification.java index 3df5c080f7..8d0198ea49 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Ppis/PpisIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Ppis/PpisIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.Ppis; +package org.tianocore.frameworkwizard.module.Identifications.Ppis; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Ppis/PpisVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Ppis/PpisVector.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Ppis/PpisVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Ppis/PpisVector.java index 85149189af..b1d3457701 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Ppis/PpisVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Ppis/PpisVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.Ppis; +package org.tianocore.frameworkwizard.module.Identifications.Ppis; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Protocols/ProtocolsIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Protocols/ProtocolsIdentification.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Protocols/ProtocolsIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Protocols/ProtocolsIdentification.java index 79567e47d2..deaa71dd09 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Protocols/ProtocolsIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Protocols/ProtocolsIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.Protocols; +package org.tianocore.frameworkwizard.module.Identifications.Protocols; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Protocols/ProtocolsVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Protocols/ProtocolsVector.java similarity index 94% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Protocols/ProtocolsVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Protocols/ProtocolsVector.java index e9e0106add..b9667049f6 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Protocols/ProtocolsVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Protocols/ProtocolsVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.Protocols; +package org.tianocore.frameworkwizard.module.Identifications.Protocols; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SourceFiles/SourceFilesIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesIdentification.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SourceFiles/SourceFilesIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesIdentification.java index 31e95d32f9..31e9aec835 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SourceFiles/SourceFilesIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesIdentification.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.SourceFiles; +package org.tianocore.frameworkwizard.module.Identifications.SourceFiles; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SourceFiles/SourceFilesVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesVector.java similarity index 94% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SourceFiles/SourceFilesVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesVector.java index 0b9623261e..8dccb74627 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SourceFiles/SourceFilesVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesVector.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.SourceFiles; +package org.tianocore.frameworkwizard.module.Identifications.SourceFiles; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SystemTables/SystemTablesIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SystemTables/SystemTablesIdentification.java similarity index 92% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SystemTables/SystemTablesIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SystemTables/SystemTablesIdentification.java index 354e10b40e..d2952c0e7e 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SystemTables/SystemTablesIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SystemTables/SystemTablesIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.SystemTables; +package org.tianocore.frameworkwizard.module.Identifications.SystemTables; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SystemTables/SystemTablesVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SystemTables/SystemTablesVector.java similarity index 94% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SystemTables/SystemTablesVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SystemTables/SystemTablesVector.java index eea0280ebf..8babcd725f 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/SystemTables/SystemTablesVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SystemTables/SystemTablesVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.SystemTables; +package org.tianocore.frameworkwizard.module.Identifications.SystemTables; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Variables/VariablesIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Variables/VariablesIdentification.java similarity index 93% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Variables/VariablesIdentification.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Variables/VariablesIdentification.java index bfa4c127d2..24d81860a4 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Variables/VariablesIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Variables/VariablesIdentification.java @@ -13,7 +13,7 @@ **/ -package org.tianocore.frameworkwizard.module.Identification.Variables; +package org.tianocore.frameworkwizard.module.Identifications.Variables; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Variables/VariablesVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Variables/VariablesVector.java similarity index 94% rename from Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Variables/VariablesVector.java rename to Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Variables/VariablesVector.java index 543ebe6054..946545729f 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/Variables/VariablesVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Variables/VariablesVector.java @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.frameworkwizard.module.Identification.Variables; +package org.tianocore.frameworkwizard.module.Identifications.Variables; import java.util.Vector; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java index 4e0652cb4e..978214645e 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java @@ -38,13 +38,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.BootModes.BootModesIdentification; -import org.tianocore.frameworkwizard.module.Identification.BootModes.BootModesVector; +import org.tianocore.frameworkwizard.module.Identifications.BootModes.BootModesIdentification; +import org.tianocore.frameworkwizard.module.Identifications.BootModes.BootModesVector; /** The class is used to create, update BootModes of MSA/MBD file diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java index 8905518a71..cf342d24c4 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java @@ -37,13 +37,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.DataHubs.DataHubsIdentification; -import org.tianocore.frameworkwizard.module.Identification.DataHubs.DataHubsVector; +import org.tianocore.frameworkwizard.module.Identifications.DataHubs.DataHubsIdentification; +import org.tianocore.frameworkwizard.module.Identifications.DataHubs.DataHubsVector; /** The class is used to create, update DataHub of MSA/MBD file @@ -147,6 +147,7 @@ public class ModuleDataHubs extends IInternalFrame { jTextFieldDataHubRecord = new JTextField(); jTextFieldDataHubRecord.setBounds(new java.awt.Rectangle(160, 10, 320, 20)); jTextFieldDataHubRecord.setPreferredSize(new java.awt.Dimension(320, 20)); + jTextFieldDataHubRecord.setToolTipText("Enter the C Name of the Data Hub Record"); } return jTextFieldDataHubRecord; } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDefinitions.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDefinitions.java index f3bc5e70c6..8fd573cc1c 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDefinitions.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDefinitions.java @@ -26,11 +26,12 @@ import javax.swing.JComboBox; import org.tianocore.ModuleDefinitionsDocument; import org.tianocore.ModuleSurfaceAreaDocument; import org.tianocore.ModuleDefinitionsDocument.ModuleDefinitions.ClonedFrom; +import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; @@ -136,6 +137,7 @@ public class ModuleDefinitions extends IInternalFrame { if (iCheckBoxListArch == null) { iCheckBoxListArch = new ICheckBoxList(); iCheckBoxListArch.addFocusListener(this); + iCheckBoxListArch.setToolTipText(DataType.SUP_ARCH_LIST_HELP_TEXT); } return iCheckBoxListArch; } @@ -343,5 +345,7 @@ public class ModuleDefinitions extends IInternalFrame { public void focusLost(FocusEvent arg0) { this.save(); + if (arg0.getSource() == this.jTextFieldOutputFileBasename) { + } } } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java index 165fbd6068..26c8a62c36 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java @@ -38,13 +38,14 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.Events.EventsIdentification; -import org.tianocore.frameworkwizard.module.Identification.Events.EventsVector; +import org.tianocore.frameworkwizard.module.Identifications.Events.EventsIdentification; +import org.tianocore.frameworkwizard.module.Identifications.Events.EventsVector; +import org.tianocore.frameworkwizard.workspace.WorkspaceTools; /** The class is used to create, update Event of MSA/MBD file @@ -69,7 +70,7 @@ public class ModuleEvents extends IInternalFrame { private JLabel jLabelC_Name = null; - private JTextField jTextFieldC_Name = null; + private JComboBox jComboBoxGuidC_Name = null; private JLabel jLabelUsage = null; @@ -125,6 +126,8 @@ public class ModuleEvents extends IInternalFrame { private EventsVector vid = new EventsVector(); private EnumerationData ed = new EnumerationData(); + + private WorkspaceTools wt = new WorkspaceTools(); /** This method initializes jTextFieldC_Name @@ -132,13 +135,14 @@ public class ModuleEvents extends IInternalFrame { @return javax.swing.JTextField jTextFieldC_Name **/ - private JTextField getJTextFieldC_Name() { - if (jTextFieldC_Name == null) { - jTextFieldC_Name = new JTextField(); - jTextFieldC_Name.setBounds(new java.awt.Rectangle(160, 35, 320, 20)); - jTextFieldC_Name.setPreferredSize(new java.awt.Dimension(320, 20)); + private JComboBox getJComboBoxGuidC_Name() { + if (jComboBoxGuidC_Name == null) { + jComboBoxGuidC_Name = new JComboBox(); + jComboBoxGuidC_Name.setBounds(new java.awt.Rectangle(160, 35, 320, 20)); + jComboBoxGuidC_Name.setPreferredSize(new java.awt.Dimension(320, 20)); + jComboBoxGuidC_Name.setToolTipText("Select the GUID C Name of the Event"); } - return jTextFieldC_Name; + return jComboBoxGuidC_Name; } /** @@ -166,6 +170,7 @@ public class ModuleEvents extends IInternalFrame { jComboBoxEventsType = new JComboBox(); jComboBoxEventsType.setBounds(new java.awt.Rectangle(160, 10, 320, 20)); jComboBoxEventsType.setPreferredSize(new java.awt.Dimension(320, 20)); + jComboBoxEventsType.setToolTipText("Select Create event if the Module has an event that is waiting to be signaled. Select Signal if the Module will signal all events in an event group. Signal Event The events are named by GUID."); } return jComboBoxEventsType; } @@ -445,7 +450,7 @@ public class ModuleEvents extends IInternalFrame { **/ public void setViewMode(boolean isView) { if (isView) { - this.jTextFieldC_Name.setEnabled(!isView); + this.jComboBoxGuidC_Name.setEnabled(!isView); this.jComboBoxUsage.setEnabled(!isView); } } @@ -483,7 +488,7 @@ public class ModuleEvents extends IInternalFrame { jContentPane.add(jLabelEventType, null); jContentPane.add(jLabelC_Name, null); - jContentPane.add(getJTextFieldC_Name(), null); + jContentPane.add(getJComboBoxGuidC_Name(), null); jContentPane.add(jLabelUsage, null); jContentPane.add(getJComboBoxUsage(), null); jStarLabel1 = new StarLabel(); @@ -517,6 +522,7 @@ public class ModuleEvents extends IInternalFrame { private void initFrame() { Tools.generateComboBoxByVector(jComboBoxEventsType, ed.getVEventType()); Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVEventUsage()); + Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt.getAllGuidDeclarationsFromWorkspace()); this.iCheckBoxListArch.setAllItems(ed.getVSupportedArchitectures()); } @@ -560,13 +566,13 @@ public class ModuleEvents extends IInternalFrame { // // Check Name // - if (isEmpty(this.jTextFieldC_Name.getText())) { + if (isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) { Log.err("Event Name couldn't be empty"); return false; } - if (!isEmpty(this.jTextFieldC_Name.getText())) { - if (!DataValidation.isC_NameType(this.jTextFieldC_Name.getText())) { + if (!isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) { + if (!DataValidation.isC_NameType(this.jComboBoxGuidC_Name.getSelectedItem().toString())) { Log.err("Incorrect data type for Event Name"); return false; } @@ -673,7 +679,7 @@ public class ModuleEvents extends IInternalFrame { int intPreferredHeight = this.getJContentPane().getPreferredSize().height; resizeComponentWidth(jComboBoxEventsType, intCurrentWidth, intPreferredWidth); - resizeComponentWidth(jTextFieldC_Name, intCurrentWidth, intPreferredWidth); + resizeComponentWidth(jComboBoxGuidC_Name, intCurrentWidth, intPreferredWidth); resizeComponentWidth(jComboBoxUsage, intCurrentWidth, intPreferredWidth); resizeComponentWidth(jTextFieldHelpText, intCurrentWidth, intPreferredWidth); resizeComponentWidth(jTextFieldFeatureFlag, intCurrentWidth, intPreferredWidth); @@ -687,7 +693,7 @@ public class ModuleEvents extends IInternalFrame { } private EventsIdentification getCurrentEvents() { - String arg0 = this.jTextFieldC_Name.getText(); + String arg0 = this.jComboBoxGuidC_Name.getSelectedItem().toString(); String arg1 = this.jComboBoxEventsType.getSelectedItem().toString(); String arg2 = this.jComboBoxUsage.getSelectedItem().toString(); @@ -811,7 +817,7 @@ public class ModuleEvents extends IInternalFrame { // intSelectedItemId = jComboBoxList.getSelectedIndex(); - this.jTextFieldC_Name.setText(vid.getEvents(intSelectedItemId).getName()); + this.jComboBoxGuidC_Name.setSelectedItem(vid.getEvents(intSelectedItemId).getName()); this.jComboBoxEventsType.setSelectedItem(vid.getEvents(intSelectedItemId).getType()); this.jComboBoxUsage.setSelectedItem(vid.getEvents(intSelectedItemId).getUsage()); this.jTextFieldHelpText.setText(vid.getEvents(intSelectedItemId).getHelp()); diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java index 6654e06e22..cfabd0aeb7 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java @@ -37,12 +37,12 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.Externs.ExternsIdentification; -import org.tianocore.frameworkwizard.module.Identification.Externs.ExternsVector; +import org.tianocore.frameworkwizard.module.Identifications.Externs.ExternsIdentification; +import org.tianocore.frameworkwizard.module.Identifications.Externs.ExternsVector; /** The class is used to create, update DataHub of MSA/MBD file diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleGuids.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleGuids.java index b8d085104b..35ac3f5278 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleGuids.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleGuids.java @@ -36,13 +36,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.Guids.GuidsIdentification; -import org.tianocore.frameworkwizard.module.Identification.Guids.GuidsVector; +import org.tianocore.frameworkwizard.module.Identifications.Guids.GuidsIdentification; +import org.tianocore.frameworkwizard.module.Identifications.Guids.GuidsVector; import org.tianocore.frameworkwizard.workspace.WorkspaceTools; /** diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java index 008ea5d109..aefeba500f 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java @@ -36,13 +36,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.HiiPackages.HiiPackagesIdentification; -import org.tianocore.frameworkwizard.module.Identification.HiiPackages.HiiPackagesVector; +import org.tianocore.frameworkwizard.module.Identifications.HiiPackages.HiiPackagesIdentification; +import org.tianocore.frameworkwizard.module.Identifications.HiiPackages.HiiPackagesVector; /** The class is used to create, update Formset of MSA/MBD file @@ -131,6 +131,7 @@ public class ModuleHiiPackages extends IInternalFrame { jTextFieldName = new JTextField(); jTextFieldName.setBounds(new java.awt.Rectangle(160, 10, 320, 20)); jTextFieldName.setPreferredSize(new java.awt.Dimension(320, 20)); + jTextFieldName.setToolTipText("Enter the C Name of the HII Package"); } return jTextFieldName; } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java index 81f2df92ff..7bbf1190b7 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java @@ -36,13 +36,14 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.Hobs.HobsIdentification; -import org.tianocore.frameworkwizard.module.Identification.Hobs.HobsVector; +import org.tianocore.frameworkwizard.module.Identifications.Hobs.HobsIdentification; +import org.tianocore.frameworkwizard.module.Identifications.Hobs.HobsVector; +import org.tianocore.frameworkwizard.workspace.WorkspaceTools; /** The class is used to create, update Hob of MSA/MBD file @@ -65,7 +66,7 @@ public class ModuleHobs extends IInternalFrame { private JLabel jLabel = null; - private JTextField jTextFieldC_Name = null; + private JComboBox jComboBoxGuidC_Name = null; private JLabel jLabelUsage = null; @@ -121,6 +122,8 @@ public class ModuleHobs extends IInternalFrame { private HobsVector vid = new HobsVector(); private EnumerationData ed = new EnumerationData(); + + private WorkspaceTools wt = new WorkspaceTools(); /** This method initializes jTextField @@ -128,13 +131,14 @@ public class ModuleHobs extends IInternalFrame { @return javax.swing.JTextField jTextFieldC_Name **/ - private JTextField getJTextFieldC_Name() { - if (jTextFieldC_Name == null) { - jTextFieldC_Name = new JTextField(); - jTextFieldC_Name.setBounds(new java.awt.Rectangle(160, 10, 320, 20)); - jTextFieldC_Name.setPreferredSize(new java.awt.Dimension(320, 20)); + private JComboBox getJComboBoxGuidC_Name() { + if (jComboBoxGuidC_Name == null) { + jComboBoxGuidC_Name = new JComboBox(); + jComboBoxGuidC_Name.setBounds(new java.awt.Rectangle(160, 10, 320, 20)); + jComboBoxGuidC_Name.setPreferredSize(new java.awt.Dimension(320, 20)); + jComboBoxGuidC_Name.setToolTipText("Select the GUID C Name of the Hob"); } - return jTextFieldC_Name; + return jComboBoxGuidC_Name; } /** @@ -423,7 +427,7 @@ public class ModuleHobs extends IInternalFrame { **/ public void setViewMode(boolean isView) { if (isView) { - this.jTextFieldC_Name.setEnabled(!isView); + this.jComboBoxGuidC_Name.setEnabled(!isView); this.jComboBoxUsage.setEnabled(!isView); this.jComboBoxHobType.setEnabled(!isView); } @@ -461,7 +465,7 @@ public class ModuleHobs extends IInternalFrame { jContentPane.setPreferredSize(new java.awt.Dimension(490, 495)); jContentPane.add(jLabel, null); - jContentPane.add(getJTextFieldC_Name(), null); + jContentPane.add(getJComboBoxGuidC_Name(), null); jContentPane.add(jLabelUsage, null); jContentPane.add(jLabelHobType, null); jContentPane.add(getJComboBoxUsage(), null); @@ -493,6 +497,7 @@ public class ModuleHobs extends IInternalFrame { private void initFrame() { Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVHobUsage()); Tools.generateComboBoxByVector(jComboBoxHobType, ed.getVHobType()); + Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt.getAllGuidDeclarationsFromWorkspace()); this.iCheckBoxListArch.setAllItems(ed.getVSupportedArchitectures()); } @@ -536,13 +541,13 @@ public class ModuleHobs extends IInternalFrame { // // Check Name // - if (isEmpty(this.jTextFieldC_Name.getText())) { + if (isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) { Log.err("Hob Name couldn't be empty"); return false; } - if (!isEmpty(this.jTextFieldC_Name.getText())) { - if (!DataValidation.isC_NameType(this.jTextFieldC_Name.getText())) { + if (!isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) { + if (!DataValidation.isC_NameType(this.jComboBoxGuidC_Name.getSelectedItem().toString())) { Log.err("Incorrect data type for Hob Name"); return false; } @@ -614,7 +619,7 @@ public class ModuleHobs extends IInternalFrame { int intPreferredWidth = this.getJContentPane().getPreferredSize().width; int intPreferredHeight = this.getJContentPane().getPreferredSize().height; - resizeComponentWidth(jTextFieldC_Name, intCurrentWidth, intPreferredWidth); + resizeComponentWidth(jComboBoxGuidC_Name, intCurrentWidth, intPreferredWidth); resizeComponentWidth(jComboBoxHobType, intCurrentWidth, intPreferredWidth); resizeComponentWidth(jComboBoxUsage, intCurrentWidth, intPreferredWidth); resizeComponentWidth(jTextFieldHelpText, intCurrentWidth, intPreferredWidth); @@ -630,7 +635,7 @@ public class ModuleHobs extends IInternalFrame { } private HobsIdentification getCurrentHobs() { - String arg0 = this.jTextFieldC_Name.getText(); + String arg0 = this.jComboBoxGuidC_Name.getSelectedItem().toString(); String arg1 = this.jComboBoxHobType.getSelectedItem().toString(); String arg2 = this.jComboBoxUsage.getSelectedItem().toString(); @@ -754,7 +759,7 @@ public class ModuleHobs extends IInternalFrame { // intSelectedItemId = jComboBoxList.getSelectedIndex(); - this.jTextFieldC_Name.setText(vid.getHobs(intSelectedItemId).getName()); + this.jComboBoxGuidC_Name.setSelectedItem(vid.getHobs(intSelectedItemId).getName()); this.jComboBoxHobType.setSelectedItem(vid.getHobs(intSelectedItemId).getType()); this.jComboBoxUsage.setSelectedItem(vid.getHobs(intSelectedItemId).getUsage()); this.jTextFieldHelpText.setText(vid.getHobs(intSelectedItemId).getHelp()); diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleLibraryClassDefinitions.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleLibraryClassDefinitions.java index 6b060cb3ed..a815c8549b 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleLibraryClassDefinitions.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleLibraryClassDefinitions.java @@ -37,13 +37,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.LibraryClass.LibraryClassIdentification; -import org.tianocore.frameworkwizard.module.Identification.LibraryClass.LibraryClassVector; +import org.tianocore.frameworkwizard.module.Identifications.LibraryClass.LibraryClassIdentification; +import org.tianocore.frameworkwizard.module.Identifications.LibraryClass.LibraryClassVector; import org.tianocore.frameworkwizard.workspace.WorkspaceTools; /** diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePCDs.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePCDs.java index f2cd162245..028ad8aaed 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePCDs.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePCDs.java @@ -36,13 +36,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.PcdCoded.PcdCodedIdentification; -import org.tianocore.frameworkwizard.module.Identification.PcdCoded.PcdCodedVector; +import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdCodedIdentification; +import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdCodedVector; import org.tianocore.frameworkwizard.workspace.WorkspaceTools; /** diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java index beefb879da..3ff3d4ad6d 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java @@ -36,13 +36,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.PackageDependencies.PackageDependenciesIdentification; -import org.tianocore.frameworkwizard.module.Identification.PackageDependencies.PackageDependenciesVector; +import org.tianocore.frameworkwizard.module.Identifications.PackageDependencies.PackageDependenciesIdentification; +import org.tianocore.frameworkwizard.module.Identifications.PackageDependencies.PackageDependenciesVector; import org.tianocore.frameworkwizard.packaging.PackageIdentification; import org.tianocore.frameworkwizard.workspace.WorkspaceTools; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePpis.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePpis.java index 941c05acbe..c0e17aa4b4 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePpis.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePpis.java @@ -38,13 +38,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.Ppis.PpisIdentification; -import org.tianocore.frameworkwizard.module.Identification.Ppis.PpisVector; +import org.tianocore.frameworkwizard.module.Identifications.Ppis.PpisIdentification; +import org.tianocore.frameworkwizard.module.Identifications.Ppis.PpisVector; import org.tianocore.frameworkwizard.workspace.WorkspaceTools; /** diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleProtocols.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleProtocols.java index e591292883..6c09aa1909 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleProtocols.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleProtocols.java @@ -39,13 +39,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.Protocols.ProtocolsIdentification; -import org.tianocore.frameworkwizard.module.Identification.Protocols.ProtocolsVector; +import org.tianocore.frameworkwizard.module.Identifications.Protocols.ProtocolsIdentification; +import org.tianocore.frameworkwizard.module.Identifications.Protocols.ProtocolsVector; import org.tianocore.frameworkwizard.workspace.WorkspaceTools; /** @@ -281,6 +281,7 @@ public class ModuleProtocols extends IInternalFrame { jComboBoxProtocolType.setBounds(new java.awt.Rectangle(160, 10, 320, 20)); jComboBoxProtocolType.setPreferredSize(new java.awt.Dimension(320, 20)); jComboBoxProtocolType.addItemListener(this); + jComboBoxProtocolType.setToolTipText("Select Protocol Type"); } return jComboBoxProtocolType; } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java index 739fec0119..ec3c3b6bb7 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java @@ -37,13 +37,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.SourceFiles.SourceFilesIdentification; -import org.tianocore.frameworkwizard.module.Identification.SourceFiles.SourceFilesVector; +import org.tianocore.frameworkwizard.module.Identifications.SourceFiles.SourceFilesIdentification; +import org.tianocore.frameworkwizard.module.Identifications.SourceFiles.SourceFilesVector; import org.tianocore.frameworkwizard.workspace.Workspace; /** diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java index 64f1137b54..3a32326455 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java @@ -36,13 +36,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.SystemTables.SystemTablesIdentification; -import org.tianocore.frameworkwizard.module.Identification.SystemTables.SystemTablesVector; +import org.tianocore.frameworkwizard.module.Identifications.SystemTables.SystemTablesIdentification; +import org.tianocore.frameworkwizard.module.Identifications.SystemTables.SystemTablesVector; /** The class is used to create, update SystemTable of MSA/MBD file @@ -131,6 +131,7 @@ public class ModuleSystemTables extends IInternalFrame { jTextFieldGuidC_Name = new JTextField(); jTextFieldGuidC_Name.setBounds(new java.awt.Rectangle(160, 10, 320, 20)); jTextFieldGuidC_Name.setPreferredSize(new java.awt.Dimension(320,20)); + jTextFieldGuidC_Name.setToolTipText("Enter the C Name of the System Table"); } return jTextFieldGuidC_Name; } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java index 2b56122f13..1335694fb8 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java @@ -37,13 +37,13 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList; -import org.tianocore.frameworkwizard.module.Identification.Variables.VariablesIdentification; -import org.tianocore.frameworkwizard.module.Identification.Variables.VariablesVector; +import org.tianocore.frameworkwizard.module.Identifications.Variables.VariablesIdentification; +import org.tianocore.frameworkwizard.module.Identifications.Variables.VariablesVector; /** The class is used to create, update Variable of MSA/MBD file @@ -135,6 +135,7 @@ public class ModuleVariables extends IInternalFrame { jTextFieldVariableName.setSize(new java.awt.Dimension(320, 20)); jTextFieldVariableName.setPreferredSize(new java.awt.Dimension(320, 20)); jTextFieldVariableName.setLocation(new java.awt.Point(160, 10)); + jTextFieldVariableName.setToolTipText("Enter a Hex Word Array, you must provide leading Zeros. 0x000a, 0x0010, ¡­"); } return jTextFieldVariableName; } @@ -274,6 +275,7 @@ public class ModuleVariables extends IInternalFrame { jTextFieldGuidC_Name = new JTextField(); jTextFieldGuidC_Name.setBounds(new java.awt.Rectangle(160, 35, 320, 20)); jTextFieldGuidC_Name.setPreferredSize(new java.awt.Dimension(320, 20)); + jTextFieldGuidC_Name.setToolTipText("Enter the C Name for the Variable Guid"); } return jTextFieldGuidC_Name; } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/MsaHeader.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/MsaHeader.java index c4576a8327..11e1aa89c9 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/MsaHeader.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/MsaHeader.java @@ -35,8 +35,8 @@ import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.EnumerationData; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpeningModuleType; import org.tianocore.frameworkwizard.common.Tools; +import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.ui.IInternalFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/PackageIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/PackageIdentification.java index 3599621ac6..7604a5f27a 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/PackageIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/PackageIdentification.java @@ -16,7 +16,7 @@ package org.tianocore.frameworkwizard.packaging; import java.io.File; -import org.tianocore.frameworkwizard.common.Identification; +import org.tianocore.frameworkwizard.common.Identifications.Identification; public class PackageIdentification extends Identification{ diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/PlatformIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/PlatformIdentification.java index 11212818cc..01387223a3 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/PlatformIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/PlatformIdentification.java @@ -17,7 +17,7 @@ package org.tianocore.frameworkwizard.platform; import java.io.File; -import org.tianocore.frameworkwizard.common.Identification; +import org.tianocore.frameworkwizard.common.Identifications.Identification; public class PlatformIdentification extends Identification{ diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java index c6432ac284..73fba9a861 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java @@ -26,14 +26,15 @@ import org.tianocore.MsaHeaderDocument.MsaHeader; import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea; import org.tianocore.PlatformHeaderDocument.PlatformHeader; import org.tianocore.PlatformSurfaceAreaDocument.PlatformSurfaceArea; +import org.tianocore.SourceFilesDocument.SourceFiles; import org.tianocore.SpdHeaderDocument.SpdHeader; import org.tianocore.frameworkwizard.common.DataType; -import org.tianocore.frameworkwizard.common.Identification; import org.tianocore.frameworkwizard.common.Log; -import org.tianocore.frameworkwizard.common.OpenFile; import org.tianocore.frameworkwizard.common.SaveFile; import org.tianocore.frameworkwizard.common.Tools; -import org.tianocore.frameworkwizard.module.Identification.ModuleIdentification; +import org.tianocore.frameworkwizard.common.Identifications.Identification; +import org.tianocore.frameworkwizard.common.Identifications.OpenFile; +import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification; import org.tianocore.frameworkwizard.packaging.PackageIdentification; import org.tianocore.frameworkwizard.platform.PlatformIdentification; @@ -80,7 +81,10 @@ public class WorkspaceTools { MsaFiles files = OpenFile.openSpdFile(path).getMsaFiles(); if (files != null) { for (int index = 0; index < files.getFilenameList().size(); index++) { - modulePath.addElement(files.getFilenameList().get(index)); + String msaPath = files.getFilenameList().get(index); + msaPath = Tools.addFileSeparator(Tools.getFilePathOnly(path)) + msaPath; + msaPath = Tools.convertPathToCurrentOsType(msaPath); + modulePath.addElement(msaPath); } } } catch (IOException e) { @@ -149,11 +153,10 @@ public class WorkspaceTools { for (int indexI = 0; indexI < vPackageList.size(); indexI++) { packagePath = vPackageList.elementAt(indexI).getPath(); modulePaths = this.getAllModulesOfPackage(packagePath); - packagePath = packagePath.substring(0, packagePath.lastIndexOf(DataType.FILE_SEPARATOR) - + DataType.FILE_SEPARATOR.length()); + for (int indexJ = 0; indexJ < modulePaths.size(); indexJ++) { - modulePath = Tools.convertPathToCurrentOsType(packagePath + modulePaths.elementAt(indexJ)); try { + modulePath = modulePaths.get(indexJ); id = getId(modulePath, OpenFile.openMsaFile(modulePath)); vModuleList.addElement(new ModuleIdentification(id, vPackageList.elementAt(indexI))); } catch (IOException e) { @@ -251,7 +254,7 @@ public class WorkspaceTools { for (int index = 0; index < spd.getPpiDeclarations().getEntryList().size(); index++) { vector.addElement(spd.getPpiDeclarations().getEntryList().get(index).getCName()); } - } + } } return vector; } @@ -268,7 +271,7 @@ public class WorkspaceTools { for (int index = 0; index < spd.getGuidDeclarations().getEntryList().size(); index++) { vector.addElement(spd.getGuidDeclarations().getEntryList().get(index).getCName()); } - } + } } return vector; } @@ -285,7 +288,7 @@ public class WorkspaceTools { for (int index = 0; index < spd.getPcdDeclarations().getPcdEntryList().size(); index++) { vector.addElement(spd.getPcdDeclarations().getPcdEntryList().get(index).getCName()); } - } + } } return vector; } @@ -452,10 +455,8 @@ public class WorkspaceTools { for (int indexI = 0; indexI < vPackageList.size(); indexI++) { packagePath = vPackageList.elementAt(indexI).getPath(); modulePaths = this.getAllModulesOfPackage(packagePath); - packagePath = packagePath.substring(0, packagePath.lastIndexOf(DataType.FILE_SEPARATOR) - + DataType.FILE_SEPARATOR.length()); for (int indexJ = 0; indexJ < modulePaths.size(); indexJ++) { - modulePath = Tools.convertPathToCurrentOsType(packagePath + modulePaths.elementAt(indexJ)); + modulePath = modulePaths.get(indexJ); try { mid = getId(modulePath, OpenFile.openMsaFile(modulePath)); // @@ -571,4 +572,70 @@ public class WorkspaceTools { strFrameworkDbFilePath = Tools.convertPathToCurrentOsType(strFrameworkDbFilePath); SaveFile.saveDbFile(strFrameworkDbFilePath, fdb); } + + /** + Get all file's path from one module + + @param path + @return + @throws IOException + @throws XmlException + @throws Exception + + **/ + public Vector getAllModuleFiles(String path) throws IOException, XmlException, Exception { + Vector v = new Vector(); + path = Tools.convertPathToCurrentOsType(path); + v.addElement(path); + ModuleSurfaceArea msa = OpenFile.openMsaFile(path); + if (msa != null) { + // + // Get all files' path of a module + // + SourceFiles sf = msa.getSourceFiles(); + if (sf != null) { + for (int index = 0; index < sf.getFilenameList().size(); index++) { + String temp = sf.getFilenameList().get(index).getStringValue(); + temp = Tools.addFileSeparator(Tools.getFilePathOnly(path)) + temp; + v.addElement(Tools.convertPathToCurrentOsType(temp)); + } + } + } + + return v; + } + + /** + Get all file's path from one package + + @param path + @return + @throws IOException + @throws XmlException + @throws Exception + + **/ + public Vector getAllPakcageFiles(String path) throws IOException, XmlException, Exception { + Vector v = new Vector(); + path = Tools.convertPathToCurrentOsType(path); + // + // First add package + // + v.addElement(path); + + // + // Add module's files one by one + // + Vector f1 = new Vector(); + f1 = getAllModulesOfPackage(path); + for (int indexI = 0; indexI < f1.size(); indexI++) { + Vector f2 = getAllModuleFiles(f1.get(indexI)); + for (int indexJ = 0; indexJ < f2.size(); indexJ++) { + v.addElement(f2.get(indexJ)); + } + } + //v.add(0, path); + + return v; + } } -- 2.39.2