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
iComboBoxToolCode = new IComboBox();\r
iComboBoxToolCode.setBounds(new java.awt.Rectangle(168, 62, 340, 20));\r
iComboBoxToolCode.setPreferredSize(new java.awt.Dimension(340, 20));\r
- iComboBoxToolCode.setToolTipText("<html>You may select a specific tool command from drop down list, <br>"\r
- + "or you can DOUBLE-CLICK this fild to enter your customizing <br>"\r
+ iComboBoxToolCode.setToolTipText("<html>You may select a specific tool command from drop down list,<br>"\r
+ + "or you can DOUBLE-CLICK this field to enter your customized<br>"\r
+ "tool command.<br>"\r
+ "Press ENTER to save your input or press ESCAPE to quit</html>");\r
}\r
private JTextField getJTextFieldFeatureFlag() {\r
if (jTextFieldFeatureFlag == null) {\r
jTextFieldFeatureFlag = new JTextField();\r
- jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(168, 112, 340, 20));\r
+ jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(168, 137, 340, 20));\r
jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(340, 20));\r
jTextFieldFeatureFlag.setToolTipText("RESERVED FOR FUTURE USE");\r
+ jTextFieldFeatureFlag.setEnabled(false);\r
}\r
return jTextFieldFeatureFlag;\r
}\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
private JPanel getJContentPane() {\r
if (jContentPane == null) {\r
jArchCheckBox = new ArchCheckBox();\r
- jArchCheckBox.setBounds(new java.awt.Rectangle(168, 137, 340, 20));\r
+ jArchCheckBox.setBounds(new java.awt.Rectangle(168, 112, 340, 20));\r
jArchCheckBox.setPreferredSize(new java.awt.Dimension(340, 20));\r
jLabelFeatureFlag = new JLabel();\r
- jLabelFeatureFlag.setBounds(new java.awt.Rectangle(12, 112, 155, 20));\r
+ jLabelFeatureFlag.setBounds(new java.awt.Rectangle(12, 137, 155, 20));\r
jLabelFeatureFlag.setText("Feature Flag Expression");\r
+ jLabelFeatureFlag.setEnabled(false);\r
jLabelToolCode = new JLabel();\r
jLabelToolCode.setBounds(new java.awt.Rectangle(12, 62, 155, 20));\r
jLabelToolCode.setText("Tool Code");\r
jLabelTagName.setBounds(new java.awt.Rectangle(12, 37, 155, 20));\r
jLabelTagName.setText("Tag Name");\r
jLabelArch = new JLabel();\r
- jLabelArch.setBounds(new java.awt.Rectangle(12, 137, 155, 20));\r
+ jLabelArch.setBounds(new java.awt.Rectangle(12, 112, 155, 20));\r
jLabelArch.setText("Supported Architectures");\r
jLabelToolChainFamily = new JLabel();\r
jLabelToolChainFamily.setBounds(new java.awt.Rectangle(12, 87, 155, 20));\r
// Check Filename\r
//\r
if (isEmpty(this.jTextFieldFileName.getText())) {\r
- Log.wrn("Update Source Files", "File Name couldn't be empty");\r
+ Log.wrn("Update Source Files", "File Name must be entered!");\r
return false;\r
}\r
if (!DataValidation.isFilename(this.jTextFieldFileName.getText())) {\r