Difference between revisions of "OtfOtlEditor"

From emotive
Jump to navigation Jump to search
Line 7: Line 7:
  
 
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.  
 
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.
 
The structure and features of the OTL code editor are described in the following sections.
Line 23: Line 21:
 
==== Document information section ====
 
==== 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.
+
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. It is not recommended to make changes with this section, excepts for the 'Version' which can be also edited in the properties window of the document.
  
 
==== Global element section ====
 
==== Global element section ====

Revision as of 06:07, 28 December 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. It is not recommended to make changes with this section, excepts for the 'Version' which can be also edited in the properties window of the document.

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.

Context menu entry                       Keyboard shortcut     Description
Rename (CTRL + R) Renames the current declaration (allows update all references) which right is at the cursor (before, after or contains the cursor).
Reformat document (CTRL + N) Deletes all the redundant spaces in each line (not deleting the empty lines).
Generate document new (CTRL + SHIFT + N) Reloads the OTL at the last valid OTL code.
New local variable (CTRL + L) Opens dialog to create new local variable and input the new variable at the cursor.
Copy (CTRL + C) Copies all the highlighted text (1) or the current lineTooltip.png (if no text is highlighted) (2).
Cut (CTRL + X) Cuts all the highlighted text (1) or the current lineTooltip.png (if no text is highlighted) (2).
Paste (CTRL + V) Pastes the copied/cut highlighted text (1) at the cursor or the copied/cut line (2) in a new line above the current lineTooltip.png.
Comment (CTRL + K) Comments all the lines with highlighted text or the current lineTooltip.png (if no text is highlighted).
Collapse all outlines (CTRL + SHIFT + E) Collapses all the collapsable blocks.
Expanse all outlines (CTRL + E) Expanses all the collapsable blocks.
Go to line (CTRL + G) Shows a dialog to input a particular number line to move view to.
Show line numbers Displays the line numbers (checked) or not (unchecked).
Display Procedure in designerExclamation.png (F7) Deletes the current row/column.