]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Show source files' attributes when editing SourceFiles in msa
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 21 Jul 2006 07:56:14 +0000 (07:56 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 21 Jul 2006 07:56:14 +0000 (07:56 +0000)
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

Tools/Source/FrameworkWizard/FrameworkWizard.msa
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/SelectModuleBelong.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/OpenFile.java [deleted file]
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/OpenFile.java [new file with mode: 0644]
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/PackageQuery.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/ModuleIdentification.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SourceFiles/SourceFilesVector.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java

index 596836dcd75180c24f805e8eebca26646f9d13d6..e11f7bb1ae24c3f083cbcfb275729c95e1e55ae6 100644 (file)
@@ -53,12 +53,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <Filename>src/org/tianocore/frameworkwizard/common/IDefaultTableModel.java</Filename>\r
     <Filename>src/org/tianocore/frameworkwizard/common/IFileFilter.java</Filename>\r
     <Filename>src/org/tianocore/frameworkwizard/common/Log.java</Filename>\r
+    <Filename>src/org/tianocore/frameworkwizard/common/OpenFile.java</Filename>\r
     <Filename>src/org/tianocore/frameworkwizard/common/SaveFile.java</Filename>\r
     <Filename>src/org/tianocore/frameworkwizard/common/Sort.java</Filename>\r
     <Filename>src/org/tianocore/frameworkwizard/common/Tools.java</Filename>\r
     <Filename>src/org/tianocore/frameworkwizard/common/XmlConfig.java</Filename>\r
     <Filename>src/org/tianocore/frameworkwizard/common/Identifications/Identification.java</Filename>\r
-    <Filename>src/org/tianocore/frameworkwizard/common/Identifications/OpenFile.java</Filename>\r
     <Filename>src/org/tianocore/frameworkwizard/common/Identifications/OpeningFileType.java</Filename>\r
     <Filename>src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleList.java</Filename>\r
     <Filename>src/org/tianocore/frameworkwizard/common/Identifications/OpeningModuleType.java</Filename>\r
index 68d8c48160ba1638205caf39561d75301aaaa860..016bada67873fd70cfc26aa65e39c6d58613ea7d 100644 (file)
@@ -38,10 +38,10 @@ import org.tianocore.frameworkwizard.common.DataValidation;
 import org.tianocore.frameworkwizard.common.FileOperation;\r
 import org.tianocore.frameworkwizard.common.IFileFilter;\r
 import org.tianocore.frameworkwizard.common.Log;\r
+import org.tianocore.frameworkwizard.common.OpenFile;\r
 import org.tianocore.frameworkwizard.common.SaveFile;\r
 import org.tianocore.frameworkwizard.common.Tools;\r
 import org.tianocore.frameworkwizard.common.Identifications.Identification;\r
-import org.tianocore.frameworkwizard.common.Identifications.OpenFile;\r
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
index 71e50f38449df866caac5eb8aaf0203116332ad1..80df4135c336769951c5031d17380f7f41ef3d59 100644 (file)
@@ -50,10 +50,10 @@ import org.tianocore.PlatformSurfaceAreaDocument;
 import org.tianocore.frameworkwizard.common.DataType;\r
 import org.tianocore.frameworkwizard.common.IFileFilter;\r
 import org.tianocore.frameworkwizard.common.Log;\r
+import org.tianocore.frameworkwizard.common.OpenFile;\r
 import org.tianocore.frameworkwizard.common.SaveFile;\r
 import org.tianocore.frameworkwizard.common.Tools;\r
 import org.tianocore.frameworkwizard.common.Identifications.Identification;\r
-import org.tianocore.frameworkwizard.common.Identifications.OpenFile;\r
 import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleList;\r
 import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType;\r
 import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageList;\r
index d6be739b47afa78a2344951a463d0495900e8c07..3d5a696954ea12a71d0722224d76815d8aadf9bd 100644 (file)
@@ -58,7 +58,7 @@ public class SelectModuleBelong extends IDialog {
      **/\r
     private static final long serialVersionUID = 4171355136991448972L;\r
 \r
-    private JPanel jContentPane = null;  //  @jve:decl-index=0:visual-constraint="10,54"\r
+    private JPanel jContentPane = null;\r
 \r
     private JComboBox jComboBoxExistingPackage = null;\r
 \r
@@ -99,7 +99,7 @@ public class SelectModuleBelong extends IDialog {
     private StarLabel jStarLabel4 = null;\r
 \r
     private StarLabel jStarLabel5 = null;\r
-    \r
+\r
     private ButtonGroup bg = new ButtonGroup();\r
 \r
     private WorkspaceTools wt = new WorkspaceTools();\r
@@ -251,8 +251,8 @@ public class SelectModuleBelong extends IDialog {
     private JRadioButton getJRadioButtonYes() {\r
         if (jRadioButtonYes == null) {\r
             jRadioButtonYes = new JRadioButton();\r
-            jRadioButtonYes.setBounds(new java.awt.Rectangle(140,35,100,20));\r
-            jRadioButtonYes.setSelected(true);\r
+            jRadioButtonYes.setBounds(new java.awt.Rectangle(140, 35, 100, 20));\r
+            jRadioButtonYes.setSelected(false);\r
             jRadioButtonYes.setText("Yes");\r
         }\r
         return jRadioButtonYes;\r
@@ -266,8 +266,8 @@ public class SelectModuleBelong extends IDialog {
     private JRadioButton getJRadioButtonNo() {\r
         if (jRadioButtonNo == null) {\r
             jRadioButtonNo = new JRadioButton();\r
-            jRadioButtonNo.setBounds(new java.awt.Rectangle(300,35,110,20));\r
-            jRadioButtonNo.setSelected(false);\r
+            jRadioButtonNo.setBounds(new java.awt.Rectangle(300, 35, 110, 20));\r
+            jRadioButtonNo.setSelected(true);\r
             jRadioButtonNo.setText("No");\r
         }\r
         return jRadioButtonNo;\r
@@ -341,7 +341,7 @@ public class SelectModuleBelong extends IDialog {
     private JPanel getJContentPane() {\r
         if (jContentPane == null) {\r
             jLabelIsLibrary = new JLabel();\r
-            jLabelIsLibrary.setBounds(new java.awt.Rectangle(15,35,120,20));\r
+            jLabelIsLibrary.setBounds(new java.awt.Rectangle(15, 35, 120, 20));\r
             jLabelIsLibrary.setText("Is a Library");\r
             jLabelVersion = new JLabel();\r
             jLabelVersion.setBounds(new java.awt.Rectangle(15, 135, 120, 20));\r
@@ -360,7 +360,7 @@ public class SelectModuleBelong extends IDialog {
             jLabelPackage.setText("Choose Package");\r
             jContentPane = new JPanel();\r
             jContentPane.setLayout(null);\r
-            jContentPane.setSize(new java.awt.Dimension(490,198));\r
+            jContentPane.setSize(new java.awt.Dimension(490, 198));\r
             jContentPane.add(getJComboBoxExistingPackage(), null);\r
             jContentPane.add(getJButtonOk(), null);\r
             jContentPane.add(getJButtonCancel(), null);\r
@@ -726,7 +726,7 @@ public class SelectModuleBelong extends IDialog {
     public void setPid(PackageIdentification pid) {\r
         this.pid = pid;\r
     }\r
-    \r
+\r
     private void upLocation(Component c, int size) {\r
         c.setLocation(c.getLocation().x, c.getLocation().y - size);\r
     }\r
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 (file)
index 9e16ca1..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/** @file\r
\r
- The file provides interface to open xml file.\r
\r
- Copyright (c) 2006, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution.  The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- **/\r
-package org.tianocore.frameworkwizard.common.Identifications;\r
-\r
-import java.io.File;\r
-import java.io.IOException;\r
-\r
-import org.apache.xmlbeans.XmlException;\r
-import org.apache.xmlbeans.XmlObject;\r
-import org.tianocore.FrameworkDatabaseDocument;\r
-import org.tianocore.ModuleSurfaceAreaDocument;\r
-import org.tianocore.PackageSurfaceAreaDocument;\r
-import org.tianocore.PlatformSurfaceAreaDocument;\r
-import org.tianocore.FrameworkDatabaseDocument.FrameworkDatabase;\r
-import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;\r
-import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea;\r
-import org.tianocore.PlatformSurfaceAreaDocument.PlatformSurfaceArea;\r
-import org.tianocore.frameworkwizard.common.Log;\r
-\r
-public class OpenFile {\r
-    /**\r
-     \r
-     @param args\r
-     \r
-     **/\r
-    public static void main(String[] args) {\r
-        // TODO Auto-generated method stub\r
-\r
-    }\r
-\r
-    /**\r
-     Open specificed Msa file and read its content\r
-     \r
-     @param strMsaFilePath The input data of Msa File Path\r
-     \r
-     **/\r
-    public static ModuleSurfaceArea openMsaFile(String strMsaFilePath) throws IOException, XmlException, Exception {\r
-        Log.log("Open Msa", strMsaFilePath);\r
-        File msaFile = new File(strMsaFilePath);\r
-        ModuleSurfaceAreaDocument xmlMsaDoc = (ModuleSurfaceAreaDocument) XmlObject.Factory.parse(msaFile);\r
-        return xmlMsaDoc.getModuleSurfaceArea();\r
-    }\r
-\r
-    /**\r
-     Open specificed Spd file and read its content\r
-     \r
-     @param strSpdFilePath The input data of Spd File Path\r
-     \r
-     **/\r
-    public static PackageSurfaceArea openSpdFile(String strSpdFilePath) throws IOException, XmlException, Exception {\r
-        Log.log("Open Spd", strSpdFilePath);\r
-        File spdFile = new File(strSpdFilePath);\r
-        PackageSurfaceAreaDocument xmlSpdDoc = (PackageSurfaceAreaDocument) XmlObject.Factory.parse(spdFile);\r
-        return xmlSpdDoc.getPackageSurfaceArea();\r
-    }\r
-\r
-    /**\r
-     Open specificed Fpd file and read its content\r
-     \r
-     @param strFpdFilePath The input data of Fpd File Path\r
-     \r
-     **/\r
-    public static PlatformSurfaceArea openFpdFile(String strFpdFilePath) throws IOException, XmlException,\r
-                                                                                 Exception {\r
-        Log.log("Open Fpd", strFpdFilePath);\r
-        File fpdFile = new File(strFpdFilePath);\r
-        PlatformSurfaceAreaDocument xmlFpdDoc = null;\r
-        xmlFpdDoc = (PlatformSurfaceAreaDocument) XmlObject.Factory.parse(fpdFile);\r
-        return xmlFpdDoc.getPlatformSurfaceArea();\r
-    }\r
-\r
-    /**\r
-     \r
-     Open specificed Framework Database file and read its content\r
-     \r
-     */\r
-    public static FrameworkDatabase openFrameworkDb(String strDbFilePath) throws IOException, XmlException, Exception {\r
-        Log.log("Open Framework Database", strDbFilePath);\r
-        File db = new File(strDbFilePath);\r
-        FrameworkDatabaseDocument xmlDb = null;\r
-        xmlDb = (FrameworkDatabaseDocument) XmlObject.Factory.parse(db);\r
-        return xmlDb.getFrameworkDatabase();\r
-    }\r
-}\r
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 (file)
index 0000000..32eec68
--- /dev/null
@@ -0,0 +1,95 @@
+/** @file\r
\r
+ The file provides interface to open xml file.\r
\r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution.  The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
+ **/\r
+package org.tianocore.frameworkwizard.common;\r
+\r
+import java.io.File;\r
+import java.io.IOException;\r
+\r
+import org.apache.xmlbeans.XmlException;\r
+import org.apache.xmlbeans.XmlObject;\r
+import org.tianocore.FrameworkDatabaseDocument;\r
+import org.tianocore.ModuleSurfaceAreaDocument;\r
+import org.tianocore.PackageSurfaceAreaDocument;\r
+import org.tianocore.PlatformSurfaceAreaDocument;\r
+import org.tianocore.FrameworkDatabaseDocument.FrameworkDatabase;\r
+import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;\r
+import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea;\r
+import org.tianocore.PlatformSurfaceAreaDocument.PlatformSurfaceArea;\r
+\r
+public class OpenFile {\r
+    /**\r
+     \r
+     @param args\r
+     \r
+     **/\r
+    public static void main(String[] args) {\r
+        // TODO Auto-generated method stub\r
+\r
+    }\r
+\r
+    /**\r
+     Open specificed Msa file and read its content\r
+     \r
+     @param strMsaFilePath The input data of Msa File Path\r
+     \r
+     **/\r
+    public static ModuleSurfaceArea openMsaFile(String strMsaFilePath) throws IOException, XmlException, Exception {\r
+        Log.log("Open Msa", strMsaFilePath);\r
+        File msaFile = new File(strMsaFilePath);\r
+        ModuleSurfaceAreaDocument xmlMsaDoc = (ModuleSurfaceAreaDocument) XmlObject.Factory.parse(msaFile);\r
+        return xmlMsaDoc.getModuleSurfaceArea();\r
+    }\r
+\r
+    /**\r
+     Open specificed Spd file and read its content\r
+     \r
+     @param strSpdFilePath The input data of Spd File Path\r
+     \r
+     **/\r
+    public static PackageSurfaceArea openSpdFile(String strSpdFilePath) throws IOException, XmlException, Exception {\r
+        Log.log("Open Spd", strSpdFilePath);\r
+        File spdFile = new File(strSpdFilePath);\r
+        PackageSurfaceAreaDocument xmlSpdDoc = (PackageSurfaceAreaDocument) XmlObject.Factory.parse(spdFile);\r
+        return xmlSpdDoc.getPackageSurfaceArea();\r
+    }\r
+\r
+    /**\r
+     Open specificed Fpd file and read its content\r
+     \r
+     @param strFpdFilePath The input data of Fpd File Path\r
+     \r
+     **/\r
+    public static PlatformSurfaceArea openFpdFile(String strFpdFilePath) throws IOException, XmlException,\r
+                                                                                 Exception {\r
+        Log.log("Open Fpd", strFpdFilePath);\r
+        File fpdFile = new File(strFpdFilePath);\r
+        PlatformSurfaceAreaDocument xmlFpdDoc = null;\r
+        xmlFpdDoc = (PlatformSurfaceAreaDocument) XmlObject.Factory.parse(fpdFile);\r
+        return xmlFpdDoc.getPlatformSurfaceArea();\r
+    }\r
+\r
+    /**\r
+     \r
+     Open specificed Framework Database file and read its content\r
+     \r
+     */\r
+    public static FrameworkDatabase openFrameworkDb(String strDbFilePath) throws IOException, XmlException, Exception {\r
+        Log.log("Open Framework Database", strDbFilePath);\r
+        File db = new File(strDbFilePath);\r
+        FrameworkDatabaseDocument xmlDb = null;\r
+        xmlDb = (FrameworkDatabaseDocument) XmlObject.Factory.parse(db);\r
+        return xmlDb.getFrameworkDatabase();\r
+    }\r
+}\r
index f2a52633acda34cd71d52c32fe6e5368ed145699..a3ebfed8de990008fd48ea18437b021472bcb45f 100644 (file)
@@ -25,7 +25,7 @@ import org.tianocore.ModuleSurfaceAreaDocument;
 import org.tianocore.PackageDependenciesDocument;\r
 import org.tianocore.PackageSurfaceAreaDocument;\r
 import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;\r
-import org.tianocore.frameworkwizard.common.Identifications.OpenFile;\r
+import org.tianocore.frameworkwizard.common.OpenFile;\r
 import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
index 8671204b98c9370fe6a32a4765c077e81e4fb01c..02189d92ef0800d124e7b2656dbd04994420ee17 100644 (file)
@@ -23,8 +23,8 @@ import org.tianocore.LibraryUsage;
 import org.tianocore.LibraryClassDefinitionsDocument.LibraryClassDefinitions;\r
 import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;\r
 import org.tianocore.frameworkwizard.common.DataType;\r
+import org.tianocore.frameworkwizard.common.OpenFile;\r
 import org.tianocore.frameworkwizard.common.Identifications.Identification;\r
-import org.tianocore.frameworkwizard.common.Identifications.OpenFile;\r
 import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
 \r
 public class ModuleIdentification extends Identification {\r
index c08ae2116616f5bb91725a1d9a605f1a2a9cab0f..0e5cdc97a59befcca0957a40faadfcdab1dce44c 100644 (file)
@@ -92,6 +92,9 @@ public class SourceFilesVector {
     public Vector<String> toStringVector(int index) {\r
         Vector<String> v = new Vector<String>();\r
         v.addElement(getSourceFiles(index).getFilename());\r
+        v.addElement(getSourceFiles(index).getTagName());\r
+        v.addElement(getSourceFiles(index).getToolCode());\r
+        v.addElement(getSourceFiles(index).getToolChainFamily());\r
         return v;\r
     }\r
 }\r
index eab29befa3ca1612df6a9e8a391ca1ce18a96a0b..eaeb13e52d79208238c40195272c8440275e6c77 100644 (file)
@@ -181,6 +181,9 @@ public class ModuleSourceFiles extends IInternalFrame {
             jTable.setRowHeight(20);\r
 \r
             model.addColumn("File Name");\r
+            model.addColumn("Tag Name");\r
+            model.addColumn("Tool Code");\r
+            model.addColumn("Tool Chain Family");\r
 \r
             jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
             jTable.getSelectionModel().addListSelectionListener(this);\r
index 16cfaad87a7307bc0b0943fe337823c71e8b2a05..43ae277eee22abe9caf072d091ab6ee74db712b4 100644 (file)
@@ -34,11 +34,11 @@ import org.tianocore.SourceFilesDocument.SourceFiles;
 import org.tianocore.SpdHeaderDocument.SpdHeader;\r
 import org.tianocore.frameworkwizard.common.DataType;\r
 import org.tianocore.frameworkwizard.common.Log;\r
+import org.tianocore.frameworkwizard.common.OpenFile;\r
 import org.tianocore.frameworkwizard.common.SaveFile;\r
 import org.tianocore.frameworkwizard.common.Sort;\r
 import org.tianocore.frameworkwizard.common.Tools;\r
 import org.tianocore.frameworkwizard.common.Identifications.Identification;\r
-import org.tianocore.frameworkwizard.common.Identifications.OpenFile;\r
 import org.tianocore.frameworkwizard.far.FarHeader;\r
 import org.tianocore.frameworkwizard.far.FarIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r