\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
\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
}\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
}\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
}\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
}\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
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
}\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
}\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
}\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
}\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
}\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
}\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
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
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
* @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
* @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
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
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
* @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
* @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
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
* @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
* @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
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
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
@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
@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
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.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.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.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
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
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
private HiiPackagesIdentification id = null;\r
\r
private EnumerationData ed = new EnumerationData();\r
+ \r
+ private WorkspaceTools wt = new WorkspaceTools();\r
\r
/**\r
* \r
* @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
* @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
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
* @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
* @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
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
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
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
* 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
* 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
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
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
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
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
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
@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
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
* @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
* @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
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
* @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
* @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
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
}\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
}\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