]>
Commit | Line | Data |
---|---|---|
06a19cee | 1 | /** @file\r |
2 | \r | |
3f62225f | 3 | The file is used to create, update Variables section of the MSA file\r |
06a19cee | 4 | \r |
5 | Copyright (c) 2006, Intel Corporation\r | |
6 | All rights reserved. This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | package org.tianocore.frameworkwizard.module.ui.dialog;\r | |
17 | \r | |
18 | import java.awt.event.ActionEvent;\r | |
19 | import java.util.Vector;\r | |
20 | \r | |
21 | import javax.swing.JButton;\r | |
22 | import javax.swing.JComboBox;\r | |
23 | import javax.swing.JLabel;\r | |
24 | import javax.swing.JPanel;\r | |
25 | import javax.swing.JScrollPane;\r | |
26 | import javax.swing.JTextField;\r | |
ccb063b1 | 27 | import javax.swing.JTextArea;\r |
06a19cee | 28 | \r |
29 | import org.tianocore.frameworkwizard.common.DataType;\r | |
30 | import org.tianocore.frameworkwizard.common.DataValidation;\r | |
31 | import org.tianocore.frameworkwizard.common.EnumerationData;\r | |
32 | import org.tianocore.frameworkwizard.common.Log;\r | |
33 | import org.tianocore.frameworkwizard.common.Tools;\r | |
34 | import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;\r | |
55683eab | 35 | import org.tianocore.frameworkwizard.common.ui.IComboBox;\r |
06a19cee | 36 | import org.tianocore.frameworkwizard.common.ui.IDialog;\r |
37 | import org.tianocore.frameworkwizard.common.ui.IFrame;\r | |
38 | import org.tianocore.frameworkwizard.common.ui.StarLabel;\r | |
e08433ef | 39 | import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r |
06a19cee | 40 | import org.tianocore.frameworkwizard.module.Identifications.Variables.VariablesIdentification;\r |
d48c170d | 41 | import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r |
06a19cee | 42 | import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r |
43 | \r | |
44 | /**\r | |
9e857952 | 45 | * The class is used to create, update Variables section of the MSA file\r |
46 | * \r | |
3f62225f | 47 | * It extends IDialog\r |
ccb063b1 | 48 | * \r |
49 | */\r | |
06a19cee | 50 | public class VariablesDlg extends IDialog {\r |
51 | \r | |
a929458e | 52 | // /\r |
53 | // / Define class Serial Version UID\r | |
54 | // /\r | |
55 | private static final long serialVersionUID = -6998982978030439446L;\r | |
06a19cee | 56 | \r |
a929458e | 57 | //\r |
58 | // Define class members\r | |
59 | //\r | |
60 | private JPanel jContentPane = null;\r | |
06a19cee | 61 | \r |
a929458e | 62 | private JLabel jLabelVariableName = null;\r |
06a19cee | 63 | \r |
a929458e | 64 | private JTextField jTextFieldVariableName = null;\r |
06a19cee | 65 | \r |
a929458e | 66 | private JLabel jLabelUsage = null;\r |
06a19cee | 67 | \r |
a929458e | 68 | private JComboBox jComboBoxUsage = null;\r |
06a19cee | 69 | \r |
a929458e | 70 | private StarLabel jStarLabel1 = null;\r |
06a19cee | 71 | \r |
a929458e | 72 | private StarLabel jStarLabel2 = null;\r |
06a19cee | 73 | \r |
a929458e | 74 | private StarLabel jStarLabel3 = null;\r |
06a19cee | 75 | \r |
a929458e | 76 | private JScrollPane jScrollPane = null;\r |
06a19cee | 77 | \r |
a929458e | 78 | private JLabel jLabelGuidCName = null;\r |
06a19cee | 79 | \r |
55683eab | 80 | private IComboBox iComboBoxGuidC_Name = null;\r |
06a19cee | 81 | \r |
a929458e | 82 | private JTextField jTextFieldFeatureFlag = null;\r |
06a19cee | 83 | \r |
a929458e | 84 | private JLabel jLabelFeatureFlag = null;\r |
06a19cee | 85 | \r |
a929458e | 86 | private JLabel jLabelArch = null;\r |
06a19cee | 87 | \r |
a929458e | 88 | private JLabel jLabelHelpText = null;\r |
06a19cee | 89 | \r |
a929458e | 90 | private JTextArea jTextAreaHelpText = null;\r |
06a19cee | 91 | \r |
a929458e | 92 | private JScrollPane jScrollPaneHelpText = null;\r |
06a19cee | 93 | \r |
a929458e | 94 | private ArchCheckBox jArchCheckBox = null;\r |
06a19cee | 95 | \r |
a929458e | 96 | private JButton jButtonOk = null;\r |
06a19cee | 97 | \r |
a929458e | 98 | private JButton jButtonCancel = null;\r |
06a19cee | 99 | \r |
a929458e | 100 | //\r |
101 | // Not used by UI\r | |
102 | //\r | |
103 | private VariablesIdentification id = null;\r | |
104 | \r | |
105 | private EnumerationData ed = new EnumerationData();\r | |
106 | \r | |
107 | private WorkspaceTools wt = new WorkspaceTools();\r | |
108 | \r | |
109 | /**\r | |
110 | * This method initializes jTextFieldString\r | |
111 | * \r | |
112 | * @return javax.swing.JTextField jTextFieldString\r | |
113 | * \r | |
114 | */\r | |
115 | private JTextField getJTextFieldString() {\r | |
116 | if (jTextFieldVariableName == null) {\r | |
117 | jTextFieldVariableName = new JTextField();\r | |
118 | jTextFieldVariableName.setSize(new java.awt.Dimension(320, 20));\r | |
119 | jTextFieldVariableName.setPreferredSize(new java.awt.Dimension(320, 20));\r | |
3f62225f | 120 | jTextFieldVariableName.setLocation(new java.awt.Point(168, 12));\r |
d48c170d | 121 | jTextFieldVariableName.setToolTipText("Enter a string; the tool will convert to Unicode hex");\r |
a929458e | 122 | }\r |
123 | return jTextFieldVariableName;\r | |
124 | }\r | |
06a19cee | 125 | \r |
a929458e | 126 | /**\r |
127 | * This method initializes jComboBoxUsage\r | |
128 | * \r | |
129 | * @return javax.swing.JComboBox jComboBoxUsage\r | |
130 | * \r | |
131 | */\r | |
132 | private JComboBox getJComboBoxUsage() {\r | |
133 | if (jComboBoxUsage == null) {\r | |
134 | jComboBoxUsage = new JComboBox();\r | |
3f62225f | 135 | jComboBoxUsage.setBounds(new java.awt.Rectangle(168, 62, 320, 20));\r |
a929458e | 136 | jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r |
137 | jComboBoxUsage\r | |
9e857952 | 138 | .setToolTipText("<html><table>"\r |
139 | + "<tr><td>ALWAYS_CONSUMED</td><td>The module requires the variable entry to be set</td></tr>"\r | |
140 | + "<tr><td>SOMETIMES_CONSUMED</td><td>The module will use the variable entry if it is set.</td></tr>"\r | |
141 | + "<tr><td>ALWAYS_PRODUCED</td><td>The module will always write the variable.</td></tr>"\r | |
142 | + "<tr><td>SOMETIMES_PRODUCED</td><td>The module will sometimes write the variable.</td></tr>"\r | |
143 | + "</table></html>");\r | |
a929458e | 144 | }\r |
145 | return jComboBoxUsage;\r | |
146 | }\r | |
06a19cee | 147 | \r |
a929458e | 148 | /**\r |
149 | * This method initializes jScrollPane\r | |
150 | * \r | |
151 | * @return javax.swing.JScrollPane\r | |
152 | */\r | |
153 | private JScrollPane getJScrollPane() {\r | |
154 | if (jScrollPane == null) {\r | |
155 | jScrollPane = new JScrollPane();\r | |
156 | jScrollPane.setViewportView(getJContentPane());\r | |
157 | }\r | |
158 | return jScrollPane;\r | |
06a19cee | 159 | }\r |
a929458e | 160 | \r |
161 | /**\r | |
162 | * This method initializes jTextFieldFeatureFlag\r | |
163 | * \r | |
164 | * @return javax.swing.JTextField jTextFieldFeatureFlag\r | |
165 | * \r | |
166 | */\r | |
167 | private JTextField getJTextFieldFeatureFlag() {\r | |
168 | if (jTextFieldFeatureFlag == null) {\r | |
169 | jTextFieldFeatureFlag = new JTextField();\r | |
21b42c66 | 170 | jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(168, 157, 320, 20));\r |
a929458e | 171 | jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r |
172 | jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r | |
21b42c66 | 173 | jTextFieldFeatureFlag.setEnabled(false);\r |
a929458e | 174 | }\r |
175 | return jTextFieldFeatureFlag;\r | |
06a19cee | 176 | }\r |
a929458e | 177 | \r |
178 | /**\r | |
179 | * This method initializes jTextFieldHelpText\r | |
180 | * \r | |
181 | * @return javax.swing.JTextField\r | |
182 | * \r | |
183 | */\r | |
184 | private JTextArea getJTextAreaHelpText() {\r | |
185 | if (jTextAreaHelpText == null) {\r | |
186 | jTextAreaHelpText = new JTextArea();\r | |
187 | jTextAreaHelpText.setLineWrap(true);\r | |
188 | jTextAreaHelpText.setWrapStyleWord(true);\r | |
189 | jTextAreaHelpText.setToolTipText("Enter information on how to use this Variable.");\r | |
190 | }\r | |
191 | return jTextAreaHelpText;\r | |
06a19cee | 192 | }\r |
a929458e | 193 | \r |
194 | private JScrollPane getJScrollPaneHelpText() {\r | |
195 | if (jScrollPaneHelpText == null) {\r | |
196 | jScrollPaneHelpText = new JScrollPane();\r | |
197 | jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r | |
198 | jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r | |
199 | jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r | |
3f62225f | 200 | jScrollPaneHelpText.setLocation(new java.awt.Point(168, 87));\r |
a929458e | 201 | jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r |
202 | }\r | |
203 | return jScrollPaneHelpText;\r | |
06a19cee | 204 | }\r |
a929458e | 205 | \r |
206 | /**\r | |
55683eab | 207 | * This method initializes iComboBoxGuidC_Name\r |
a929458e | 208 | * \r |
55683eab | 209 | * @return javax.swing.JComboBox iComboBoxGuidC_Name\r |
a929458e | 210 | * \r |
211 | */\r | |
55683eab | 212 | private IComboBox getIComboBoxGuidC_Name() {\r |
213 | if (iComboBoxGuidC_Name == null) {\r | |
214 | iComboBoxGuidC_Name = new IComboBox();\r | |
215 | iComboBoxGuidC_Name.setBounds(new java.awt.Rectangle(168, 37, 320, 20));\r | |
216 | iComboBoxGuidC_Name.setPreferredSize(new java.awt.Dimension(320, 20));\r | |
217 | iComboBoxGuidC_Name.setToolTipText("Select the GUID C Name of the Variable.");\r | |
a929458e | 218 | }\r |
55683eab | 219 | return iComboBoxGuidC_Name;\r |
06a19cee | 220 | }\r |
a929458e | 221 | \r |
222 | /**\r | |
223 | * This method initializes jButtonOk\r | |
224 | * \r | |
225 | * @return javax.swing.JButton\r | |
226 | * \r | |
227 | */\r | |
228 | private JButton getJButtonOk() {\r | |
229 | if (jButtonOk == null) {\r | |
230 | jButtonOk = new JButton();\r | |
3f62225f | 231 | jButtonOk.setBounds(new java.awt.Rectangle(290, 187, 90, 20));\r |
a929458e | 232 | jButtonOk.setText("Ok");\r |
233 | jButtonOk.addActionListener(this);\r | |
234 | }\r | |
235 | return jButtonOk;\r | |
06a19cee | 236 | }\r |
a929458e | 237 | \r |
238 | /**\r | |
239 | * This method initializes jButtonCancel\r | |
240 | * \r | |
241 | * @return javax.swing.JButton\r | |
242 | * \r | |
243 | */\r | |
244 | private JButton getJButtonCancel() {\r | |
245 | if (jButtonCancel == null) {\r | |
246 | jButtonCancel = new JButton();\r | |
3f62225f | 247 | jButtonCancel.setBounds(new java.awt.Rectangle(390, 187, 90, 20));\r |
a929458e | 248 | jButtonCancel.setText("Cancel");\r |
249 | jButtonCancel.addActionListener(this);\r | |
250 | }\r | |
251 | return jButtonCancel;\r | |
252 | }\r | |
253 | \r | |
254 | public static void main(String[] args) {\r | |
255 | \r | |
06a19cee | 256 | }\r |
a929458e | 257 | \r |
258 | /**\r | |
259 | * This method initializes this\r | |
260 | * \r | |
261 | */\r | |
262 | private void init() {\r | |
3f62225f | 263 | this.setSize(505, 260);\r |
a929458e | 264 | this.setContentPane(getJScrollPane());\r |
265 | this.setTitle("Variables");\r | |
266 | initFrame();\r | |
267 | this.setViewMode(false);\r | |
268 | this.centerWindow();\r | |
06a19cee | 269 | }\r |
a929458e | 270 | \r |
271 | /**\r | |
272 | * This method initializes this Fill values to all fields if these values are\r | |
273 | * not empty\r | |
274 | * \r | |
275 | * @param inVariablesId\r | |
276 | * \r | |
277 | */\r | |
e08433ef | 278 | private void init(VariablesIdentification inVariablesId, ModuleIdentification mid) {\r |
a929458e | 279 | init();\r |
280 | this.id = inVariablesId;\r | |
d48c170d | 281 | \r |
e08433ef | 282 | //\r |
283 | // Init arch with module's arch\r | |
284 | //\r | |
285 | this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r | |
a929458e | 286 | \r |
d48c170d | 287 | //\r |
288 | // Get defined guids from dependent packages\r | |
289 | //\r | |
290 | Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);\r | |
291 | if (vpid.size() <= 0) {\r | |
292 | Log\r | |
293 | .wrn("Init Guid",\r | |
294 | "This module hasn't defined any package dependency, so there is no guid value can be added for variable");\r | |
295 | }\r | |
296 | //\r | |
297 | // Init guids drop down list\r | |
298 | //\r | |
299 | Tools\r | |
55683eab | 300 | .generateComboBoxByVector(iComboBoxGuidC_Name,\r |
d48c170d | 301 | wt.getAllGuidDeclarationsFromPackages(vpid, EnumerationData.GUID_TYPE_EFI_VARIABLE));\r |
302 | \r | |
a929458e | 303 | if (this.id != null) {\r |
304 | this.jTextFieldVariableName.setText(id.getName());\r | |
55683eab | 305 | this.iComboBoxGuidC_Name.setSelectedItem(id.getGuid());\r |
a929458e | 306 | this.jComboBoxUsage.setSelectedItem(id.getUsage());\r |
307 | this.jTextAreaHelpText.setText(id.getHelp());\r | |
308 | this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r | |
309 | this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r | |
310 | }\r | |
06a19cee | 311 | }\r |
a929458e | 312 | \r |
313 | /**\r | |
314 | * This is the override edit constructor\r | |
315 | * \r | |
316 | * @param inVariablesIdentification\r | |
317 | * @param iFrame\r | |
318 | * \r | |
319 | */\r | |
e08433ef | 320 | public VariablesDlg(VariablesIdentification inVariablesIdentification, IFrame iFrame, ModuleIdentification mid) {\r |
a929458e | 321 | super(iFrame, true);\r |
e08433ef | 322 | init(inVariablesIdentification, mid);\r |
06a19cee | 323 | }\r |
a929458e | 324 | \r |
325 | /**\r | |
326 | * Disable all components when the mode is view\r | |
327 | * \r | |
328 | * @param isView\r | |
329 | * true - The view mode; false - The non-view mode\r | |
330 | * \r | |
331 | */\r | |
332 | public void setViewMode(boolean isView) {\r | |
333 | if (isView) {\r | |
334 | this.jTextFieldVariableName.setEnabled(!isView);\r | |
335 | this.jComboBoxUsage.setEnabled(!isView);\r | |
336 | }\r | |
06a19cee | 337 | }\r |
a929458e | 338 | \r |
339 | /**\r | |
340 | * This method initializes jContentPane\r | |
341 | * \r | |
342 | * @return javax.swing.JPanel jContentPane\r | |
343 | * \r | |
344 | */\r | |
345 | private JPanel getJContentPane() {\r | |
346 | if (jContentPane == null) {\r | |
347 | jStarLabel1 = new StarLabel();\r | |
3f62225f | 348 | jStarLabel1.setLocation(new java.awt.Point(2, 12));\r |
a929458e | 349 | jLabelVariableName = new JLabel();\r |
350 | jLabelVariableName.setText("Variable Name");\r | |
3f62225f | 351 | jLabelVariableName.setBounds(new java.awt.Rectangle(12, 12, 168, 20));\r |
a929458e | 352 | \r |
353 | jStarLabel2 = new StarLabel();\r | |
3f62225f | 354 | jStarLabel2.setLocation(new java.awt.Point(2, 37));\r |
a929458e | 355 | jLabelGuidCName = new JLabel();\r |
3f62225f | 356 | jLabelGuidCName.setBounds(new java.awt.Rectangle(12, 37, 168, 20));\r |
a929458e | 357 | jLabelGuidCName.setText("Variable Guid C Name");\r |
358 | \r | |
359 | jStarLabel3 = new StarLabel();\r | |
3f62225f | 360 | jStarLabel3.setLocation(new java.awt.Point(2, 62));\r |
a929458e | 361 | jLabelUsage = new JLabel();\r |
362 | jLabelUsage.setText("Usage");\r | |
3f62225f | 363 | jLabelUsage.setBounds(new java.awt.Rectangle(12, 62, 168, 20));\r |
a929458e | 364 | \r |
365 | jLabelHelpText = new JLabel();\r | |
3f62225f | 366 | jLabelHelpText.setBounds(new java.awt.Rectangle(12, 87, 168, 20));\r |
a929458e | 367 | jLabelHelpText.setText("Help Text");\r |
368 | \r | |
369 | jLabelFeatureFlag = new JLabel();\r | |
370 | jLabelFeatureFlag.setText("Feature Flag Expression");\r | |
21b42c66 | 371 | jLabelFeatureFlag.setBounds(new java.awt.Rectangle(12, 157, 168, 20));\r |
372 | jLabelFeatureFlag.setEnabled(false);\r | |
a929458e | 373 | \r |
374 | jLabelArch = new JLabel();\r | |
21b42c66 | 375 | jLabelArch.setBounds(new java.awt.Rectangle(12, 132, 168, 20));\r |
a929458e | 376 | jLabelArch.setText("Supported Architectures");\r |
377 | jArchCheckBox = new ArchCheckBox();\r | |
21b42c66 | 378 | jArchCheckBox.setBounds(new java.awt.Rectangle(168, 132, 320, 20));\r |
a929458e | 379 | jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r |
380 | \r | |
381 | jContentPane = new JPanel();\r | |
382 | jContentPane.setLayout(null);\r | |
3f62225f | 383 | jContentPane.setPreferredSize(new java.awt.Dimension(485, 215));\r |
a929458e | 384 | \r |
385 | jContentPane.add(jStarLabel1, null);\r | |
386 | jContentPane.add(jLabelVariableName, null);\r | |
387 | jContentPane.add(getJTextFieldString(), null);\r | |
388 | jContentPane.add(jStarLabel2, null);\r | |
389 | jContentPane.add(jLabelGuidCName, null);\r | |
55683eab | 390 | jContentPane.add(getIComboBoxGuidC_Name(), null);\r |
a929458e | 391 | jContentPane.add(jStarLabel3, null);\r |
392 | jContentPane.add(jLabelUsage, null);\r | |
393 | jContentPane.add(getJComboBoxUsage(), null);\r | |
394 | jContentPane.add(jLabelHelpText, null);\r | |
395 | jContentPane.add(getJScrollPaneHelpText(), null);\r | |
396 | jContentPane.add(jLabelFeatureFlag, null);\r | |
397 | jContentPane.add(getJTextFieldFeatureFlag(), null);\r | |
398 | jContentPane.add(jLabelArch, null);\r | |
399 | jContentPane.add(jArchCheckBox, null);\r | |
400 | jContentPane.add(getJButtonOk(), null);\r | |
401 | jContentPane.add(getJButtonCancel(), null);\r | |
402 | }\r | |
403 | return jContentPane;\r | |
06a19cee | 404 | }\r |
a929458e | 405 | \r |
406 | /*\r | |
407 | * (non-Javadoc)\r | |
408 | * \r | |
409 | * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r | |
410 | * \r | |
411 | * Override actionPerformed to listen all actions\r | |
412 | * \r | |
413 | */\r | |
414 | public void actionPerformed(ActionEvent arg0) {\r | |
415 | if (arg0.getSource() == jButtonOk) {\r | |
416 | if (checkAdd()) {\r | |
417 | getCurrentVariables();\r | |
418 | this.returnType = DataType.RETURN_TYPE_OK;\r | |
419 | this.setVisible(false);\r | |
420 | }\r | |
421 | }\r | |
422 | \r | |
423 | if (arg0.getSource() == jButtonCancel) {\r | |
424 | this.returnType = DataType.RETURN_TYPE_CANCEL;\r | |
425 | this.setVisible(false);\r | |
426 | }\r | |
06a19cee | 427 | }\r |
428 | \r | |
a929458e | 429 | /**\r |
430 | * This method initializes Usage type\r | |
431 | * \r | |
432 | */\r | |
433 | private void initFrame() {\r | |
434 | Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVPpiUsage());\r | |
ccb063b1 | 435 | }\r |
06a19cee | 436 | \r |
a929458e | 437 | /**\r |
438 | * Data validation for all fields\r | |
439 | * \r | |
440 | * @retval true - All datas are valid\r | |
441 | * @retval false - At least one data is invalid\r | |
442 | * \r | |
443 | */\r | |
444 | public boolean checkAdd() {\r | |
445 | //\r | |
446 | // Check if all fields have correct data types\r | |
447 | //\r | |
d48c170d | 448 | \r |
a929458e | 449 | //\r |
450 | // Check VariableName\r | |
451 | //\r | |
452 | if (isEmpty(this.jTextFieldVariableName.getText())) {\r | |
623db5ca | 453 | Log.wrn("Update Variables", "Variable Name must be entered!");\r |
a929458e | 454 | return false;\r |
455 | }\r | |
d48c170d | 456 | \r |
457 | //\r | |
458 | // Check Guid Value\r | |
459 | //\r | |
55683eab | 460 | if (this.iComboBoxGuidC_Name.getSelectedItem() == null) {\r |
d48c170d | 461 | Log.wrn("Update Guids", "Please select one Varibale Guid value");\r |
462 | return false;\r | |
463 | }\r | |
a929458e | 464 | \r |
a929458e | 465 | //\r |
466 | // Check FeatureFlag\r | |
467 | //\r | |
468 | if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r | |
469 | if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r | |
470 | Log.wrn("Update Variables", "Incorrect data type for Feature Flag");\r | |
471 | return false;\r | |
472 | }\r | |
473 | }\r | |
474 | \r | |
475 | return true;\r | |
06a19cee | 476 | }\r |
477 | \r | |
a929458e | 478 | private VariablesIdentification getCurrentVariables() {\r |
479 | String arg0 = this.jTextFieldVariableName.getText();\r | |
55683eab | 480 | String arg1 = this.iComboBoxGuidC_Name.getSelectedItem().toString();\r |
a929458e | 481 | String arg2 = this.jComboBoxUsage.getSelectedItem().toString();\r |
482 | \r | |
483 | String arg3 = this.jTextFieldFeatureFlag.getText();\r | |
484 | Vector<String> arg4 = this.jArchCheckBox.getSelectedItemsVector();\r | |
485 | String arg5 = this.jTextAreaHelpText.getText();\r | |
486 | \r | |
487 | id = new VariablesIdentification(arg0, arg1, arg2, arg3, arg4, arg5);\r | |
488 | return id;\r | |
06a19cee | 489 | }\r |
490 | \r | |
a929458e | 491 | public VariablesIdentification getId() {\r |
492 | return id;\r | |
06a19cee | 493 | }\r |
ccb063b1 | 494 | \r |
a929458e | 495 | public void setId(VariablesIdentification id) {\r |
496 | this.id = id;\r | |
497 | }\r | |
06a19cee | 498 | }\r |