Difference: DpHipeTools (98 vs. 99)

Revision 992012-11-21 - JavierDiaz

Line: 1 to 1
 
META TOPICPARENT name="WritingTasks"
<-- ANALYTICS CODE - DO NOT EDIT -->
<-- Google Analytics script BEGIN -->
<-- Google Analytics script END -->
Line: 147 to 147
 A validator is mandatory for the task to appear in the Applicable category of the Tasks view. If your task really is very general and applies to a given variable type with no exceptions, use TaskParameter.TRUE_VALIDATOR. There are also support classes for writing common validators: AnyOfValidator, InstanceOfValidator, PredicateValidator, RangeValidator, RegexValidator in package ia.gui.apps.validator. Please, do not implement ParameterValidator interface directly as it will block extension of it: use ParameterValidatorAdapter (that also detects some validation problems). Note that your validators must be fast, self-contained (with no visible side effects) and not use I/O : they are called frequently and from multiple threads, including the EDT in the case of GUI validation.
Added:
>
>

Avoiding Applicability

You can veto appearing in Applicable in Tasks View by overriding Task.canBeApplicable() to return false. This applies, for example, to tasks whose primary input is a number or a String (and they have/need validators).
 

Task dialogue windows

 
This site is powered by the TWiki collaboration platform Powered by Perl