To create the JAYA commands it is suggested to use the provided commands as examples and models.
The table below illustrates different kind of command to be created and the solutions provided.
Type of command | The JAYA command.. | Example | Comment | |
---|---|---|---|---|
extends | implements | |||
No option | jmel.script.Script | abs abs -1.2 | Must provide static method(s) exec | |
All options Queryable or Settable | jmel.script.StaticCommand | about about -v | Must provide static method(s) named with the option names | |
Some options Queryable/Editable, most Settable | jmel.script.Commandable | window $w=`window -t "mywnd"` window -q -t $w | Must provide one non-static method exec | |
Supports -q/-query (Q) | jmel.script.Commandable | window $w=`window` window -q -t $w | Must provide non-static method(s) get+option name | |
Supports -e/-edit (E or C or M) | jmel.script.Commandable | window $w=`window` window -e -t "newtitle" $w | Must provide non-static method(s) set+option name | |
Supports -ex/exists (E or C or M) | jmel.script.Commandable | window window -exists $w | Must provide the static methods getEx/getExists or isEx/isExists | |
Supports -dt/defineTemplate | jmel.script.Commandable jmel.script.Templatable | window window -dt "mytmpl" -t "title" | Must provide the non-static methods setDt/setDefineTemplate | |
Supports -ut/useTemplate | jmel.script.Commandable jmel.script.Templatable | window $w=`window -ut "mytmpl"` | Must provide the non-static methods setUt/setUseTemplate |