]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/DataHubsDlg.java
1. Fix EDKT321 A module's all top level elements' arch should be in range of the...
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / module / ui / dialog / DataHubsDlg.java
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