/** @file\r
\r
- The file is used to create, update Hob of MSA/MBD file\r
+ The file is used to create, update Hob section of the MSA file\r
\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. This program and the accompanying materials\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
/**\r
- * The class is used to create, update Hob of the MSA file It extends JDialog\r
+ * The class is used to create, update Hob of the MSA file \r
+ * \r
+ * It extends IDialog\r
* \r
*/\r
public class HobsDlg extends IDialog {\r
private JTextField getJTextFieldFeatureFlag() {\r
if (jTextFieldFeatureFlag == null) {\r
jTextFieldFeatureFlag = new JTextField();\r
- jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(168, 132, 320, 20));\r
+ jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(168, 157, 320, 20));\r
jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+ jTextFieldFeatureFlag.setEnabled(false);\r
}\r
return jTextFieldFeatureFlag;\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
jLabelHelpText.setText("Help Text");\r
\r
jLabelFeatureFlag = new JLabel();\r
- jLabelFeatureFlag.setBounds(new java.awt.Rectangle(12, 132, 155, 20));\r
+ jLabelFeatureFlag.setBounds(new java.awt.Rectangle(12, 157, 155, 20));\r
jLabelFeatureFlag.setText("Feature Flag Expression");\r
+ jLabelFeatureFlag.setEnabled(false);\r
\r
jLabelArch = new JLabel();\r
- jLabelArch.setBounds(new java.awt.Rectangle(12, 157, 155, 20));\r
+ jLabelArch.setBounds(new java.awt.Rectangle(12, 132, 155, 20));\r
jLabelArch.setText("Supported Architectures");\r
jArchCheckBox = new ArchCheckBox();\r
- jArchCheckBox.setBounds(new java.awt.Rectangle(168, 157, 320, 20));\r
+ jArchCheckBox.setBounds(new java.awt.Rectangle(168, 132, 320, 20));\r
jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
\r
jContentPane = new JPanel();\r
// Check Name\r
//\r
if (isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) {\r
- Log.wrn("Update Hobs", "Hob Guid C Name must not be empty");\r
+ Log.wrn("Update Hobs", "Hob Guid C Name must be entered!");\r
return false;\r
}\r
\r