]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ExternsDlg.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 / ExternsDlg.java
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.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.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
 \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
     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
 \r
     /**\r
      This method initializes jComboBoxType \r
@@ -511,9 +517,14 @@ public class ExternsDlg extends IDialog implements ItemListener {
      @param inExternsId\r
 \r
      **/\r
      @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
         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
 \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
      @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
         super(iFrame, true);\r
-        init(inExternsIdentification);\r
+        init(inExternsIdentification, mid);\r
     }\r
 \r
     /**\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.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
                 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.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
                 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.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
                 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.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
                 this.jLabelArch.setLocation(12, 87);\r
                 this.jArchCheckBox.setLocation(168, 87);\r
                 this.jLabelFeatureFlag.setLocation(12, 112);\r