| <?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="operations" nsURI="http://www.eclipse.org/ecl/operations.ecore" |
| nsPrefix="org.eclipse.rcptt.ecl.core"> |
| <eClassifiers xsi:type="ecore:EClass" name="Eq" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Compares arguments on equality"/> |
| <details key="returns" value="<code>true</code> when args are equal, <code>false</code> otherwise."/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="left" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Left argument"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="right" 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="Right argument"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Int" eSuperTypes="#//Convert"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Converts its argument to int."/> |
| <details key="returns" value="Returns integer value or fails if value cannot be converted. <code>true</code> is converted to <code>1</code> and <code>false</code> is converted to <code>0</code>."/> |
| <details key="example" value="//verifies that the number of Stops it less then 3
get-view "Execution View" | get-label -after [get-label "Stops:"] | get-text | int | lt 3 | verify-true"/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Long" eSuperTypes="#//Convert"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Converts its argument to long."/> |
| <details key="returns" value="Returns long value or fails if value cannot be converted. <code>true</code> is converted to <code>1L</code> and <code>false</code> is converted to <code>0L</code>."/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Float" eSuperTypes="#//Convert"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Converts its argument to float."/> |
| <details key="returns" value="<p>Returns float value or fails if value cannot be converted. <code>true</code> is converted to <code>1.0</code> and <code>false</code> is converted to <code>0</code>. This command uses <code>java.lang.Float.parseFloat</code> method, but also supports a few additional text values for infinity:</p>
<ul>
 <li><b>+inf</b> &ndash; returns <code>Float.POSITIVE_INFINITY</code></li>
 <li><b>inf</b> &ndash; returns <code>Float.POSITIVE_INFINITY</code></li>
 <li><b>-inf</b> &ndash; returns <code>Float.NEGATIVE_INFINITY</code></li>
</ul>"/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Bool" eSuperTypes="#//Convert"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Converts its argument to boolean."/> |
| <details key="returns" value="Returns boolean value or fails if value cannot be converted. "/> |
| <details key="example" value="bool true | assert-true
bool 1 | assert-true"/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Str" eSuperTypes="#//Convert"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Converts its argument to string."/> |
| <details key="returns" value="Returns string value or fails if value cannot be converted. "/> |
| <details key="example" value="//Types "2" into log
div 10 5 | str | log"/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Convert" abstract="true" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/internal"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="input" 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="Argument to be converted."/> |
| </eAnnotations> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="AssertTrue" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="If input is not true, fails"/> |
| <details key="returns" value="Nothing"/> |
| <details key="example" value="...get-tree | get-item Project | get-property childCount -raw | gt 3 | assert-true -message "Child count is not greater then 3!" "/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="input" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Input value. Must be true."/> |
| </eAnnotations> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="message" 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="Message to fail with when input is not true"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Length" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Returns count of objects got from input pipe"/> |
| <details key="returns" value="Object count"/> |
| <details key="example" value="emit 1 2 3 | length | equals 3 | verify-true

// verifies that Project item has 10 children
get-view "Q7 Explorer" | get-tree | get-item Project | get-items | length | equals 10 | verify-true"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="input" upperBound="-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="List of objects to get the length for"/> |
| </eAnnotations> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="NotEq" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Compares arguments are different"/> |
| <details key="returns" value="<code>false</code> when args are equal, <code>true</code> otherwise."/> |
| <details key="example" value=" int 9 | not-eq 10 | verify-true"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="left" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Left argument"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="right" 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="Right argument"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Gt" eSuperTypes="#//BinaryOp"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Compares arguments on to one be greater then another"/> |
| <details key="returns" value="<code>true</code> when left are greater then right, <code>false</code> otherwise."/> |
| <details key="example" value="plus 6 4 | gt 8 | verify-true"/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Lt" eSuperTypes="#//BinaryOp"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Compares arguments one are less then another"/> |
| <details key="returns" value="<code>true</code> when left is less then right, <code>false</code> otherwise."/> |
| <details key="example" value="plus 6 4 | lt 12 | verify-true"/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Not" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Return !value"/> |
| <details key="returns" value="<code>true</code> when value is false, <code>false</code> otherwise."/> |
| <details key="example" value="minus 10 7 | equals 2 | not | verify-true"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="left" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Left argument"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Try" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Try to execute command, retry times with delay if command are failed.
Execute catch if all operations is not succesfull. Execute finally in anyway."/> |
| <details key="returns" value="return's -command output if command is successed."/> |
| <details key="example" value="try -times 10 -delay 100 -command {
	// some ECL scripts
}"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="command" eType="ecore:EClass ../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="catch" eType="ecore:EClass ../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="finally" eType="ecore:EClass ../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="times" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EIntegerObject" |
| defaultValueLiteral="1"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="delay" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EIntegerObject" |
| defaultValueLiteral="0"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="noScreenshot" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean" |
| defaultValueLiteral="false"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Format" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Writes a formatted string to output pipe"/> |
| <details key="returns" value="Formatted string"/> |
| <details key="example" value="format "string: %s, int: %d" "foo" 5 | log"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="format" 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="Format string as in Java's <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Formatter.html">String.format</a>"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="args" unique="false" upperBound="-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="Arguments for format string"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Emit" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Writes its arguments into output pipe. "/> |
| <details key="returns" value="List of arguments"/> |
| <details key="example" value="emit "hello" "world" | foreach { log }"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="values" unique="false" |
| upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="RepeatWith" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Takes list of commands from input pipe and single command as argument and executes them in following order: 
<pre>
command-from-input-1 | command-from-arg
command-from-input-2 | command-from-arg
...
</pre>"/> |
| <details key="returns" value="Aggregated output of command from argument"/> |
| <details key="example" value="// executes commands:
// echo 1 | gt 2
// echo 2 | gt 2
// echo 3 | gt 2
// output: false, false, true
emit { echo 1} { echo 2} { echo 3} | repeat-with { gt 2 } "/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="commands" unique="false" |
| upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="command" eType="ecore:EClass ../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Repeat" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Execute specified command multiple times."/> |
| <details key="returns" value="Aggregated command output"/> |
| <details key="example" value="//creates file0, file1, file2, file3, file4 

repeat [val index] -times 5 -command {

	get-view "Q7 Explorer" | get-tree | select "Project/Folder" | get-menu "New/Other..." | click
	with [get-window New] {
 		get-tree | select "General/File"
 		get-button "Next >" | click
	}
	with [get-window "New File"] {
 		get-editbox -after [get-label "File name:"] | set-text [concat "file" [$index | str]]
 		get-button Finish | click
	}
}"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="index" eType="ecore:EClass ../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Val" |
| containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Optional value declaration to hold a current index"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="times" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt" |
| defaultValueLiteral="1"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="command" eType="ecore:EClass ../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="delay" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt" |
| defaultValueLiteral="0"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="AssertEmpty" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Asserts that input pipe doesn't contain anything"/> |
| <details key="returns" value="Nothing"/> |
| <details key="example" value="find-in-workspace -path "Project/nonexisting.file" | assert-empty"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="message" 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="Message to fail with when input is not empty"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="AssertNonEmpty" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Asserts that input pipe contain something"/> |
| <details key="returns" value="Nothing"/> |
| <details key="example" value="find-in-workspace -path "Project/.*" | assert-non-empty"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="message" 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="Message to fail with when input is empty"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Concat" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Concatenates strings passed as arguments"/> |
| <details key="returns" value="Concatenated string value"/> |
| <details key="example" value="concat "Mess" "age" | equals "Message" | assert-true"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="strs" unique="false" upperBound="-1" |
| eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Or" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Computes the result of logical Or operation for passed arguments."/> |
| <details key="returns" value="<code>true</code> or <code>false</code>."/> |
| <details key="example" value="with [get-view "Q7 Explorer" | get-tree] {
 if [or[get-item Project | get-property caption -raw | eq Project][get-property itemCount -raw | eq 1]] {
 log -message "One of two verifications passed"
 }
}"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="args" unique="false" lowerBound="2" |
| upperBound="-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="Arguments to compute on."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="And" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Computes the result of logical And operation for passed arguments."/> |
| <details key="returns" value="<code>true</code> or <code>false</code>."/> |
| <details key="example" value="with [get-view "Q7 Explorer" | get-tree] {
 if [and[get-item Project | get-property caption -raw | eq Project][get-property itemCount -raw | eq 1]] {
 log -message "Both verifications passed"
 }
}"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="args" unique="false" lowerBound="2" |
| upperBound="-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="Arguments to compute on."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="GetTime" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Returns current time as a number of milliseconds since January, 1, 1970."/> |
| <details key="returns" value="Current time as long integer"/> |
| <details key="example" value="get-time | format-time -format "hh:mm:ss" | log"/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="FormatTime" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Reads timestamp value (as a number of milliseconds since January, 1, 1970) from input pipe and formats according to given format string. Format string is the same as used in <code>java.text.SimpleDateFormat</code>."/> |
| <details key="returns" value="String representation of given time"/> |
| <details key="example" value="get-time | format-time -format "dd.MM.yyyy" | log
// writes current date, month and year into log"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="format" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="BinaryOp" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="left" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Left argument"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="right" unique="false" 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="Right argument"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Plus" eSuperTypes="#//BinaryOp"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="<p>returns <code>left + right</code></p>
<p>Before performing an operation, arguments are converted to the widest type according to the following rules:</p>
<ol>
 <li><code>string</code> arguments converted to <code>long</code></li>
 <li><code>boolean</code> arguments converted to <code>long</code> (1 for <code>true</code> and 0 for <code>false</code>)</li>
 <li>If one of arguments is <code>double</code>, converts the other one to <code>double</code></li>
 <li>If one of arguments is <code>float</code>, converts the other one to <code>float</code></li>
 <li>If one of arguments is <code>long</code>, converts the other one to <code>long</code></li>
 <li>Otherwise (in case of <code>byte</code>, <code>char</code>, or <code>short</code>) converts both arguments to <code>int</code></li>
</ol>
"/> |
| <details key="example" value="plus 10 3 | equals 13 | verify-true
int 8 | plus 2 | equals 10 | assert-true "8 + 2 not equals 10!""/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Minus" eSuperTypes="#//BinaryOp"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="<p>returns <code>left - right</code></p>
<p>Before performing an operation, arguments are converted to the widest type according to the following rules:</p>
<ol>
 <li><code>string</code> arguments converted to <code>long</code></li>
 <li><code>boolean</code> arguments converted to <code>long</code> (1 for <code>true</code> and 0 for <code>false</code>)</li>
 <li>If one of arguments is <code>double</code>, converts the other one to <code>double</code></li>
 <li>If one of arguments is <code>float</code>, converts the other one to <code>float</code></li>
 <li>If one of arguments is <code>long</code>, converts the other one to <code>long</code></li>
 <li>Otherwise (in case of <code>byte</code>, <code>char</code>, or <code>short</code>) converts both arguments to <code>int</code></li>
</ol>
"/> |
| <details key="example" value="minus 8 5 | equals 3 | verify-true"/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Div" eSuperTypes="#//BinaryOp"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="<p>returns <code>left / right</code></p>
<p>Before performing an operation, arguments are converted to the widest type according to the following rules:</p>
<ol>
 <li><code>string</code> arguments converted to <code>long</code></li>
 <li><code>boolean</code> arguments converted to <code>long</code> (1 for <code>true</code> and 0 for <code>false</code>)</li>
 <li>If one of arguments is <code>double</code>, converts the other one to <code>double</code></li>
 <li>If one of arguments is <code>float</code>, converts the other one to <code>float</code></li>
 <li>If one of arguments is <code>long</code>, converts the other one to <code>long</code></li>
 <li>Otherwise (in case of <code>byte</code>, <code>char</code>, or <code>short</code>) converts both arguments to <code>int</code></li>
</ol>
"/> |
| <details key="example" value="div 10 5 | equals 2 | assert-true -message "10/5 not equals 2!""/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Mult" eSuperTypes="#//BinaryOp"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="<p>returns <code>left * right</code></p>
<p>Before performing an operation, arguments are converted to the widest type according to the following rules:</p>
<ol>
 <li><code>string</code> arguments converted to <code>long</code></li>
 <li><code>boolean</code> arguments converted to <code>long</code> (1 for <code>true</code> and 0 for <code>false</code>)</li>
 <li>If one of arguments is <code>double</code>, converts the other one to <code>double</code></li>
 <li>If one of arguments is <code>float</code>, converts the other one to <code>float</code></li>
 <li>If one of arguments is <code>long</code>, converts the other one to <code>long</code></li>
 <li>Otherwise (in case of <code>byte</code>, <code>char</code>, or <code>short</code>) converts both arguments to <code>int</code></li>
</ol>
"/> |
| <details key="example" value="mult 5 7 | equals 35 | verify-true"/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Abs" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="<p>returns <code>java.lang.Math.abs(arg)</code></p>
<p>The return type of an operation is determined by the following rules:</p>
<ol>
 <li><code>string</code> arg is converted to <code>long</code></li>
 <li><code>boolean</code> arg is converted to <code>long</code> (1 for <code>true</code> and 0 for <code>false</code>)</li>
 <li><code>double</code>, <code>float</code>, <code>long</code> args retain its original type</li>
 <li>Otherwise (in case of <code>byte</code>, <code>char</code>, or <code>short</code>) the returned value has type <code>int</code></li>
</ol>
"/> |
| <details key="example" value=" emit "-10.6" | int | abs | str | log (writes 10 to log)"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="arg" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Mod" eSuperTypes="#//BinaryOp"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="<p>returns <code>left % right</code></p>
<p>Before performing an operation, arguments are converted to the widest type according to the following rules:</p>
<ol>
 <li><code>string</code> arguments converted to <code>long</code></li>
 <li><code>boolean</code> arguments converted to <code>long</code> (1 for <code>true</code> and 0 for <code>false</code>)</li>
 <li>If one of arguments is <code>double</code>, converts the other one to <code>double</code></li>
 <li>If one of arguments is <code>float</code>, converts the other one to <code>float</code></li>
 <li>If one of arguments is <code>long</code>, converts the other one to <code>long</code></li>
 <li>Otherwise (in case of <code>byte</code>, <code>char</code>, or <code>short</code>) converts both arguments to <code>int</code></li>
</ol>
"/> |
| <details key="example" value="mod 11 3 | equals 2 | verify-true"/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Between" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="<p>returns <code>true</code> if <code>input</code> is greater than or equal to <code>left</code> and less than or equal to <code>right</code></p>

<p>Before performing an operation, arguments are converted according to the following rules:</p>
<ol>
 <li><code>string</code> arguments converted to <code>long</code></li>
 <li><code>boolean</code> arguments converted to <code>long</code> (1 for <code>true</code> and 0 for <code>false</code>)</li>
 <li>If one of arguments is <code>double</code>, converts the other one to <code>double</code></li>
 <li>If one of arguments is <code>float</code>, converts the other one to <code>float</code></li>
 <li>If one of arguments is <code>long</code>, converts the other one to <code>long</code></li>
 <li>Otherwise (in case of <code>byte</code>, <code>char</code>, or <code>short</code>) converts both arguments to <code>int</code></li>
</ol>
"/> |
| <details key="example" value="int 10 | between 7 12 | verify-true"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="input" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="left" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="right" unique="false" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Entry" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Creates a new map entry. Can only be used as an argument for <a href="#map">map</a> command."/> |
| </eAnnotations> |
| <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="Map" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Creates a new map. Also see <a href="#get">get</a> command to find a value by key."/> |
| <details key="example" value="let [val myMap [map 
 [entry firstName "Ivan"]
 [entry lastName "Inozemtsev"]]] {
 log [format "%s %s" [$myMap | get firstName] [$myMap | get lastName]]
}"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="entries" upperBound="-1" |
| eType="#//Entry" containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="An arbitrary number of <a href="#entry">entries</a>."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="List" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Creates a new list. Also see <a href="#get">get</a> command to find an element by index."/> |
| <details key="example" value="list January Febuary March | get 1 | equals "Febuary" | verify-true"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="items" upperBound="-1" |
| eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject" |
| containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Loop" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Executes recursive looping of a body. Allows to emulate 'while' and 'for' loops while preserving variable immutability. The idea is taken from Clojure's <a href="http://clojure.org/functional_programming#Functional%20Programming--Recursive%20Looping">loop/recur</a> approach. Also see <a href="#recur">recur</a> command."/> |
| <details key="example" value="// Example 1. returns how many times a 81 is divisible by 3
loop [val count 0] [val n 81] {
 if [mod $n 3 | eq 0] {
 recur [$count | plus 1] [$n | div 3]
 } -else {
 log [format "The answer is %d" $count] //prints 'The answer is 4'
 }
}


// Example 2. deletes all elements from a tree
proc "get-my-tree" { get-view "My View" | get-tree }

proc "has-elements" {
 get-my-tree | get-property itemCount -raw | int | gt 0
}

loop {
 if [has-elements] {
 // Selects a first top-level item and invokes "Delete" from context menu
 get-my-tree | select ".*" | get-menu "Delete" | click
 // Confirms a removal in popup dialog
 get-window "Confirm Delete" | get-button OK | click
 // Continues execution from the beginning of loop body
 recur
 }
}"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="vals" upperBound="-1" eType="ecore:EClass ../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Val" |
| containment="true"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Valus which are going to be modified during iterations. All initial values must be set."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="body" eType="ecore:EClass ../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="A script to execute. Whenever script invokes <a href="#recur">recur</a> command, an execution jumps to the beginning of loop body script."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Recur" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Returns an execution to the beginning of <a href="#loop">loop</a> command. Cannot be used outside of a loop."/> |
| <details key="example" value="// calc and show a sum of ints from 3 to 10

loop [val result 0] [val i 3] {
 if [$i | eq 10] {
 show-alert [str [$result | plus $i]]
 } -else {
 recur [$result | plus $i] [$i | plus 1]
 }
}"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="values" upperBound="-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="A list of new values for variables, declared in <code>loop</code> command. Value count must exactly match to corresponding val count of a <code>loop</code> command."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="ToList" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Loads whole input pipe and returns a single EclList object, containing it."/> |
| <details key="example" value="emit 1 2 3 | to-list // same as list 1 2 3
emit 1 2 3 | to-list | to-list // same as list [list 1 2 3]"/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Each" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Iterates over <a href="#list">list</a> or <a href="#map">map</a>. Accepts one or two variable declarations, when only one variable given, it will be hold list elements or map values. A second variable, if provided, used for map keys or list element indices."/> |
| <details key="example" value="// Iterate over elements.
list 1 2 3 | each [val element] {
 log [format "%d" $element]
}

// Iterate over elements with indices
list 1 2 3 | each [val element] [val index] {
 log [format "list[%d] = %d" $index $element]
}

// Iterate over map values
map [entry "one" 1] [entry "two" 2] | each [val value] { log [str $value] }

// Iterate over map values with keys
map [entry "one" 1] [entry "two" 2] | each [val v] [val k] { log [concat $k " = " [str $v]] }"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="input" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Map or List"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="val" lowerBound="1" eType="ecore:EClass ../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Val" |
| containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="key" eType="ecore:EClass ../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Val" |
| containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="do" eType="ecore:EClass ../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command" |
| containment="true"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Split" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value=""/> |
| <details key="example" value="str "1, 2, 3, 4, 5" | split -sep "," -trimResults | foreach [val item]{
	$item | log
}
"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="str" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="sep" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="trimResults" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean" |
| defaultValueLiteral="false"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="omitEmptyStrings" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean" |
| defaultValueLiteral="false"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="ParseTime" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Reads a string from input pipe and parses it accoridng to a given format string."/> |
| <details key="returns" value="Timestamp value (as a number of milliseconds since January, 1, 1970)"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="input" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"> |
| <eAnnotations source="http://www.eclipse.org/ecl/input"/> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="String representation of date."/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="format" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="ThrowError" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command"> |
| <eAnnotations source="http://www.eclipse.org/ecl/docs"> |
| <details key="description" value="Fails with specified error message"/> |
| <details key="example" value="throw-error "Test Case has one or more failed verifications""/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="message" 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="Error message"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| </ecore:EPackage> |