Révision 2161
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParametersDialog.java (revision 2161) | ||
|---|---|---|
| 89 | 89 |
if (args.containsKey(option.name())) {
|
| 90 | 90 |
continue; // don't show the field |
| 91 | 91 |
} |
| 92 |
if (option.required()) numberOfMandatoryFields++; |
|
| 92 |
|
|
| 93 |
//count number of mandatory fields set AND add exception for "Separator" widget types |
|
| 94 |
if (option.required() || "Separator".equals(option.widget())) numberOfMandatoryFields++; |
|
| 93 | 95 |
numberOfParameters++; |
| 94 | 96 |
} |
| 95 | 97 |
} |
| ... | ... | |
| 330 | 332 |
ParameterField w = widgets.get(field); |
| 331 | 333 |
Object value = w.getWidgetValue(); |
| 332 | 334 |
|
| 333 |
if (w.isWidgetMandatory() && value == null) {
|
|
| 335 |
// is widget set if mandatory EXCEPT "Separator" widgets |
|
| 336 |
if (w.isWidgetMandatory() && value == null && !("Separator".equals(w.getWidgetType()))) {
|
|
| 334 | 337 |
System.out.println(TXMUIMessages.errorColonMissingValueColon+field); |
| 335 | 338 |
error = true; |
| 336 | 339 |
} else if (value != null) {
|
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParameterField.java (revision 2161) | ||
|---|---|---|
| 20 | 20 |
* @return the default value if the Macro has not been called previously |
| 21 | 21 |
*/ |
| 22 | 22 |
public String getWidgetDefault() { return parameter.def(); }
|
| 23 |
public String getWidgetType() { return parameter.widget(); }
|
|
| 23 | 24 |
public boolean isWidgetMandatory() { return parameter.required(); }
|
| 24 | 25 |
public boolean isWidgetMultiValued() { return parameter.isMultiValued(); }
|
| 25 | 26 |
|
Formats disponibles : Unified diff