summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ArchCheckBox.java24
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java2
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java2
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java2
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java2
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java4
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java2
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java2
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java3
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java2
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java2
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BootModesDlg.java17
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/DataHubsDlg.java15
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java14
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ExternsDlg.java25
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java8
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HiiPackagesDlg.java17
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java14
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/LibraryClassDefsDlg.java8
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java8
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PackageDepDlg.java13
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PpisDlg.java10
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ProtocolsDlg.java8
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SourceFilesDlg.java18
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.java14
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java12
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java21
27 files changed, 200 insertions, 69 deletions
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ArchCheckBox.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ArchCheckBox.java
index 62d4a33cb2..d02c121433 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ArchCheckBox.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/ArchCheckBox.java
@@ -158,22 +158,22 @@ public class ArchCheckBox extends JPanel {
public Vector<String> getSelectedItemsVector() {
Vector<String> v = new Vector<String>();
- if (this.jCheckBoxIa32.isSelected()) {
+ if (this.jCheckBoxIa32.isSelected() && this.jCheckBoxIa32.isEnabled()) {
v.addElement(jCheckBoxIa32.getText());
}
- if (this.jCheckBoxX64.isSelected()) {
+ if (this.jCheckBoxX64.isSelected() && this.jCheckBoxX64.isEnabled()) {
v.addElement(jCheckBoxX64.getText());
}
- if (this.jCheckBoxIpf.isSelected()) {
+ if (this.jCheckBoxIpf.isSelected() && this.jCheckBoxIpf.isEnabled()) {
v.addElement(jCheckBoxIpf.getText());
}
- if (this.jCheckBoxEbc.isSelected()) {
+ if (this.jCheckBoxEbc.isSelected() && this.jCheckBoxEbc.isEnabled()) {
v.addElement(jCheckBoxEbc.getText());
}
- if (this.jCheckBoxArm.isSelected()) {
+ if (this.jCheckBoxArm.isSelected() && this.jCheckBoxArm.isEnabled()) {
v.addElement(jCheckBoxArm.getText());
}
- if (this.jCheckBoxPpc.isSelected()) {
+ if (this.jCheckBoxPpc.isSelected() && this.jCheckBoxPpc.isEnabled()) {
v.addElement(jCheckBoxPpc.getText());
}
return v;
@@ -181,22 +181,22 @@ public class ArchCheckBox extends JPanel {
public String getSelectedItemsString() {
String s = "";
- if (this.jCheckBoxIa32.isSelected()) {
+ if (this.jCheckBoxIa32.isSelected() && this.jCheckBoxIa32.isEnabled()) {
s = s + jCheckBoxIa32.getText() + " ";
}
- if (this.jCheckBoxX64.isSelected()) {
+ if (this.jCheckBoxX64.isSelected() && this.jCheckBoxX64.isEnabled()) {
s = s + jCheckBoxX64.getText() + " ";
}
- if (this.jCheckBoxIpf.isSelected()) {
+ if (this.jCheckBoxIpf.isSelected() && this.jCheckBoxIpf.isEnabled()) {
s = s + jCheckBoxIpf.getText() + " ";
}
- if (this.jCheckBoxEbc.isSelected()) {
+ if (this.jCheckBoxEbc.isSelected() && this.jCheckBoxEbc.isEnabled()) {
s = s + jCheckBoxEbc.getText() + " ";
}
- if (this.jCheckBoxArm.isSelected()) {
+ if (this.jCheckBoxArm.isSelected() && this.jCheckBoxArm.isEnabled()) {
s = s + jCheckBoxArm.getText() + " ";
}
- if (this.jCheckBoxPpc.isSelected()) {
+ if (this.jCheckBoxPpc.isSelected() && this.jCheckBoxPpc.isEnabled()) {
s = s + jCheckBoxPpc.getText() + " ";
}
return s.trim();
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java
index 46b333efbe..7cde681786 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java
@@ -289,7 +289,7 @@ public class ModuleBootModes extends IInternalFrame {
}
private void showEdit(int index) {
- BootModesDlg dlg = new BootModesDlg(vid.getBootModes(index), new IFrame());
+ BootModesDlg dlg = new BootModesDlg(vid.getBootModes(index), new IFrame(), omt.getId());
int result = dlg.showDialog();
if (result == DataType.RETURN_TYPE_OK) {
if (index == -1) {
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java
index 85a4a93a5f..94999d0ce3 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java
@@ -286,7 +286,7 @@ public class ModuleDataHubs extends IInternalFrame {
}
private void showEdit(int index) {
- DataHubsDlg dlg = new DataHubsDlg(vid.getDataHubs(index), new IFrame());
+ DataHubsDlg dlg = new DataHubsDlg(vid.getDataHubs(index), new IFrame(), omt.getId());
int result = dlg.showDialog();
if (result == DataType.RETURN_TYPE_OK) {
if (index == -1) {
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java
index c8f34c6d1d..7db1d9763b 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java
@@ -315,7 +315,7 @@ public class ModuleEvents extends IInternalFrame {
}
private void showEdit(int index) {
- EventsDlg dlg = new EventsDlg(vid.getEvents(index), new IFrame());
+ EventsDlg dlg = new EventsDlg(vid.getEvents(index), new IFrame(), omt.getId());
int result = dlg.showDialog();
if (result == DataType.RETURN_TYPE_OK) {
if (index == -1) {
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java
index cc8a81a167..4b4ea0daa2 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java
@@ -344,7 +344,7 @@ public class ModuleExterns extends IInternalFrame implements ItemListener {
}
private void showEdit(int index) {
- ExternsDlg dlg = new ExternsDlg(vid.getExterns(index), new IFrame());
+ ExternsDlg dlg = new ExternsDlg(vid.getExterns(index), new IFrame(), omt.getId());
int result = dlg.showDialog();
if (result == DataType.RETURN_TYPE_OK) {
if (index == -1) {
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java
index a1efd28263..0c1126c848 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java
@@ -215,7 +215,7 @@ public class ModuleHiiPackages extends IInternalFrame {
private void init(HiiPackages inHiiPackages) {
init();
this.hiiPackages = inHiiPackages;
-
+
if (this.hiiPackages != null) {
if (this.hiiPackages.getHiiPackageList().size() > 0) {
for (int index = 0; index < this.hiiPackages.getHiiPackageList().size(); index++) {
@@ -286,7 +286,7 @@ public class ModuleHiiPackages extends IInternalFrame {
}
private void showEdit(int index) {
- HiiPackagesDlg dlg = new HiiPackagesDlg(vid.getHiiPackages(index), new IFrame());
+ HiiPackagesDlg dlg = new HiiPackagesDlg(vid.getHiiPackages(index), new IFrame(), omt.getId());
int result = dlg.showDialog();
if (result == DataType.RETURN_TYPE_OK) {
if (index == -1) {
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java
index 06ca286a2c..0dca57cf6c 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java
@@ -289,7 +289,7 @@ public class ModuleHobs extends IInternalFrame {
}
private void showEdit(int index) {
- HobsDlg dlg = new HobsDlg(vid.getHobs(index), new IFrame());
+ HobsDlg dlg = new HobsDlg(vid.getHobs(index), new IFrame(), omt.getId());
int result = dlg.showDialog();
if (result == DataType.RETURN_TYPE_OK) {
if (index == -1) {
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java
index 563d3c88ea..4b08c65c11 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java
@@ -294,7 +294,7 @@ public class ModulePackageDependencies extends IInternalFrame {
}
private void showEdit(int index) {
- PackageDepDlg pdd = new PackageDepDlg(vid.getPackageDependencies(index), new IFrame());
+ PackageDepDlg pdd = new PackageDepDlg(vid.getPackageDependencies(index), new IFrame(), omt.getId());
int result = pdd.showDialog();
if (result == DataType.RETURN_TYPE_OK) {
if (index == -1) {
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 26d43ab521..36049b3d81 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
@@ -348,8 +348,7 @@ public class ModuleSourceFiles extends IInternalFrame {
}
private void showEdit(int index) {
- SourceFilesDlg sfd = new SourceFilesDlg(this.vSourceFiles.getSourceFiles(index), new IFrame(), omt.getId()
- .getPath());
+ SourceFilesDlg sfd = new SourceFilesDlg(this.vSourceFiles.getSourceFiles(index), new IFrame(), omt.getId());
int result = sfd.showDialog();
if (result == DataType.RETURN_TYPE_OK) {
if (index == -1) {
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java
index a9973c0696..f3fab22c23 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java
@@ -286,7 +286,7 @@ public class ModuleSystemTables extends IInternalFrame {
}
private void showEdit(int index) {
- SystemTablesDlg dlg = new SystemTablesDlg(vid.getSystemTables(index), new IFrame());
+ SystemTablesDlg dlg = new SystemTablesDlg(vid.getSystemTables(index), new IFrame(), omt.getId());
int result = dlg.showDialog();
if (result == DataType.RETURN_TYPE_OK) {
if (index == -1) {
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java
index 4c2c10fbd3..0da492202c 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java
@@ -286,7 +286,7 @@ public class ModuleVariables extends IInternalFrame {
}
private void showEdit(int index) {
- VariablesDlg dlg = new VariablesDlg(vid.getVariables(index), new IFrame());
+ VariablesDlg dlg = new VariablesDlg(vid.getVariables(index), new IFrame(), omt.getId());
int result = dlg.showDialog();
if (result == DataType.RETURN_TYPE_OK) {
if (index == -1) {
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BootModesDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BootModesDlg.java
index 88a010ef35..41aec889df 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BootModesDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BootModesDlg.java
@@ -39,7 +39,9 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
import org.tianocore.frameworkwizard.module.Identifications.BootModes.BootModesIdentification;
+import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
/**
* The class is used to create, update BootModes of MSA/MBD file
@@ -97,6 +99,8 @@ public class BootModesDlg extends IDialog {
private BootModesIdentification id = null;
private EnumerationData ed = new EnumerationData();
+
+ private WorkspaceTools wt = new WorkspaceTools();
/**
* This method initializes jComboBoxBootModeName
@@ -263,10 +267,15 @@ public class BootModesDlg extends IDialog {
* @param inBootModesId
*
*/
- private void init(BootModesIdentification inBootModesId) {
+ private void init(BootModesIdentification inBootModesId, ModuleIdentification mid) {
init();
this.id = inBootModesId;
-
+
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
if (this.id != null) {
this.jComboBoxBootModeName.setSelectedItem(id.getName());
this.jComboBoxUsage.setSelectedItem(id.getUsage());
@@ -283,9 +292,9 @@ public class BootModesDlg extends IDialog {
* @param iFrame
*
*/
- public BootModesDlg(BootModesIdentification inBootModesIdentification, IFrame iFrame) {
+ public BootModesDlg(BootModesIdentification inBootModesIdentification, IFrame iFrame, ModuleIdentification mid) {
super(iFrame, true);
- init(inBootModesIdentification);
+ init(inBootModesIdentification, mid);
}
/**
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/DataHubsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/DataHubsDlg.java
index 87c6728765..a3c6c63838 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/DataHubsDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/DataHubsDlg.java
@@ -39,7 +39,9 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
import org.tianocore.frameworkwizard.module.Identifications.DataHubs.DataHubsIdentification;
+import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
/**
* The class is used to create, update DataHub of the MSA file
@@ -97,6 +99,8 @@ public class DataHubsDlg extends IDialog {
private DataHubsIdentification id = null;
private EnumerationData ed = new EnumerationData();
+
+ private WorkspaceTools wt = new WorkspaceTools();
/**
* This method initializes jTextFieldDataHubRecord
@@ -254,10 +258,15 @@ public class DataHubsDlg extends IDialog {
* @param inDataHubsId
*
*/
- private void init(DataHubsIdentification inDataHubsId) {
+ private void init(DataHubsIdentification inDataHubsId, ModuleIdentification mid) {
init();
this.id = inDataHubsId;
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
if (this.id != null) {
this.jTextFieldDataHubRecord.setText(id.getName());
this.jComboBoxUsage.setSelectedItem(id.getUsage());
@@ -274,9 +283,9 @@ public class DataHubsDlg extends IDialog {
* @param iFrame
*
*/
- public DataHubsDlg(DataHubsIdentification inDataHubsIdentification, IFrame iFrame) {
+ public DataHubsDlg(DataHubsIdentification inDataHubsIdentification, IFrame iFrame, ModuleIdentification mid) {
super(iFrame, true);
- init(inDataHubsIdentification);
+ init(inDataHubsIdentification, mid);
}
/**
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java
index a37061755a..6c435827e8 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java
@@ -34,6 +34,7 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
import org.tianocore.frameworkwizard.module.Identifications.Events.EventsIdentification;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
@@ -303,10 +304,15 @@ public class EventsDlg extends IDialog {
* @param inEventsId
*
*/
- private void init(EventsIdentification inEventsId) {
+ private void init(EventsIdentification inEventsId, ModuleIdentification mid) {
init();
this.id = inEventsId;
-
+
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
if (this.id != null) {
this.jComboBoxGuidC_Name.setSelectedItem(id.getName());
this.jComboBoxEventsType.setSelectedItem(id.getType());
@@ -326,9 +332,9 @@ public class EventsDlg extends IDialog {
* @param iFrame
*
*/
- public EventsDlg(EventsIdentification inEventsIdentification, IFrame iFrame) {
+ public EventsDlg(EventsIdentification inEventsIdentification, IFrame iFrame, ModuleIdentification mid) {
super(iFrame, true);
- init(inEventsIdentification);
+ init(inEventsIdentification, mid);
}
/**
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ExternsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ExternsDlg.java
index 6ff84ffc78..3a94511e1e 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ExternsDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ExternsDlg.java
@@ -35,7 +35,9 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
import org.tianocore.frameworkwizard.module.Identifications.Externs.ExternsIdentification;
+import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
/**
* The class is used to create, update Externs section of the MSA file
@@ -135,6 +137,10 @@ public class ExternsDlg extends IDialog implements ItemListener {
private ExternsIdentification id = null;
private EnumerationData ed = new EnumerationData();
+
+ private WorkspaceTools wt = new WorkspaceTools();
+
+ private Vector<String> vArchList = new Vector<String>();
/**
This method initializes jComboBoxType
@@ -511,9 +517,14 @@ public class ExternsDlg extends IDialog implements ItemListener {
@param inExternsId
**/
- private void init(ExternsIdentification inExternsId) {
+ private void init(ExternsIdentification inExternsId, ModuleIdentification mid) {
init();
this.id = inExternsId;
+
+ //
+ // Init arch with module's arch
+ //
+ this.vArchList = wt.getModuleArch(mid);
if (this.id != null) {
String type = id.getType();
@@ -576,9 +587,9 @@ public class ExternsDlg extends IDialog implements ItemListener {
@param iFrame
**/
- public ExternsDlg(ExternsIdentification inExternsIdentification, IFrame iFrame) {
+ public ExternsDlg(ExternsIdentification inExternsIdentification, IFrame iFrame, ModuleIdentification mid) {
super(iFrame, true);
- init(inExternsIdentification);
+ init(inExternsIdentification, mid);
}
/**
@@ -878,7 +889,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
this.jPanelDriver.setVisible(false);
this.jPanelCallBack.setVisible(false);
this.jLabelArch.setEnabled(true);
- this.jArchCheckBox.setAllItemsEnabled(true);
+ this.jArchCheckBox.setEnabledItems(this.vArchList);
this.jLabelArch.setLocation(12, 87);
this.jArchCheckBox.setLocation(168, 87);
this.jLabelFeatureFlag.setLocation(12, 112);
@@ -890,7 +901,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
this.jPanelDriver.setVisible(false);
this.jPanelCallBack.setVisible(false);
this.jLabelArch.setEnabled(true);
- this.jArchCheckBox.setAllItemsEnabled(true);
+ this.jArchCheckBox.setEnabledItems(this.vArchList);
this.jLabelArch.setLocation(12, 87);
this.jArchCheckBox.setLocation(168, 87);
this.jLabelFeatureFlag.setLocation(12, 112);
@@ -902,7 +913,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
this.jPanelDriver.setVisible(true);
this.jPanelCallBack.setVisible(false);
this.jLabelArch.setEnabled(true);
- this.jArchCheckBox.setAllItemsEnabled(true);
+ this.jArchCheckBox.setEnabledItems(this.vArchList);
this.jLabelArch.setLocation(12, 137);
this.jArchCheckBox.setLocation(168, 137);
this.jLabelFeatureFlag.setLocation(12, 162);
@@ -914,7 +925,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
this.jPanelDriver.setVisible(false);
this.jPanelCallBack.setVisible(true);
this.jLabelArch.setEnabled(true);
- this.jArchCheckBox.setAllItemsEnabled(true);
+ this.jArchCheckBox.setEnabledItems(this.vArchList);
this.jLabelArch.setLocation(12, 87);
this.jArchCheckBox.setLocation(168, 87);
this.jLabelFeatureFlag.setLocation(12, 112);
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java
index 4c6e2a7088..e0475a5e06 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java
@@ -261,6 +261,14 @@ public class GuidsDlg extends IDialog {
init();
this.id = inGuidsId;
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
+ //
+ // Get defined guids from dependent packages
+ //
Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);
if (vpid.size() <= 0) {
Log.wrn("Init Guid", "This module hasn't defined any package dependency, so there is no guid can be added");
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HiiPackagesDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HiiPackagesDlg.java
index 6f0c0248ad..906be0b9ff 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HiiPackagesDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HiiPackagesDlg.java
@@ -34,7 +34,9 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
import org.tianocore.frameworkwizard.module.Identifications.HiiPackages.HiiPackagesIdentification;
+import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
/**
* The class is used to create, update Hii Packages of the MSA file
@@ -92,6 +94,8 @@ public class HiiPackagesDlg extends IDialog {
private HiiPackagesIdentification id = null;
private EnumerationData ed = new EnumerationData();
+
+ private WorkspaceTools wt = new WorkspaceTools();
/**
*
@@ -257,10 +261,15 @@ public class HiiPackagesDlg extends IDialog {
* @param inHiiPackagesId
*
**/
- private void init(HiiPackagesIdentification inHiiPackagesId) {
+ private void init(HiiPackagesIdentification inHiiPackagesId, ModuleIdentification mid) {
init();
this.id = inHiiPackagesId;
-
+
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
if (this.id != null) {
this.jTextFieldName.setText(id.getName());
this.jComboBoxUsage.setSelectedItem(id.getUsage());
@@ -277,9 +286,9 @@ public class HiiPackagesDlg extends IDialog {
* @param iFrame
*
**/
- public HiiPackagesDlg(HiiPackagesIdentification inHiiPackagesIdentification, IFrame iFrame) {
+ public HiiPackagesDlg(HiiPackagesIdentification inHiiPackagesIdentification, IFrame iFrame, ModuleIdentification mid) {
super(iFrame, true);
- init(inHiiPackagesIdentification);
+ init(inHiiPackagesIdentification, mid);
}
/**
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java
index 3448cb3d89..eaba4c6c97 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java
@@ -34,6 +34,7 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
import org.tianocore.frameworkwizard.module.Identifications.Hobs.HobsIdentification;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
@@ -283,10 +284,15 @@ public class HobsDlg extends IDialog {
* @param inHobsId
*
*/
- private void init(HobsIdentification inHobsId) {
+ private void init(HobsIdentification inHobsId, ModuleIdentification mid) {
init();
this.id = inHobsId;
-
+
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
if (this.id != null) {
this.jComboBoxGuidC_Name.setSelectedItem(id.getName());
this.jComboBoxHobType.setSelectedItem(id.getType());
@@ -304,9 +310,9 @@ public class HobsDlg extends IDialog {
* @param iFrame
*
*/
- public HobsDlg(HobsIdentification inHobsIdentification, IFrame iFrame) {
+ public HobsDlg(HobsIdentification inHobsIdentification, IFrame iFrame, ModuleIdentification mid) {
super(iFrame, true);
- init(inHobsIdentification);
+ init(inHobsIdentification, mid);
}
/**
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/LibraryClassDefsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/LibraryClassDefsDlg.java
index 87708b836c..c475b4ab1b 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/LibraryClassDefsDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/LibraryClassDefsDlg.java
@@ -330,6 +330,14 @@ public class LibraryClassDefsDlg extends IDialog {
init();
this.lcid = inLibraryClassIdentification;
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
+ //
+ // Get defined library classes from dependent packages
+ //
Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);
if (vpid.size() <= 0) {
Log.wrn("Init Library Class", "This module hasn't defined any package dependency, so there is no library class can be added");
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java
index 58b983dad7..fa3d4a4f33 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java
@@ -313,6 +313,14 @@ public class PCDsDlg extends IDialog implements ItemListener {
init();
this.id = inPcdCodedId;
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
+ //
+ // Get defined pcds from dependent packages
+ //
Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);
if (vpid.size() <= 0) {
Log.wrn("Init Pcd", "This module hasn't defined any package dependency, so there is no pcd can be added");
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PackageDepDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PackageDepDlg.java
index 4af5b4f7d3..00161b5ecb 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PackageDepDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PackageDepDlg.java
@@ -33,6 +33,7 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
import org.tianocore.frameworkwizard.module.Identifications.PackageDependencies.PackageDependenciesIdentification;
import org.tianocore.frameworkwizard.packaging.PackageIdentification;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
@@ -224,9 +225,15 @@ public class PackageDepDlg extends IDialog implements ItemListener {
* This method initializes this
*
*/
- private void init(PackageDependenciesIdentification inPackageDependenciesIdentification) {
+ private void init(PackageDependenciesIdentification inPackageDependenciesIdentification, ModuleIdentification mid) {
init();
this.pdid = inPackageDependenciesIdentification;
+
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
if (pdid != null) {
this.jComboBoxPackageName.setSelectedItem(pdid.getName());
this.jTextFieldPackageVersion.setText(pdid.getVersion());
@@ -240,9 +247,9 @@ public class PackageDepDlg extends IDialog implements ItemListener {
* This is the default constructor
*
*/
- public PackageDepDlg(PackageDependenciesIdentification inPackageDependenciesIdentification, IFrame iFrame) {
+ public PackageDepDlg(PackageDependenciesIdentification inPackageDependenciesIdentification, IFrame iFrame, ModuleIdentification mid) {
super(iFrame, true);
- init(inPackageDependenciesIdentification);
+ init(inPackageDependenciesIdentification, mid);
}
/**
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PpisDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PpisDlg.java
index 0204509254..2a24158ef5 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PpisDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PpisDlg.java
@@ -274,7 +274,15 @@ public class PpisDlg extends IDialog implements ItemListener {
private void init(PpisIdentification inPpisId, ModuleIdentification mid) {
init();
this.id = inPpisId;
-
+
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
+ //
+ // Get defined ppis from dependent packages
+ //
Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);
if (vpid.size() <= 0) {
Log.wrn("Init Ppi", "This module hasn't defined any package dependency, so there is no ppi can be added");
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ProtocolsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ProtocolsDlg.java
index 5108cbc44a..354f682661 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ProtocolsDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ProtocolsDlg.java
@@ -290,6 +290,14 @@ public class ProtocolsDlg extends IDialog implements ItemListener {
init();
this.id = inProtocolsId;
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
+ //
+ // Get defined protocols from dependent packages
+ //
Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);
if (vpid.size() <= 0) {
Log.wrn("Init Protocol", "This module hasn't defined any package dependency, so there is no protocol can be added");
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SourceFilesDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SourceFilesDlg.java
index 266870f0bf..6ca65fa04e 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SourceFilesDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SourceFilesDlg.java
@@ -35,7 +35,9 @@ import org.tianocore.frameworkwizard.common.ui.IComboBox;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
import org.tianocore.frameworkwizard.module.Identifications.SourceFiles.SourceFilesIdentification;
+import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
/**
* The class is used to create, update SourceFiles section of the MSA file
@@ -99,6 +101,8 @@ public class SourceFilesDlg extends IDialog {
private String msaFileName = "";
private EnumerationData ed = new EnumerationData();
+
+ private WorkspaceTools wt = new WorkspaceTools();
/**
This method initializes jTextFieldFileName
@@ -261,9 +265,9 @@ public class SourceFilesDlg extends IDialog {
This is the default constructor
**/
- public SourceFilesDlg(SourceFilesIdentification inSourceFilesIdentification, IFrame iFrame, String fileName) {
+ public SourceFilesDlg(SourceFilesIdentification inSourceFilesIdentification, IFrame iFrame, ModuleIdentification mid) {
super(iFrame, true);
- init(inSourceFilesIdentification, fileName);
+ init(inSourceFilesIdentification, mid);
}
/**
@@ -287,10 +291,14 @@ public class SourceFilesDlg extends IDialog {
@param inSourceFiles The input data of SourceFilesDocument.SourceFiles
**/
- private void init(SourceFilesIdentification inSourceFilesIdentifications, String fileName) {
+ private void init(SourceFilesIdentification inSourceFilesIdentifications, ModuleIdentification mid) {
init();
- //this.sfid = inSourceFilesIdentifications;
- this.msaFileName = fileName;
+ this.msaFileName = mid.getPath();
+
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
if (inSourceFilesIdentifications != null) {
this.jTextFieldFileName.setText(inSourceFilesIdentifications.getFilename());
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.java
index 91606fd4ae..924010be8c 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.java
@@ -35,6 +35,7 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
import org.tianocore.frameworkwizard.module.Identifications.SystemTables.SystemTablesIdentification;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
@@ -252,10 +253,15 @@ public class SystemTablesDlg extends IDialog {
* @param inSystemTablesId
*
*/
- private void init(SystemTablesIdentification inSystemTablesId) {
+ private void init(SystemTablesIdentification inSystemTablesId, ModuleIdentification mid) {
init();
this.id = inSystemTablesId;
-
+
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+
if (this.id != null) {
this.jComboBoxGuidC_Name.setSelectedItem(id.getName());
this.jComboBoxUsage.setSelectedItem(id.getUsage());
@@ -272,9 +278,9 @@ public class SystemTablesDlg extends IDialog {
* @param iFrame
*
*/
- public SystemTablesDlg(SystemTablesIdentification inSystemTablesIdentification, IFrame iFrame) {
+ public SystemTablesDlg(SystemTablesIdentification inSystemTablesIdentification, IFrame iFrame, ModuleIdentification mid) {
super(iFrame, true);
- init(inSystemTablesIdentification);
+ init(inSystemTablesIdentification, mid);
}
/**
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java
index d13e6ccc07..34f7ba0d4e 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java
@@ -35,6 +35,7 @@ import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;
import org.tianocore.frameworkwizard.common.ui.IDialog;
import org.tianocore.frameworkwizard.common.ui.IFrame;
import org.tianocore.frameworkwizard.common.ui.StarLabel;
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;
import org.tianocore.frameworkwizard.module.Identifications.Variables.VariablesIdentification;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
@@ -273,9 +274,14 @@ public class VariablesDlg extends IDialog {
* @param inVariablesId
*
*/
- private void init(VariablesIdentification inVariablesId) {
+ private void init(VariablesIdentification inVariablesId, ModuleIdentification mid) {
init();
this.id = inVariablesId;
+
+ //
+ // Init arch with module's arch
+ //
+ this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
if (this.id != null) {
this.jTextFieldVariableName.setText(id.getName());
@@ -294,9 +300,9 @@ public class VariablesDlg extends IDialog {
* @param iFrame
*
*/
- public VariablesDlg(VariablesIdentification inVariablesIdentification, IFrame iFrame) {
+ public VariablesDlg(VariablesIdentification inVariablesIdentification, IFrame iFrame, ModuleIdentification mid) {
super(iFrame, true);
- init(inVariablesIdentification);
+ init(inVariablesIdentification, mid);
}
/**
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 c560899eae..f0586b1aa5 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java
@@ -467,12 +467,13 @@ public class WorkspaceTools {
Sort.sortVectorString(vector, DataType.SORT_TYPE_ASCENDING);
return vector;
}
-
+
public Vector<String> getAllLibraryClassDefinitionsFromPackages(Vector<PackageIdentification> vpid) {
Vector<String> vector = new Vector<String>();
for (int index = 0; index < vpid.size(); index++) {
Vector<String> v = getAllLibraryClassDefinitionsFromPackage(GlobalData.openingPackageList
- .getPackageSurfaceAreaFromId(vpid.get(index)));
+ .getPackageSurfaceAreaFromId(vpid
+ .get(index)));
if (v != null && v.size() > 0) {
vector.addAll(v);
}
@@ -804,7 +805,7 @@ public class WorkspaceTools {
}
return vpid;
}
-
+
public Vector<String> getAllModuleGuidXref() {
Vector<String> v = new Vector<String>();
for (int index = 0; index < GlobalData.openingModuleList.size(); index++) {
@@ -813,4 +814,18 @@ public class WorkspaceTools {
}
return v;
}
+
+ public Vector<String> getModuleArch(ModuleIdentification id) {
+ Vector<String> v = new Vector<String>();
+ ModuleSurfaceArea msa = null;
+ if (id != null) {
+ msa = GlobalData.openingModuleList.getModuleSurfaceAreaFromId(id);
+ }
+ if (msa != null) {
+ if (msa.getModuleDefinitions() != null) {
+ v = Tools.convertListToVector(msa.getModuleDefinitions().getSupportedArchitectures());
+ }
+ }
+ return v;
+ }
}