From: hche10x Date: Fri, 21 Jul 2006 07:56:14 +0000 (+0000) Subject: 1. Show source files' attributes when editing SourceFiles in msa X-Git-Tag: edk2-stable201903~24807 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=f9d0ab926630722309d9ff401523045b79868a64 1. Show source files' attributes when editing SourceFiles in msa 2. Set default value to "Module" when new a msa 3. Move OpenFile.java from identification to common git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1064 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/Tools/Source/FrameworkWizard/FrameworkWizard.msa b/Tools/Source/FrameworkWizard/FrameworkWizard.msa index 596836dcd7..e11f7bb1ae 100644 --- a/Tools/Source/FrameworkWizard/FrameworkWizard.msa +++ b/Tools/Source/FrameworkWizard/FrameworkWizard.msa @@ -53,12 +53,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. src/org/tianocore/frameworkwizard/common/IDefaultTableModel.java src/org/tianocore/frameworkwizard/common/IFileFilter.java src/org/tianocore/frameworkwizard/common/Log.java + src/org/tianocore/frameworkwizard/common/OpenFile.java src/org/tianocore/frameworkwizard/common/SaveFile.java src/org/tianocore/frameworkwizard/common/Sort.java src/org/tianocore/frameworkwizard/common/Tools.java src/org/tianocore/frameworkwizard/common/XmlConfig.java src/org/tianocore/frameworkwizard/common/Identifications/Identification.java - src/org/tianocore/frameworkwizard/common/Identifications/OpenFile.java src/org/tianocore/frameworkwizard/common/Identifications/OpeningFileType.java src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleList.java src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleType.java diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java index 68d8c48160..016bada678 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java @@ -38,10 +38,10 @@ import org.tianocore.frameworkwizard.common.DataValidation; import org.tianocore.frameworkwizard.common.FileOperation; import org.tianocore.frameworkwizard.common.IFileFilter; 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.Identifications.ModuleIdentification; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java index 71e50f3844..80df4135c3 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java @@ -50,10 +50,10 @@ import org.tianocore.PlatformSurfaceAreaDocument; import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.IFileFilter; 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.Identifications.OpeningModuleList; import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType; import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageList; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/SelectModuleBelong.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/SelectModuleBelong.java index d6be739b47..3d5a696954 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/SelectModuleBelong.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/SelectModuleBelong.java @@ -58,7 +58,7 @@ public class SelectModuleBelong extends IDialog { **/ private static final long serialVersionUID = 4171355136991448972L; - private JPanel jContentPane = null; // @jve:decl-index=0:visual-constraint="10,54" + private JPanel jContentPane = null; private JComboBox jComboBoxExistingPackage = null; @@ -99,7 +99,7 @@ public class SelectModuleBelong extends IDialog { private StarLabel jStarLabel4 = null; private StarLabel jStarLabel5 = null; - + private ButtonGroup bg = new ButtonGroup(); private WorkspaceTools wt = new WorkspaceTools(); @@ -251,8 +251,8 @@ public class SelectModuleBelong extends IDialog { private JRadioButton getJRadioButtonYes() { if (jRadioButtonYes == null) { jRadioButtonYes = new JRadioButton(); - jRadioButtonYes.setBounds(new java.awt.Rectangle(140,35,100,20)); - jRadioButtonYes.setSelected(true); + jRadioButtonYes.setBounds(new java.awt.Rectangle(140, 35, 100, 20)); + jRadioButtonYes.setSelected(false); jRadioButtonYes.setText("Yes"); } return jRadioButtonYes; @@ -266,8 +266,8 @@ public class SelectModuleBelong extends IDialog { private JRadioButton getJRadioButtonNo() { if (jRadioButtonNo == null) { jRadioButtonNo = new JRadioButton(); - jRadioButtonNo.setBounds(new java.awt.Rectangle(300,35,110,20)); - jRadioButtonNo.setSelected(false); + jRadioButtonNo.setBounds(new java.awt.Rectangle(300, 35, 110, 20)); + jRadioButtonNo.setSelected(true); jRadioButtonNo.setText("No"); } return jRadioButtonNo; @@ -341,7 +341,7 @@ public class SelectModuleBelong extends IDialog { private JPanel getJContentPane() { if (jContentPane == null) { jLabelIsLibrary = new JLabel(); - jLabelIsLibrary.setBounds(new java.awt.Rectangle(15,35,120,20)); + jLabelIsLibrary.setBounds(new java.awt.Rectangle(15, 35, 120, 20)); jLabelIsLibrary.setText("Is a Library"); jLabelVersion = new JLabel(); jLabelVersion.setBounds(new java.awt.Rectangle(15, 135, 120, 20)); @@ -360,7 +360,7 @@ public class SelectModuleBelong extends IDialog { jLabelPackage.setText("Choose Package"); jContentPane = new JPanel(); jContentPane.setLayout(null); - jContentPane.setSize(new java.awt.Dimension(490,198)); + jContentPane.setSize(new java.awt.Dimension(490, 198)); jContentPane.add(getJComboBoxExistingPackage(), null); jContentPane.add(getJButtonOk(), null); jContentPane.add(getJButtonCancel(), null); @@ -726,7 +726,7 @@ public class SelectModuleBelong extends IDialog { public void setPid(PackageIdentification pid) { this.pid = pid; } - + private void upLocation(Component c, int size) { c.setLocation(c.getLocation().x, c.getLocation().y - size); } 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 deleted file mode 100644 index 9e16ca12ff..0000000000 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpenFile.java +++ /dev/null @@ -1,96 +0,0 @@ -/** @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/OpenFile.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/OpenFile.java new file mode 100644 index 0000000000..32eec68258 --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/OpenFile.java @@ -0,0 +1,95 @@ +/** @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; + +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; + +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/far/PackageQuery.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/PackageQuery.java index f2a52633ac..a3ebfed8de 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/PackageQuery.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/PackageQuery.java @@ -25,7 +25,7 @@ import org.tianocore.ModuleSurfaceAreaDocument; import org.tianocore.PackageDependenciesDocument; import org.tianocore.PackageSurfaceAreaDocument; import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea; -import org.tianocore.frameworkwizard.common.Identifications.OpenFile; +import org.tianocore.frameworkwizard.common.OpenFile; import org.tianocore.frameworkwizard.packaging.PackageIdentification; import org.tianocore.frameworkwizard.workspace.WorkspaceTools; diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/ModuleIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/ModuleIdentification.java index 8671204b98..02189d92ef 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/ModuleIdentification.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/ModuleIdentification.java @@ -23,8 +23,8 @@ import org.tianocore.LibraryUsage; import org.tianocore.LibraryClassDefinitionsDocument.LibraryClassDefinitions; import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea; import org.tianocore.frameworkwizard.common.DataType; +import org.tianocore.frameworkwizard.common.OpenFile; import org.tianocore.frameworkwizard.common.Identifications.Identification; -import org.tianocore.frameworkwizard.common.Identifications.OpenFile; import org.tianocore.frameworkwizard.packaging.PackageIdentification; public class ModuleIdentification extends Identification { diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesVector.java index c08ae21166..0e5cdc97a5 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesVector.java @@ -92,6 +92,9 @@ public class SourceFilesVector { public Vector toStringVector(int index) { Vector v = new Vector(); v.addElement(getSourceFiles(index).getFilename()); + v.addElement(getSourceFiles(index).getTagName()); + v.addElement(getSourceFiles(index).getToolCode()); + v.addElement(getSourceFiles(index).getToolChainFamily()); return v; } } 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 eab29befa3..eaeb13e52d 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 @@ -181,6 +181,9 @@ public class ModuleSourceFiles extends IInternalFrame { jTable.setRowHeight(20); model.addColumn("File Name"); + model.addColumn("Tag Name"); + model.addColumn("Tool Code"); + model.addColumn("Tool Chain Family"); jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); jTable.getSelectionModel().addListSelectionListener(this); 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 16cfaad87a..43ae277eee 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java @@ -34,11 +34,11 @@ import org.tianocore.SourceFilesDocument.SourceFiles; import org.tianocore.SpdHeaderDocument.SpdHeader; import org.tianocore.frameworkwizard.common.DataType; import org.tianocore.frameworkwizard.common.Log; +import org.tianocore.frameworkwizard.common.OpenFile; import org.tianocore.frameworkwizard.common.SaveFile; import org.tianocore.frameworkwizard.common.Sort; import org.tianocore.frameworkwizard.common.Tools; import org.tianocore.frameworkwizard.common.Identifications.Identification; -import org.tianocore.frameworkwizard.common.Identifications.OpenFile; import org.tianocore.frameworkwizard.far.FarHeader; import org.tianocore.frameworkwizard.far.FarIdentification; import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;