Skip to content
Ivan Inozemtsev edited this page Feb 8, 2012 · 6 revisions

Syntax

Pretty much like TCL, ECL operates by commands. Each ECL command has an arbitrary arguments, plus input and output pipes. Thus, command optionally reads objects from input pipe, performs some actions and optionally writes some result into output pipe.

The examples below give a brief syntax overview.

get-log //When no args given, all args set to its defaults

get-log -limit 10 -skipInfo true //Arguments can have explicit names

get-log -limit 10 -skipInfo //Boolean arguments can be set to 'true' just by argument name

//Argument names can be omitted, in this case values applied according 
//to argument declaration order
get-log 10 false

//Pipes can be used to redirect output of left command to input of right command
list-plugins | sort-by pluginId
list-plugins | sort-by pluginId | print

//Square braces can be used to set command execution result (contents of output pipe)
//as a parameter of another command
get-menu [get-by-os -default "Window/Preferences" -macosx "Eclipse/Preferences] | click

//ECL script can be passed as argument to another command by wrapping script in curly braces
try -times 10 -command { get-button "Foo" | click }

Clone this wiki locally