\r
import org.tianocore.frameworkwizard.common.DataType;\r
import org.tianocore.frameworkwizard.common.DataValidation;\r
+import org.tianocore.frameworkwizard.common.EnumerationData;\r
import org.tianocore.frameworkwizard.common.Log;\r
import org.tianocore.frameworkwizard.common.Tools;\r
import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;\r
+import org.tianocore.frameworkwizard.common.ui.IComboBox;\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
\r
private JTextField jTextFieldToolCode = null;\r
\r
+ private IComboBox iComboBoxToolCode = null;\r
+\r
private JTextField jTextFieldToolChainFamily = null;\r
\r
private JLabel jLabelFeatureFlag = null;\r
private JTextField jTextFieldFeatureFlag = null;\r
\r
private ArchCheckBox jArchCheckBox = null;\r
- \r
+\r
private JButton jButtonOk = null;\r
\r
private JButton jButtonCancel = null;\r
\r
private String msaFileName = "";\r
\r
+ private EnumerationData ed = new EnumerationData();\r
+\r
/**\r
This method initializes jTextFieldFileName \r
\r
return jTextFieldTagName;\r
}\r
\r
+ private IComboBox getIComboBoxToolCode() {\r
+ if (iComboBoxToolCode == null) {\r
+ iComboBoxToolCode = new IComboBox();\r
+ iComboBoxToolCode.setBounds(new java.awt.Rectangle(140, 60, 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
+ + "tool command.<br>"\r
+ + "Press ENTER to save your input or press ESCAPE to quit</html>");\r
+ }\r
+ return iComboBoxToolCode;\r
+ }\r
+\r
/**\r
* This method initializes jTextFieldToolCode \r
* \r
jTextFieldToolCode.setBounds(new java.awt.Rectangle(140, 60, 340, 20));\r
jTextFieldToolCode.setPreferredSize(new java.awt.Dimension(340, 20));\r
jTextFieldToolCode.setToolTipText("You may specify a specific tool command, such as ASM");\r
+ jTextFieldToolCode.setVisible(false);\r
}\r
return jTextFieldToolCode;\r
}\r
if (inSourceFilesIdentifications != null) {\r
this.jTextFieldFileName.setText(inSourceFilesIdentifications.getFilename());\r
this.jTextFieldTagName.setText(inSourceFilesIdentifications.getTagName());\r
- this.jTextFieldToolCode.setText(inSourceFilesIdentifications.getToolCode());\r
+\r
+ //\r
+ // Generate Tool Code selection list\r
+ //\r
+ Vector<String> v = ed.getVToolCode();\r
+ boolean isFind = false;\r
+ String strToolCode = inSourceFilesIdentifications.getToolCode();\r
+\r
+ //\r
+ // If the input value is not in the default list, add it to the list\r
+ //\r
+ if (strToolCode != null) {\r
+ for (int index = 0; index < v.size(); index++) {\r
+ if (v.elementAt(index).equals(strToolCode)) {\r
+ isFind = true;\r
+ break;\r
+ }\r
+ }\r
+ if (!isFind && !isEmpty(strToolCode)) {\r
+ v.addElement(strToolCode);\r
+ }\r
+ }\r
+\r
+ Tools.generateComboBoxByVector(iComboBoxToolCode, v);\r
+ this.iComboBoxToolCode.setSelectedItem(strToolCode);\r
+\r
this.jTextFieldToolChainFamily.setText(inSourceFilesIdentifications.getToolChainFamily());\r
jTextFieldFeatureFlag.setText(inSourceFilesIdentifications.getFeatureFlag());\r
this.jArchCheckBox.setSelectedItems(inSourceFilesIdentifications.getSupArchList());\r
jContentPane.add(getJTextFieldTagName(), null);\r
jContentPane.add(jLabelToolCode, null);\r
jContentPane.add(getJTextFieldToolCode(), null);\r
+ jContentPane.add(getIComboBoxToolCode(), null);\r
jContentPane.add(getJTextFieldToolChainFamily(), null);\r
jContentPane.add(jLabelFeatureFlag, null);\r
jContentPane.add(getJTextFieldFeatureFlag(), null);\r
String name = this.jTextFieldFileName.getText();\r
String s[] = name.split(";");\r
String tagName = this.jTextFieldTagName.getText();\r
- String toolCode = this.jTextFieldToolCode.getText();\r
+ String toolCode = this.iComboBoxToolCode.getSelectedItem().toString();\r
+ if (toolCode.equals(DataType.EMPTY_SELECT_ITEM)) {\r
+ toolCode = "";\r
+ }\r
String tcf = this.jTextFieldToolChainFamily.getText();\r
String featureFlag = this.jTextFieldFeatureFlag.getText();\r
Vector<String> arch = this.jArchCheckBox.getSelectedItemsVector();\r
sfid = new SourceFilesIdentification[s.length];\r
for (int index = 0; index < s.length; index++) {\r
- sfid[index] = new SourceFilesIdentification(s[index], tagName, toolCode, tcf, featureFlag, arch);\r
+ sfid[index] = new SourceFilesIdentification(s[index], tagName, toolCode, tcf, featureFlag, arch);\r
}\r
return sfid;\r
}\r