Difference between revisions of "OtfOtlEditor"

From emotive
Jump to navigation Jump to search
Line 18: Line 18:
 
{{ImageStyleCenter|OtfOtlCodeEditor.png|1000|OTL code editor}}
 
{{ImageStyleCenter|OtfOtlCodeEditor.png|1000|OTL code editor}}
  
<!--The OTL has the similar structure of an OTX document.-->
+
=== OTX VS OTL ===
 +
The OTL has the similar structure of an OTX document. It has 3 main sections as follows: a document info section, a global element section and some procedure (local) sections.
 +
 
 +
==== Document information section ====
 +
 
 +
This section lies at the header of the OTL code above the '''namespace''' code block. It displays almost information of the document tag in the OTX code.
 +
 
 +
==== Global element section ====
 +
 
 +
This section lies within the '''namespace''' code block and above the '''procedure''' code blocks. It contains the Imports, Validities, Signatures and GlobalDeclarations sub-sections.
 +
 
 +
==== Procedure (local) section ====
  
=== OTX VS OTL ===
+
This section lies within the '''namespace''' code block and under the global elements section. It contains the LocalDeclarations and the Flow sub-sections.
The OTL has the similar structure of an OTX document. It has a document info section, a global element section and some procedure (local) sections.
 
  
 
=== Line Numbers ===
 
=== Line Numbers ===
Line 33: Line 43:
 
To collapse (hide) a code block, you can click on the box [-] at the beginning of that block. To expand (show) a collapse block, you can click on the box [+] or double clicking on the [...] of that block. You can also collapse or expand all the code blocks by using the right click menu of the OTL editor or using the key shortcuts (Collapse All: 'CTRL + SHIFT + E' and Expand All: 'CTRL + E').
 
To collapse (hide) a code block, you can click on the box [-] at the beginning of that block. To expand (show) a collapse block, you can click on the box [+] or double clicking on the [...] of that block. You can also collapse or expand all the code blocks by using the right click menu of the OTL editor or using the key shortcuts (Collapse All: 'CTRL + SHIFT + E' and Expand All: 'CTRL + E').
  
 +
=== Context menus ===
  
 
+
Below are the context menus and their descriptions according to their positions from top to bottom.
 +
<!--
 +
{|{{TableHeader}}
 +
{{TableRowContextMenuHeader}}
 +
|-{{TableRow1}}
 +
|'''Cut''' || style="width:750px;" | Cuts the activity or the selected activities.
 +
|-{{TableRow2}}
 +
|'''Copy''' || style="width:750px;" | Copies the activity or the selected activities.
 +
|-{{TableRow1}}
 +
|'''Delete''' || style="width:750px;" | Deletes the activity or the selected activities.
 +
|-{{TableRow2}}
 +
|'''Paste''' || style="width:750px;" | Pastes the copied or cut activity (or selected activities) below the current activity.
 +
|-{{TableRow1}}
 +
|'''Add Comment''' || style="width:750px;" | Adds a new comment and links the comment to the current activity.
 +
|-{{TableRow2}}
 +
|'''Surround With >> Group''' || style="width:750px;" | Creates a new Group activity to surround the current activity or the selected activities (i.e. the activities will be moved into the new Group activity).
 +
|-{{TableRow1}}
 +
|'''Surround With >> Handler''' || style="width:750px;" | Creates a new Handler activity to surround the current activity or the selected activities (i.e. the activities will be moved into the Try-branch of new Handler activity).
 +
|-{{TableRow2}}
 +
|'''Surround With >> MutexGroup''' || style="width:750px;" | Creates a new MutexGroup activity to surround the current activity or the selected activities (i.e. the activities will be moved into the new MutexGroup activity).
 +
|-{{TableRow1}}
 +
|'''Extract Procedure''' || style="width:750px;" | Extracts the activity or the selected activities into a new procedure and creates a new ProcedureCall to call the new procedure.
 +
|-{{TableRow2}}
 +
|'''Disable/Enable''' || style="width:750px;" | Disables/Enables the activity or the selected activities. Note that the disabled activities will not be executed and all the errors and warning related to these activities will not be displayed except the check rule [[Core.Validation.CoreChk011|Core-Chk011]].
 +
|-{{TableRow1}}
 +
|'''New Local Variable ...''' || style="width:750px;" | Adds a new local variable to the current procedure.
 +
|-{{TableRow2}}
 +
|'''Remove/Add Realisation''' || style="width:750px;" | Removes/Adds realisation in the current activity. Note that you can only add realisation to some certain activities (EmptyBranch, EmptyParallel, EmptyHandler, Group, EmptyGroup, EmptyMutexGroup).
 +
|-{{TableRow1}}
 +
|'''Toogle Breakpoint''' || style="width:750px;" | Adds/Removes break point to/from the current activity.
 +
|}
 +
-->
 
|}
 
|}

Revision as of 07:03, 28 November 2018

UNDER DEVELOPMENT...

Overview

For professional users it is much more efficient to create and edit OTX in a code editor, especially for big OTX projects. EMOTIVE has developed OTL - Open Test Language. OTL is a Java-like scripting language for the OTX. Designer and code editor synchronize continuously. This allows to seamlessly switch between the two ways of working. The code editor has powerful syntax highlighting and auto complete features.

To open an OTX document in the OTL editor, you can right click on the document node (or a procedure node in that document) and select the 'View code (OTL)' menu, or you can select the document node (or a procedure node in that document) and press 'F7' key.

...

The structure and features of the OTL code editor are described in the following sections.

OTL Editor Features

OtfOtlCodeEditor.png
OTL code editor

OTX VS OTL

The OTL has the similar structure of an OTX document. It has 3 main sections as follows: a document info section, a global element section and some procedure (local) sections.

Document information section

This section lies at the header of the OTL code above the namespace code block. It displays almost information of the document tag in the OTX code.

Global element section

This section lies within the namespace code block and above the procedure code blocks. It contains the Imports, Validities, Signatures and GlobalDeclarations sub-sections.

Procedure (local) section

This section lies within the namespace code block and under the global elements section. It contains the LocalDeclarations and the Flow sub-sections.

Line Numbers

With line numbers, you can trace your OTL code easily. Line numbers aren't added to your code; they're just for reference. To show or hide the line numbers, you can use the right click menu of the OTL editor and select the 'Show line numbers' menu. You can also switch the current view of the editor to a particular line number with the right click menu 'Go to line' or with the key shortcut 'CTRL + G'.

Collapsable Code Block

The OTL support users folding the code block to manage large amounts of code while viewing only those subsections in needed time. If a block is unfolded, the folding toggle box [-] indicates the beginning of the region while the line extending below the square box indicates the extent of the code region, the line ends with an edge '∟' which marks the end of the block. For folded blocks, the toggle box is shown as [+] with the [...].

To collapse (hide) a code block, you can click on the box [-] at the beginning of that block. To expand (show) a collapse block, you can click on the box [+] or double clicking on the [...] of that block. You can also collapse or expand all the code blocks by using the right click menu of the OTL editor or using the key shortcuts (Collapse All: 'CTRL + SHIFT + E' and Expand All: 'CTRL + E').

Context menus

Below are the context menus and their descriptions according to their positions from top to bottom.