]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Fix EDKT321 A module's all top level elements' arch should be in range of the...
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Sep 2006 00:47:40 +0000 (00:47 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Sep 2006 00:47:40 +0000 (00:47 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1620 6f19259b-4bc3-4df7-8a09-765794883524

27 files changed:
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ArchCheckBox.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BootModesDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/DataHubsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ExternsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HiiPackagesDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/LibraryClassDefsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PackageDepDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PpisDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ProtocolsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SourceFilesDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java

index 62d4a33cb22fea8e439bd3b72069838e83ab701a..d02c1214330e0aca0858d499ff22241c46fd0e07 100644 (file)
@@ -158,22 +158,22 @@ public class ArchCheckBox extends JPanel {
 \r
     public Vector<String> getSelectedItemsVector() {\r
         Vector<String> v = new Vector<String>();\r
-        if (this.jCheckBoxIa32.isSelected()) {\r
+        if (this.jCheckBoxIa32.isSelected() && this.jCheckBoxIa32.isEnabled()) {\r
             v.addElement(jCheckBoxIa32.getText());\r
         }\r
-        if (this.jCheckBoxX64.isSelected()) {\r
+        if (this.jCheckBoxX64.isSelected() && this.jCheckBoxX64.isEnabled()) {\r
             v.addElement(jCheckBoxX64.getText());\r
         }\r
-        if (this.jCheckBoxIpf.isSelected()) {\r
+        if (this.jCheckBoxIpf.isSelected() && this.jCheckBoxIpf.isEnabled()) {\r
             v.addElement(jCheckBoxIpf.getText());\r
         }\r
-        if (this.jCheckBoxEbc.isSelected()) {\r
+        if (this.jCheckBoxEbc.isSelected() && this.jCheckBoxEbc.isEnabled()) {\r
             v.addElement(jCheckBoxEbc.getText());\r
         }\r
-        if (this.jCheckBoxArm.isSelected()) {\r
+        if (this.jCheckBoxArm.isSelected() && this.jCheckBoxArm.isEnabled()) {\r
             v.addElement(jCheckBoxArm.getText());\r
         }\r
-        if (this.jCheckBoxPpc.isSelected()) {\r
+        if (this.jCheckBoxPpc.isSelected() && this.jCheckBoxPpc.isEnabled()) {\r
             v.addElement(jCheckBoxPpc.getText());\r
         }\r
         return v;\r
@@ -181,22 +181,22 @@ public class ArchCheckBox extends JPanel {
 \r
     public String getSelectedItemsString() {\r
         String s = "";\r
-        if (this.jCheckBoxIa32.isSelected()) {\r
+        if (this.jCheckBoxIa32.isSelected() && this.jCheckBoxIa32.isEnabled()) {\r
             s = s + jCheckBoxIa32.getText() + " ";\r
         }\r
-        if (this.jCheckBoxX64.isSelected()) {\r
+        if (this.jCheckBoxX64.isSelected() && this.jCheckBoxX64.isEnabled()) {\r
             s = s + jCheckBoxX64.getText() + " ";\r
         }\r
-        if (this.jCheckBoxIpf.isSelected()) {\r
+        if (this.jCheckBoxIpf.isSelected() && this.jCheckBoxIpf.isEnabled()) {\r
             s = s + jCheckBoxIpf.getText() + " ";\r
         }\r
-        if (this.jCheckBoxEbc.isSelected()) {\r
+        if (this.jCheckBoxEbc.isSelected() && this.jCheckBoxEbc.isEnabled()) {\r
             s = s + jCheckBoxEbc.getText() + " ";\r
         }\r
-        if (this.jCheckBoxArm.isSelected()) {\r
+        if (this.jCheckBoxArm.isSelected() && this.jCheckBoxArm.isEnabled()) {\r
             s = s + jCheckBoxArm.getText() + " ";\r
         }\r
-        if (this.jCheckBoxPpc.isSelected()) {\r
+        if (this.jCheckBoxPpc.isSelected() && this.jCheckBoxPpc.isEnabled()) {\r
             s = s + jCheckBoxPpc.getText() + " ";\r
         }\r
         return s.trim();\r
index 46b333efbec7a07f0da5dc8d61d21720831695f9..7cde6817865dfa9f079f5762fb3835f818032f65 100644 (file)
@@ -289,7 +289,7 @@ public class ModuleBootModes extends IInternalFrame {
     }\r
 \r
     private void showEdit(int index) {\r
-        BootModesDlg dlg = new BootModesDlg(vid.getBootModes(index), new IFrame());\r
+        BootModesDlg dlg = new BootModesDlg(vid.getBootModes(index), new IFrame(), omt.getId());\r
         int result = dlg.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
index 85a4a93a5f21cb6a933a2cfe6c03825f5772b2d4..94999d0ce346650f3805058d96a1c71420c790ef 100644 (file)
@@ -286,7 +286,7 @@ public class ModuleDataHubs extends IInternalFrame {
     }\r
 \r
     private void showEdit(int index) {\r
-        DataHubsDlg dlg = new DataHubsDlg(vid.getDataHubs(index), new IFrame());\r
+        DataHubsDlg dlg = new DataHubsDlg(vid.getDataHubs(index), new IFrame(), omt.getId());\r
         int result = dlg.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
index c8f34c6d1db983b37f5edb8d35e13cb1d1596caf..7db1d9763bce7fe7515513e176a4121c64b7a97c 100644 (file)
@@ -315,7 +315,7 @@ public class ModuleEvents extends IInternalFrame {
     }\r
 \r
     private void showEdit(int index) {\r
-        EventsDlg dlg = new EventsDlg(vid.getEvents(index), new IFrame());\r
+        EventsDlg dlg = new EventsDlg(vid.getEvents(index), new IFrame(), omt.getId());\r
         int result = dlg.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
index cc8a81a167bfbfe1245e2946ebe6a6ff4ad8ca9c..4b4ea0daa2067a861f996e23d8a6817201bf0633 100644 (file)
@@ -344,7 +344,7 @@ public class ModuleExterns extends IInternalFrame implements ItemListener {
     }\r
 \r
     private void showEdit(int index) {\r
-        ExternsDlg dlg = new ExternsDlg(vid.getExterns(index), new IFrame());\r
+        ExternsDlg dlg = new ExternsDlg(vid.getExterns(index), new IFrame(), omt.getId());\r
         int result = dlg.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
index a1efd28263ca03f25228cee67a90db3e9f9505c9..0c1126c848376e855f77641c6e4072e4d5f5ab27 100644 (file)
@@ -215,7 +215,7 @@ public class ModuleHiiPackages extends IInternalFrame {
     private void init(HiiPackages inHiiPackages) {\r
         init();\r
         this.hiiPackages = inHiiPackages;\r
-\r
+        \r
         if (this.hiiPackages != null) {\r
             if (this.hiiPackages.getHiiPackageList().size() > 0) {\r
                 for (int index = 0; index < this.hiiPackages.getHiiPackageList().size(); index++) {\r
@@ -286,7 +286,7 @@ public class ModuleHiiPackages extends IInternalFrame {
     }\r
 \r
     private void showEdit(int index) {\r
-        HiiPackagesDlg dlg = new HiiPackagesDlg(vid.getHiiPackages(index), new IFrame());\r
+        HiiPackagesDlg dlg = new HiiPackagesDlg(vid.getHiiPackages(index), new IFrame(), omt.getId());\r
         int result = dlg.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
index 06ca286a2cf6ed95a7c62e45b88a429fd18dcd0c..0dca57cf6c065584fa8c35325fedc185f6766af0 100644 (file)
@@ -289,7 +289,7 @@ public class ModuleHobs extends IInternalFrame {
     }\r
 \r
     private void showEdit(int index) {\r
-        HobsDlg dlg = new HobsDlg(vid.getHobs(index), new IFrame());\r
+        HobsDlg dlg = new HobsDlg(vid.getHobs(index), new IFrame(), omt.getId());\r
         int result = dlg.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
index 563d3c88eaf2545950d70585fc6aec21edd4efc5..4b08c65c110925a264617d921e82fdedccac50ba 100644 (file)
@@ -294,7 +294,7 @@ public class ModulePackageDependencies extends IInternalFrame {
     }\r
 \r
     private void showEdit(int index) {\r
-        PackageDepDlg pdd = new PackageDepDlg(vid.getPackageDependencies(index), new IFrame());\r
+        PackageDepDlg pdd = new PackageDepDlg(vid.getPackageDependencies(index), new IFrame(), omt.getId());\r
         int result = pdd.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
index 26d43ab5212875ea15173c83121f3f2f9d09e925..36049b3d81132504b714dc62bf13ba9d2b097ecd 100644 (file)
@@ -348,8 +348,7 @@ public class ModuleSourceFiles extends IInternalFrame {
     }\r
 \r
     private void showEdit(int index) {\r
-        SourceFilesDlg sfd = new SourceFilesDlg(this.vSourceFiles.getSourceFiles(index), new IFrame(), omt.getId()\r
-                                                                                                          .getPath());\r
+        SourceFilesDlg sfd = new SourceFilesDlg(this.vSourceFiles.getSourceFiles(index), new IFrame(), omt.getId());\r
         int result = sfd.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
index a9973c06965e734798d162176250c41a77073cba..f3fab22c232592a1260f2bbd6780e79cf9583d23 100644 (file)
@@ -286,7 +286,7 @@ public class ModuleSystemTables extends IInternalFrame {
     }\r
 \r
     private void showEdit(int index) {\r
-        SystemTablesDlg dlg = new SystemTablesDlg(vid.getSystemTables(index), new IFrame());\r
+        SystemTablesDlg dlg = new SystemTablesDlg(vid.getSystemTables(index), new IFrame(), omt.getId());\r
         int result = dlg.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
index 4c2c10fbd3d4c92f9920b807bc88ceca8d4dd8fa..0da492202c910a5fd40d1da0dfd9814e651d6336 100644 (file)
@@ -286,7 +286,7 @@ public class ModuleVariables extends IInternalFrame {
     }\r
 \r
     private void showEdit(int index) {\r
-        VariablesDlg dlg = new VariablesDlg(vid.getVariables(index), new IFrame());\r
+        VariablesDlg dlg = new VariablesDlg(vid.getVariables(index), new IFrame(), omt.getId());\r
         int result = dlg.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
index 88a010ef35bcc84375e69354842064c1ac84e149..41aec889df3aebbd130bcd6d9ba63a5a0381d023 100644 (file)
@@ -39,7 +39,9 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.BootModes.BootModesIdentification;\r
+import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
 /**\r
  * The class is used to create, update BootModes of MSA/MBD file\r
@@ -97,6 +99,8 @@ public class BootModesDlg extends IDialog {
     private BootModesIdentification id = null;\r
 \r
     private EnumerationData ed = new EnumerationData();\r
+    \r
+    private WorkspaceTools wt = new WorkspaceTools();\r
 \r
     /**\r
      * This method initializes jComboBoxBootModeName\r
@@ -263,10 +267,15 @@ public class BootModesDlg extends IDialog {
      * @param inBootModesId\r
      * \r
      */\r
-    private void init(BootModesIdentification inBootModesId) {\r
+    private void init(BootModesIdentification inBootModesId, ModuleIdentification mid) {\r
         init();\r
         this.id = inBootModesId;\r
-\r
+        \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
         if (this.id != null) {\r
             this.jComboBoxBootModeName.setSelectedItem(id.getName());\r
             this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
@@ -283,9 +292,9 @@ public class BootModesDlg extends IDialog {
      * @param iFrame\r
      * \r
      */\r
-    public BootModesDlg(BootModesIdentification inBootModesIdentification, IFrame iFrame) {\r
+    public BootModesDlg(BootModesIdentification inBootModesIdentification, IFrame iFrame, ModuleIdentification mid) {\r
         super(iFrame, true);\r
-        init(inBootModesIdentification);\r
+        init(inBootModesIdentification, mid);\r
     }\r
 \r
     /**\r
index 87c67287658c24f492d719fcee01fe7fcfef4973..a3c6c638383371081168bc154945c4ae0a4b7298 100644 (file)
@@ -39,7 +39,9 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.DataHubs.DataHubsIdentification;\r
+import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
 /**\r
  * The class is used to create, update DataHub of the MSA file\r
@@ -97,6 +99,8 @@ public class DataHubsDlg extends IDialog {
     private DataHubsIdentification id = null;\r
 \r
     private EnumerationData ed = new EnumerationData();\r
+    \r
+    private WorkspaceTools wt = new WorkspaceTools();\r
 \r
     /**\r
      * This method initializes jTextFieldDataHubRecord\r
@@ -254,10 +258,15 @@ public class DataHubsDlg extends IDialog {
      * @param inDataHubsId\r
      * \r
      */\r
-    private void init(DataHubsIdentification inDataHubsId) {\r
+    private void init(DataHubsIdentification inDataHubsId, ModuleIdentification mid) {\r
         init();\r
         this.id = inDataHubsId;\r
 \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
         if (this.id != null) {\r
             this.jTextFieldDataHubRecord.setText(id.getName());\r
             this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
@@ -274,9 +283,9 @@ public class DataHubsDlg extends IDialog {
      * @param iFrame\r
      * \r
      */\r
-    public DataHubsDlg(DataHubsIdentification inDataHubsIdentification, IFrame iFrame) {\r
+    public DataHubsDlg(DataHubsIdentification inDataHubsIdentification, IFrame iFrame, ModuleIdentification mid) {\r
         super(iFrame, true);\r
-        init(inDataHubsIdentification);\r
+        init(inDataHubsIdentification, mid);\r
     }\r
 \r
     /**\r
index a37061755acc7e19106727385a3336eef3f829e4..6c435827e8f5ab7c52060d1d8fdeb569d14f8110 100644 (file)
@@ -34,6 +34,7 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.Events.EventsIdentification;\r
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
@@ -303,10 +304,15 @@ public class EventsDlg extends IDialog {
      * @param inEventsId\r
      * \r
      */\r
-    private void init(EventsIdentification inEventsId) {\r
+    private void init(EventsIdentification inEventsId, ModuleIdentification mid) {\r
         init();\r
         this.id = inEventsId;\r
-\r
+        \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
         if (this.id != null) {\r
             this.jComboBoxGuidC_Name.setSelectedItem(id.getName());\r
             this.jComboBoxEventsType.setSelectedItem(id.getType());\r
@@ -326,9 +332,9 @@ public class EventsDlg extends IDialog {
      * @param iFrame\r
      * \r
      */\r
-    public EventsDlg(EventsIdentification inEventsIdentification, IFrame iFrame) {\r
+    public EventsDlg(EventsIdentification inEventsIdentification, IFrame iFrame, ModuleIdentification mid) {\r
         super(iFrame, true);\r
-        init(inEventsIdentification);\r
+        init(inEventsIdentification, mid);\r
     }\r
 \r
     /**\r
index 6ff84ffc7845b183fa5dea5bada4dd79308f9e95..3a94511e1e597bd2438090c3efb9dd940307d4bc 100644 (file)
@@ -35,7 +35,9 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.Externs.ExternsIdentification;\r
+import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
 /**\r
  * The class is used to create, update Externs section of the MSA file\r
@@ -135,6 +137,10 @@ public class ExternsDlg extends IDialog implements ItemListener {
     private ExternsIdentification id = null;\r
 \r
     private EnumerationData ed = new EnumerationData();\r
+    \r
+    private WorkspaceTools wt = new WorkspaceTools();\r
+    \r
+    private Vector<String> vArchList = new Vector<String>();\r
 \r
     /**\r
      This method initializes jComboBoxType \r
@@ -511,9 +517,14 @@ public class ExternsDlg extends IDialog implements ItemListener {
      @param inExternsId\r
 \r
      **/\r
-    private void init(ExternsIdentification inExternsId) {\r
+    private void init(ExternsIdentification inExternsId, ModuleIdentification mid) {\r
         init();\r
         this.id = inExternsId;\r
+        \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.vArchList = wt.getModuleArch(mid);\r
 \r
         if (this.id != null) {\r
             String type = id.getType();\r
@@ -576,9 +587,9 @@ public class ExternsDlg extends IDialog implements ItemListener {
      @param iFrame\r
      \r
      **/\r
-    public ExternsDlg(ExternsIdentification inExternsIdentification, IFrame iFrame) {\r
+    public ExternsDlg(ExternsIdentification inExternsIdentification, IFrame iFrame, ModuleIdentification mid) {\r
         super(iFrame, true);\r
-        init(inExternsIdentification);\r
+        init(inExternsIdentification, mid);\r
     }\r
 \r
     /**\r
@@ -878,7 +889,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
                 this.jPanelDriver.setVisible(false);\r
                 this.jPanelCallBack.setVisible(false);\r
                 this.jLabelArch.setEnabled(true);\r
-                this.jArchCheckBox.setAllItemsEnabled(true);\r
+                this.jArchCheckBox.setEnabledItems(this.vArchList);\r
                 this.jLabelArch.setLocation(12, 87);\r
                 this.jArchCheckBox.setLocation(168, 87);\r
                 this.jLabelFeatureFlag.setLocation(12, 112);\r
@@ -890,7 +901,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
                 this.jPanelDriver.setVisible(false);\r
                 this.jPanelCallBack.setVisible(false);\r
                 this.jLabelArch.setEnabled(true);\r
-                this.jArchCheckBox.setAllItemsEnabled(true);\r
+                this.jArchCheckBox.setEnabledItems(this.vArchList);\r
                 this.jLabelArch.setLocation(12, 87);\r
                 this.jArchCheckBox.setLocation(168, 87);\r
                 this.jLabelFeatureFlag.setLocation(12, 112);\r
@@ -902,7 +913,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
                 this.jPanelDriver.setVisible(true);\r
                 this.jPanelCallBack.setVisible(false);\r
                 this.jLabelArch.setEnabled(true);\r
-                this.jArchCheckBox.setAllItemsEnabled(true);\r
+                this.jArchCheckBox.setEnabledItems(this.vArchList);\r
                 this.jLabelArch.setLocation(12, 137);\r
                 this.jArchCheckBox.setLocation(168, 137);\r
                 this.jLabelFeatureFlag.setLocation(12, 162);\r
@@ -914,7 +925,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
                 this.jPanelDriver.setVisible(false);\r
                 this.jPanelCallBack.setVisible(true);\r
                 this.jLabelArch.setEnabled(true);\r
-                this.jArchCheckBox.setAllItemsEnabled(true);\r
+                this.jArchCheckBox.setEnabledItems(this.vArchList);\r
                 this.jLabelArch.setLocation(12, 87);\r
                 this.jArchCheckBox.setLocation(168, 87);\r
                 this.jLabelFeatureFlag.setLocation(12, 112);\r
index 4c6e2a7088f6c8c5165bad143902a174dc078c77..e0475a5e06d207bfa3c8c4fb289bec4a43022b9f 100644 (file)
@@ -261,6 +261,14 @@ public class GuidsDlg extends IDialog {
         init();\r
         this.id = inGuidsId;\r
         \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
+        //\r
+        // Get defined guids from dependent packages\r
+        //\r
         Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);\r
         if (vpid.size() <= 0) {\r
             Log.wrn("Init Guid", "This module hasn't defined any package dependency, so there is no guid can be added");\r
index 6f0c0248add75018195015732df655ba646e1a70..906be0b9ff423e1e3cd7a54e4d69af6661d08178 100644 (file)
@@ -34,7 +34,9 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.HiiPackages.HiiPackagesIdentification;\r
+import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
 /**\r
  * The class is used to create, update Hii Packages of the MSA file\r
@@ -92,6 +94,8 @@ public class HiiPackagesDlg extends IDialog {
     private HiiPackagesIdentification id = null;\r
 \r
     private EnumerationData ed = new EnumerationData();\r
+    \r
+    private WorkspaceTools wt = new WorkspaceTools();\r
 \r
     /**\r
      * \r
@@ -257,10 +261,15 @@ public class HiiPackagesDlg extends IDialog {
      * @param inHiiPackagesId\r
      * \r
      **/\r
-    private void init(HiiPackagesIdentification inHiiPackagesId) {\r
+    private void init(HiiPackagesIdentification inHiiPackagesId, ModuleIdentification mid) {\r
         init();\r
         this.id = inHiiPackagesId;\r
-\r
+        \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
         if (this.id != null) {\r
             this.jTextFieldName.setText(id.getName());\r
             this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
@@ -277,9 +286,9 @@ public class HiiPackagesDlg extends IDialog {
      * @param iFrame\r
      * \r
      **/\r
-    public HiiPackagesDlg(HiiPackagesIdentification inHiiPackagesIdentification, IFrame iFrame) {\r
+    public HiiPackagesDlg(HiiPackagesIdentification inHiiPackagesIdentification, IFrame iFrame, ModuleIdentification mid) {\r
         super(iFrame, true);\r
-        init(inHiiPackagesIdentification);\r
+        init(inHiiPackagesIdentification, mid);\r
     }\r
 \r
     /**\r
index 3448cb3d8901cd0dc70a2861ed4dcb8cccd74516..eaba4c6c973f92021a6f47fdac901f1492308461 100644 (file)
@@ -34,6 +34,7 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.Hobs.HobsIdentification;\r
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
@@ -283,10 +284,15 @@ public class HobsDlg extends IDialog {
      * @param inHobsId\r
      * \r
      */\r
-    private void init(HobsIdentification inHobsId) {\r
+    private void init(HobsIdentification inHobsId, ModuleIdentification mid) {\r
         init();\r
         this.id = inHobsId;\r
-\r
+        \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
         if (this.id != null) {\r
             this.jComboBoxGuidC_Name.setSelectedItem(id.getName());\r
             this.jComboBoxHobType.setSelectedItem(id.getType());\r
@@ -304,9 +310,9 @@ public class HobsDlg extends IDialog {
      * @param iFrame\r
      * \r
      */\r
-    public HobsDlg(HobsIdentification inHobsIdentification, IFrame iFrame) {\r
+    public HobsDlg(HobsIdentification inHobsIdentification, IFrame iFrame, ModuleIdentification mid) {\r
         super(iFrame, true);\r
-        init(inHobsIdentification);\r
+        init(inHobsIdentification, mid);\r
     }\r
 \r
     /**\r
index 87708b836c7b248ee8f774dd8f54250bd3481c36..c475b4ab1bdcbeff159832fa15d0ca4454fcfc3e 100644 (file)
@@ -330,6 +330,14 @@ public class LibraryClassDefsDlg extends IDialog {
         init();\r
         this.lcid = inLibraryClassIdentification;\r
         \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
+        //\r
+        // Get defined library classes from dependent packages\r
+        //\r
         Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);\r
         if (vpid.size() <= 0) {\r
             Log.wrn("Init Library Class", "This module hasn't defined any package dependency, so there is no library class can be added");\r
index 58b983dad7c64f12ece2b82168bcb5f1515d0f24..fa3d4a4f33e916ff6137973c4d4e1243ee3f4e6f 100644 (file)
@@ -313,6 +313,14 @@ public class PCDsDlg extends IDialog implements ItemListener {
         init();\r
         this.id = inPcdCodedId;\r
         \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
+        //\r
+        // Get defined pcds from dependent packages\r
+        //\r
         Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);\r
         if (vpid.size() <= 0) {\r
             Log.wrn("Init Pcd", "This module hasn't defined any package dependency, so there is no pcd can be added");\r
index 4af5b4f7d37ab5472450658854ed8f07860876fe..00161b5ecb325cc2f07f3266fdb3cfd8b1b55983 100644 (file)
@@ -33,6 +33,7 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.PackageDependencies.PackageDependenciesIdentification;\r
 import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
@@ -224,9 +225,15 @@ public class PackageDepDlg extends IDialog implements ItemListener {
      * This method initializes this\r
      * \r
      */\r
-    private void init(PackageDependenciesIdentification inPackageDependenciesIdentification) {\r
+    private void init(PackageDependenciesIdentification inPackageDependenciesIdentification, ModuleIdentification mid) {\r
         init();\r
         this.pdid = inPackageDependenciesIdentification;\r
+        \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
         if (pdid != null) {\r
             this.jComboBoxPackageName.setSelectedItem(pdid.getName());\r
             this.jTextFieldPackageVersion.setText(pdid.getVersion());\r
@@ -240,9 +247,9 @@ public class PackageDepDlg extends IDialog implements ItemListener {
      * This is the default constructor\r
      * \r
      */\r
-    public PackageDepDlg(PackageDependenciesIdentification inPackageDependenciesIdentification, IFrame iFrame) {\r
+    public PackageDepDlg(PackageDependenciesIdentification inPackageDependenciesIdentification, IFrame iFrame, ModuleIdentification mid) {\r
         super(iFrame, true);\r
-        init(inPackageDependenciesIdentification);\r
+        init(inPackageDependenciesIdentification, mid);\r
     }\r
 \r
     /**\r
index 0204509254db939fb456535731dba2744a2bc853..2a24158ef53e74db4db2cde500739291fbc09384 100644 (file)
@@ -274,7 +274,15 @@ public class PpisDlg extends IDialog implements ItemListener {
     private void init(PpisIdentification inPpisId, ModuleIdentification mid) {\r
         init();\r
         this.id = inPpisId;\r
-\r
+        \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
+        //\r
+        // Get defined ppis from dependent packages\r
+        //\r
         Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);\r
         if (vpid.size() <= 0) {\r
             Log.wrn("Init Ppi", "This module hasn't defined any package dependency, so there is no ppi can be added");\r
index 5108cbc44a780f03d0ba25560d49f4b699a83dc4..354f6826612ddfa10980ecbdfa97d64a0a006952 100644 (file)
@@ -290,6 +290,14 @@ public class ProtocolsDlg extends IDialog implements ItemListener {
         init();\r
         this.id = inProtocolsId;\r
         \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
+        //\r
+        // Get defined protocols from dependent packages\r
+        //\r
         Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);\r
         if (vpid.size() <= 0) {\r
             Log.wrn("Init Protocol", "This module hasn't defined any package dependency, so there is no protocol can be added");\r
index 266870f0bf2e97b0c516e5fac7d558bd6b83bfbb..6ca65fa04e7a96a97ec70ad70468878a74ac1645 100644 (file)
@@ -35,7 +35,9 @@ import org.tianocore.frameworkwizard.common.ui.IComboBox;
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.SourceFiles.SourceFilesIdentification;\r
+import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
 /**\r
  * The class is used to create, update SourceFiles section of the MSA file\r
@@ -99,6 +101,8 @@ public class SourceFilesDlg extends IDialog {
     private String msaFileName = "";\r
 \r
     private EnumerationData ed = new EnumerationData();\r
+    \r
+    private WorkspaceTools wt = new WorkspaceTools();\r
 \r
     /**\r
      This method initializes jTextFieldFileName \r
@@ -261,9 +265,9 @@ public class SourceFilesDlg extends IDialog {
      This is the default constructor\r
      \r
      **/\r
-    public SourceFilesDlg(SourceFilesIdentification inSourceFilesIdentification, IFrame iFrame, String fileName) {\r
+    public SourceFilesDlg(SourceFilesIdentification inSourceFilesIdentification, IFrame iFrame, ModuleIdentification mid) {\r
         super(iFrame, true);\r
-        init(inSourceFilesIdentification, fileName);\r
+        init(inSourceFilesIdentification, mid);\r
     }\r
 \r
     /**\r
@@ -287,10 +291,14 @@ public class SourceFilesDlg extends IDialog {
      @param inSourceFiles The input data of SourceFilesDocument.SourceFiles\r
      \r
      **/\r
-    private void init(SourceFilesIdentification inSourceFilesIdentifications, String fileName) {\r
+    private void init(SourceFilesIdentification inSourceFilesIdentifications, ModuleIdentification mid) {\r
         init();\r
-        //this.sfid = inSourceFilesIdentifications;\r
-        this.msaFileName = fileName;\r
+        this.msaFileName = mid.getPath();\r
+        \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
 \r
         if (inSourceFilesIdentifications != null) {\r
             this.jTextFieldFileName.setText(inSourceFilesIdentifications.getFilename());\r
index 91606fd4aed8c1039ec4c15f3756106a21dda341..924010be8c166f0a485be0ffc7ae9b0faca5b7bc 100644 (file)
@@ -35,6 +35,7 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.SystemTables.SystemTablesIdentification;\r
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
@@ -252,10 +253,15 @@ public class SystemTablesDlg extends IDialog {
      * @param inSystemTablesId\r
      * \r
      */\r
-    private void init(SystemTablesIdentification inSystemTablesId) {\r
+    private void init(SystemTablesIdentification inSystemTablesId, ModuleIdentification mid) {\r
         init();\r
         this.id = inSystemTablesId;\r
-\r
+        \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+        \r
         if (this.id != null) {\r
             this.jComboBoxGuidC_Name.setSelectedItem(id.getName());\r
             this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
@@ -272,9 +278,9 @@ public class SystemTablesDlg extends IDialog {
      * @param iFrame\r
      * \r
      */\r
-    public SystemTablesDlg(SystemTablesIdentification inSystemTablesIdentification, IFrame iFrame) {\r
+    public SystemTablesDlg(SystemTablesIdentification inSystemTablesIdentification, IFrame iFrame, ModuleIdentification mid) {\r
         super(iFrame, true);\r
-        init(inSystemTablesIdentification);\r
+        init(inSystemTablesIdentification, mid);\r
     }\r
 \r
     /**\r
index d13e6ccc07f84221888d4108963d4276326799b5..34f7ba0d4efe4562225b3b0f4c9103db706e4d5a 100644 (file)
@@ -35,6 +35,7 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.Variables.VariablesIdentification;\r
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
@@ -273,9 +274,14 @@ public class VariablesDlg extends IDialog {
      * @param inVariablesId\r
      * \r
      */\r
-    private void init(VariablesIdentification inVariablesId) {\r
+    private void init(VariablesIdentification inVariablesId, ModuleIdentification mid) {\r
         init();\r
         this.id = inVariablesId;\r
+        \r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
 \r
         if (this.id != null) {\r
             this.jTextFieldVariableName.setText(id.getName());\r
@@ -294,9 +300,9 @@ public class VariablesDlg extends IDialog {
      * @param iFrame\r
      * \r
      */\r
-    public VariablesDlg(VariablesIdentification inVariablesIdentification, IFrame iFrame) {\r
+    public VariablesDlg(VariablesIdentification inVariablesIdentification, IFrame iFrame, ModuleIdentification mid) {\r
         super(iFrame, true);\r
-        init(inVariablesIdentification);\r
+        init(inVariablesIdentification, mid);\r
     }\r
 \r
     /**\r
index c560899eae83138f848f08ef1af95709d19221b4..f0586b1aa5611f2d149e6438d8aac1aee6a8cab5 100644 (file)
@@ -467,12 +467,13 @@ public class WorkspaceTools {
         Sort.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);\r
         return vector;\r
     }\r
-    \r
+\r
     public Vector<String> getAllLibraryClassDefinitionsFromPackages(Vector<PackageIdentification> vpid) {\r
         Vector<String> vector = new Vector<String>();\r
         for (int index = 0; index < vpid.size(); index++) {\r
             Vector<String> v = getAllLibraryClassDefinitionsFromPackage(GlobalData.openingPackageList\r
-                                                                                                     .getPackageSurfaceAreaFromId(vpid.get(index)));\r
+                                                                                                     .getPackageSurfaceAreaFromId(vpid\r
+                                                                                                                                      .get(index)));\r
             if (v != null && v.size() > 0) {\r
                 vector.addAll(v);\r
             }\r
@@ -804,7 +805,7 @@ public class WorkspaceTools {
         }\r
         return vpid;\r
     }\r
-    \r
+\r
     public Vector<String> getAllModuleGuidXref() {\r
         Vector<String> v = new Vector<String>();\r
         for (int index = 0; index < GlobalData.openingModuleList.size(); index++) {\r
@@ -813,4 +814,18 @@ public class WorkspaceTools {
         }\r
         return v;\r
     }\r
+\r
+    public Vector<String> getModuleArch(ModuleIdentification id) {\r
+        Vector<String> v = new Vector<String>();\r
+        ModuleSurfaceArea msa = null;\r
+        if (id != null) {\r
+            msa = GlobalData.openingModuleList.getModuleSurfaceAreaFromId(id);\r
+        }\r
+        if (msa != null) {\r
+            if (msa.getModuleDefinitions() != null) {\r
+                v = Tools.convertListToVector(msa.getModuleDefinitions().getSupportedArchitectures());\r
+            }\r
+        }\r
+        return v;\r
+    }\r
 }\r