| <?xml version="1.0" encoding="UTF-8"?> |
| <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="core" nsURI="http://www.eclipse.org/ecl/core.ecore" nsPrefix="org.eclipse.rcptt.ecl.core"> |
| <eClassifiers xsi:type="ecore:EClass" name="Command"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="host" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> |
| <eAnnotations source="http://www.eclipse.org/ecl/internal"/> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="bindings" upperBound="-1" |
| eType="#//Binding" containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/internal"/> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Binding"> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="feature" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EStructuralFeature"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="command" eType="#//Command" |
| containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Block" abstract="true" eSuperTypes="#//Command"> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="commands" lowerBound="1" |
| upperBound="-1" eType="#//Command" containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Pipeline" eSuperTypes="#//Block"/> |
| <eClassifiers xsi:type="ecore:EClass" name="Sequence" eSuperTypes="#//Block"/> |
| <eClassifiers xsi:type="ecore:EClass" name="Parallel" eSuperTypes="#//Block"/> |
| <eClassifiers xsi:type="ecore:EClass" name="With" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Executes a <code>do</code> script by passing given <code>object</code> to each command inside <code>do</code>. The primary use case for this command is to extract a common prefix for a sequence of commands."/> |
| <details key="returns" value="Output of a <code>do</code> command"/> |
| <details key="example" value="get-view "Package Explorer" | get-button "Collapse All (M1+M2+Numpad_Divide)" | click
get-view "Package Explorer" | get-button "Link with Editor" | click
// can be shorten to:
with [get-view "Package Explorer"] {
 get-button "Collapse All (M1+M2+Numpad_Divide)" | click
 get-button "Link with Editor" | click
}
"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="object" lowerBound="1" |
| eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject" |
| containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="do" lowerBound="1" eType="#//Command" |
| containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Exec" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/internal"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="namespace" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" upperBound="-1" |
| eType="#//Parameter" containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Parameter"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="ExecutableParameter" eSuperTypes="#//Parameter"> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="command" lowerBound="1" |
| eType="#//Command" containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="LiteralParameter" eSuperTypes="#//Parameter"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="literal" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="format" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Foreach" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Reads objects from input pipe and for each object executes a given <code>do</code> command for each item. An optional variable declaration to hold a current value can be passed, if it is not passed, then current value is sent into an input pipe of a <code>do</code> command. "/> |
| <details key="returns" value="An aggregated output of <code>do</code> command"/> |
| <details key="example" value="// Implicit item: sent to an input pipe of inner script
list-launch-configurations | foreach { get name | log }

// Explicit item:
list-launch-configuration | foreach [val item] {
 $item | get-name | log
}"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="item" eType="#//Val" containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="do" eType="#//Command" |
| containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="input" unique="false" upperBound="-1" |
| eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Script" eSuperTypes="#//Command"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="content" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="ProcessStatus"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="pluginId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="code" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="message" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="severity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="exception" eType="#//EclException" |
| containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="ConvertedToEMFPipe"> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="object" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject" |
| containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Serialized"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="bytes" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EByteArray"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EDataType" name="Throwable" instanceClassName="java.lang.Throwable"/> |
| <eClassifiers xsi:type="ecore:EClass" name="Nullable"> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject" |
| containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="If" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Based on a condition corresponds either command either from <code>then</code> or <code>else</code> branch. "/> |
| <details key="returns" value="Output of executed branch"/> |
| <details key="example" value="if [get-property caption -raw | not-eq "Test" ] {
	select-item
	get-menu Delete | click
	get-window "Delete Resources" | get-button OK | click
}"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="condition" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Accepted values are boolean, string (<code>true</code> when case-insensitive equals to <code>true</code>, <code>false</code> otherwise) and number (<code>0</code> for <code>false</code>, <code>true</code> otherwise). "/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="then" eType="#//Command" |
| containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Branch being executed on <code>true</code> input. Can be omitted."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="else" eType="#//Command" |
| containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Branch being executed on <code>false</code> input. Can be omitted."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="BoxedValue" abstract="true"/> |
| <eClassifiers xsi:type="ecore:EClass" name="EclByte" eSuperTypes="#//BoxedValue"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EByte"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclShort" eSuperTypes="#//BoxedValue"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EShort"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclInteger" eSuperTypes="#//BoxedValue"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclLong" eSuperTypes="#//BoxedValue"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//ELong"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclDouble" eSuperTypes="#//BoxedValue"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EDouble"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclFloat" eSuperTypes="#//BoxedValue"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EFloat"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclBoolean" eSuperTypes="#//BoxedValue"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclChar" eSuperTypes="#//BoxedValue"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EChar"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclString" eSuperTypes="#//BoxedValue"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclException"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="className" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="message" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="stackTrace" upperBound="-1" |
| eType="#//EclStackTraceEntry" containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="throwable" eType="#//Throwable"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="cause" eType="#//EclException" |
| containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclStackTraceEntry"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="index" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="declaringClass" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="methodName" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="fileName" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="lineNumber" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="nativeMethod" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Listen" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Listens for state changes while executing commands."/> |
| <details key="returns" value="State difference before and after execution."/> |
| <details key="example" value="// assert no new errors while clicking on the button
listen errorLog {
	get-button OK | click
} | assert-empty"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="source" lowerBound="1" |
| eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Source to listen for, for example, <code>errorLog</code>."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="while" lowerBound="1" eType="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Commands to execute while listening for the source."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Declaration" eSuperTypes="#//Command"/> |
| <eClassifiers xsi:type="ecore:EClass" name="Val" eSuperTypes="#//Declaration"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Creates a new variable declaration. This command can be used only with <a href="#let">let</a> and <a href="#proc">proc</a>."/> |
| <details key="returns" value="An internal object, describing a variable"/> |
| <details key="example" value="let [val button [get-button OK]] {
 $button | click
}"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Variable name. Later this name can be used to refer to a variable value by prepending a dollar sign, i.e. $varName. If variable with the same name already defined in outer scope, then it will be hidden by inner variable with the same name."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Variable value. When variable is defined in <a href="#proc">proc</a> block, this value denotes the default parameter value."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="input" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean" |
| defaultValueLiteral="false"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="An option to indicate that variable value should be taken from input pipe. "/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="GetVal" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Returns variable value by its name. Syntax sugar form <code>$name</code> can be used instead."/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Let" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Defines variables and evaluates <code>body</code> script. Variable declarations are only visible from withing a body script and cannot be accessed after 'let' command. If some variable has <code>-input</code> flag, then <code>let</code> command must be used in a pipeline (see example 2). "/> |
| <details key="returns" value="An output of a <code>body</code> script"/> |
| <details key="example" value="// example #1, simple usage of two variables
let [val foo "hello"]
 [val bar "world!"] {
	format "%s, %s" $foo $bar | show-alert
}

// example #2, using input argument
get-window "New Project" | let [val window -input] [val button OK] {
 $window | get-button $button | click
}
"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="vals" upperBound="-1" eType="#//Declaration" |
| containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="List of variables"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="body" eType="#//Command" |
| containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Script to be executed"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Proc" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Declares a new procedure in a context of current ECL session, which can later be accessed as a usual command."/> |
| <details key="returns" value="An output of a <code>body</code> script"/> |
| <details key="example" value="// example 1
// declaration:
proc click-button [val window] [val button] {
 get-window $window | get-button $button | click
}

// usage
click-button "New Project" "Cancel"

// example #2, using input argument and default value
// declaration:
proc set-text-after-label [val parent -input] [val label] [val text ""] {
	$parent | get-editbox -after [get-label $label] | set-text $text
}

// usage:
with [get-window "New Project"] {
 set-text-after-label "Name:" "Sample Project"
}
get-editor | set-text-after-label "Text""/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Procedure name. Must be unique in a context of current ECL session"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="vals" upperBound="-1" eType="#//Declaration" |
| containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="body" eType="#//Command" |
| containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="ProcInstance" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Marker superclass for user-defined procs"/> |
| </eAnnotations> |
| <eAnnotations source="http://www.eclipse.org/ecl/internal"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="definition" eType="#//Proc"> |
| <eAnnotations source="http://www.eclipse.org/ecl/internal"/> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Global" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/internal"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="vals" upperBound="-1" eType="#//Declaration" |
| containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="override" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean" |
| defaultValueLiteral="false"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="SessionState"> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="procs" upperBound="-1" |
| eType="#//Proc" containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="decls" upperBound="-1" |
| eType="#//Declaration" containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="SaveState" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/internal"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="RestoreState" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/internal"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="state" eType="#//SessionState" |
| containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Get" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Depending on input object, either returns a value by key from <a href="#map">map</a>, or element by index from <a href="#list">list</a>, or member of EMF object by name."/> |
| <details key="example" value="//types 1 into log
emit "1" "2" "3" | to-list | get 0 | str | log
//types Febuary into log
map [entry 1 January][entry 2 Febuary] | get 2 | log"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="input" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject" |
| containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Object to get a value from"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="key" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject" |
| containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Depending on an input object either a key in a map, or index in a list, or name of a feature/attribute of EMF object"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="default" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject" |
| containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Value to return if input object does not contain value by requested key"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclList"> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1" |
| eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject" |
| containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclMap"> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="entries" upperBound="-1" |
| eType="#//EclMapEntry" containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="EclMapEntry"> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="key" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject" |
| containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject" |
| containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Case" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Corresponds command from <code>then</code> branch if an object from the <code>input</code> matches the <code>condition</code> object."/> |
| <details key="returns" value="An internal object describing the case."/> |
| <details key="example" value="list 1 2 3 | get 0 | switch [case 1 {
	log -message "First item is 1"
}] [case 2 {
	log -message "First item is 2"
}]"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="condition" lowerBound="1" |
| eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Object used to match to the <code>input</code>. Accepted values are boolean, string (<code>true</code> when case-insensitive equals to <code>true</code>, <code>false</code> otherwise) and number (<code>0</code> for <code>false</code>, <code>true</code> otherwise). "/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="then" eType="#//Command" |
| containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Branch being executed when <code>input</code> matches the object specified in <code>condition</code>"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Switch" eSuperTypes="#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Reads object from input pipe or <code>input</code> parameter and executes a <code>case</code> part with matching <code>condition</code> parameter (if any) sending <code>input</code> parameter as an input. If no <code>case</code> matched, the <code>default<code> block (if any) will be executed."/> |
| <details key="returns" value="An output of executed block (<code>case</code> command or <code>-default</code> block). If nothing is executed, no output will be produced."/> |
| <details key="example" value="list 1 2 3 | get 0 | switch [case 1 {
	echo "Found 1"
}] [case 2 {
	echo "Found 2"
}] - default {
	echo "Unknown item"
} | equals "Found 1" | verify-true"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="input" unique="false" lowerBound="1" |
| eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="The input object to match."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="items" lowerBound="1" upperBound="-1" |
| eType="#//Case" containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="One or more <code>case</code> blocks. Block with a condition matching the input will be executed."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="default" eType="#//Command" |
| containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Optional parameter. The block which will be executed in case no <code>case</code> block is executed."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| </ecore:EPackage> |