Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

...

The figure below shows the ESL script editor window. Each script opens in its own tab.

Script editorImage RemovedImage Added


1Toolbar.
2The current action of the debugging process.
3
The breakpoint is set for debugging purpose Image Modified.
4The source text of the script - individual actions that form the script.
5
The part of the script editor that contains the following displaying:
  • Compile - errors that occurred during the compilation (syntactic, semantic check),
  • Debug - debugging logs,
  • Notations - comments existing in the script,
  • Watch - values of local variables
  • Evaluate - expression evaluation
To resize this part and the area for editing the script text point the mouse cursor to the margin between the parts and when the mouse cursor changes its shape to Image Modified, then press the left mouse button and drag the border (left mouse button has to be still pressed) to the desired position.

Clicking on the tab the following popup menu occurs:

Script editor - popup menuImage Removed

  • Tabs on the top - if the option is checked, the tabs occur at the top, otherwise, the tabs are at the bottom.
  • Move right - moves the tab one position to the right.
  • Move left - moves the tab one position to the left.
  • New window - opens the tab in a separate window.
  • Close tab - closes the tab over which the popup menu was displayed (Ctrl+W closes the current tab).
  • Show picture - opens the edited picture and minimizes the ESL script. The option is available only for the script of the active picture, for the script of the unavailable event.

Notes:

A title bar of the tab window and CNF (if the window is maximized) contain the name of the active tab. If the tab window is minimized or hidden and the new script is opened the tab window will be displayed again. The insertion point is on the area for editing the current tab.

6Status bar

Notes:

When the script editor is closed all the tabs will be closed and the window will hide.

...

  • script of the active picture (opened in D2000 GrEditor) does not display the question whether to save the script providing that there were made some changes (the script is occupied by the edited picture),
  • script of the event (opened in D2000 CNF or D2000 GrEditor) displays the question whether to save the script providing that there were made some changes

Keyboard shortcuts:

...

ESL editor features:

...

  • Automatic color differentiation of keywords: .
  • Automatic color differentiation of texts: correctly written: , incorrectly written: .
  • After a successful Syntax check:
    • Typing the symbol '^' after the name of an object of Structured variable type or after the name of a local variable of RECORD type shows the list of all structure columns with the column number and description. The columns are listed in alphabetical order.
      List of structure columnsImage RemovedImage Added
    • Pointing the mouse cursor to a local variable, or a structured variable item displays information about its type and the place where it is declared (in the debugging mode, the value of the variable is shown).
    • Right-mouse click above identifier (local variable, procedure name) opens the local popup menu containing the only item - Go to definition - after clicking the item the cursor is automatically moved to the declaration of the identifier.
  • After an unsuccessful Syntax check or Compilation, double-clicking an error from the lists of errors (5) moves the mouse cursor to where the error occurred. Another possibility for navigation between errors or warnings is by clicking on icon in upper right corner of editor, which is shown when there are some errors or warnings. Afte clicking on this icon line with error is shown with given description. Every other click on icon shows next error/warning.

Image Added

  • Pressing CTRL+F1 (help) when the cursor is pointed to the name of a function/action opens the help document for the given function/action/picture event.Automatic display of function description and types of parameters. If the user enters the function name and the first bracket in the script editor the window will appear where the function and its parameters are described. The parameter is highlighted in dark blue color when you proceed to the new parameter.
    Example:
    Function descriptionImage RemovedAutomatic display of action and its parameters. If the user enters the action name and presses the button SPACE the window with action's declarations will be shown in the editor.
    Examples:
    Description of actionImage Removed
    Description of actionImage Removed
    Description of actionImage RemovedWhen you write an object identifier (picture object identifier or system server event identifier) and the symbol "]" after it the list of RPC procedures and interface, defined for this object, will display. The selected definition of procedure or interface will be added to the script editor.
    Example:
    List of RPC procedures for objectImage RemovedWhen entering the symbol "^" after the interface name, the list of procedures, defined for this interface, displays. The selected definition of the procedure will be added to the script editor.
    Example:
    List of RPC procedures for interfaceImage RemovedView of RPC procedure description called in ESL script. This property allows writing the description
  • Quick navigation in a script using a minimap (code outline). To move quickly in the script, you can click and drag the gray part in the minimap to move the currently displayed part of the script in the editor. The minimap contains highlighted pieces of code, such as the line with the cursor position. In the case of a failed syntax check or compilation, error lines are highlighted here in red, or warning lines are highlighted in orange. After placing the cursor in the editor on a local variable or procedure, all occurrences of the given variable / procedure within the script are displayed in gray behind the slider.

Image Added

  • Automatic suggestions occurs under the following conditions:
    • After entering the "\" character after the object or variable, when a list of object attributes is displayed
    • After entering the character "^" if this character is located after an object of type structured variable or after a local variable of type RECORD
  • Autocompletion and suggestions in the editor after pressing the CTRL + SPACE keyboard shortcut. After pressing CTRL + SPACE again, it is possible to display a more detailed description (function - description of function, action - syntax for action, variables - description of variable, constants - description of constant). It is possible to navigate in the list of suggestions using the arrows, after pressing ENTER the given action, variable, function, constant or attribute will be added. Based on the conditions described below, it contains a list of proposals:
    • If there is a space in front of the cursor in the editor, actions, variables, functions, and constants are suggested
    • If the cursor is preceded by a text beginning with "%", the functions are suggested, and the list of suggestions is filtered based on the text after "%"
    • If the cursor is preceded by a text beginning with "_", the proposed variables (local, global, and schema variables in the case of a schema script) are filtered, and the list of suggestions is filtered based on the text before the cursor.
    • If the cursor is preceded by a text beginning with "@", constants are suggested, and the list of suggestions is filtered based on the text after "@"
    • If the cursor is preceded by a text beginning with a-zA-Z, action keywords are suggested
    • If the line starts with the keyword of the action, the current options will be displayed first in the list, followed by all the options for completion provided by the editor (variables, functions, constants).
    • If an object identifier (schema object or system event server identifier) ​​is specified for the CALL action, RPC procedures and interfaces that are defined for the object are proposed.

Image Added

Image Added

  • Automatic display of function parameters after entering the function name and the first parenthesis. The currently typed parameter is underlined and highlighted. The popup with the description of the function parameters can be displayed even after placing the cursor in the editor between the function parameters and pressing the keyboard shortcut CTRL + SHIFT + SPACE
    Image Added
  • After typing the "^" character after the interface name, a list of procedures that are defined for that interface is displayed. After selecting an item from the list, the procedure definition is added to the ESL Editor.

Image Added

  • Preview the definition or references of a local variable and procedure, without the need to change the position in the script. By activating, the nested editor is displayed in the desired position with the possibility of editing, while previewing references, it is possible to gradually switch between individual occurrences in the right part. This functionality is invoked via the popup menu Peek → Peek Definition (ALT + F12) or Peek → Peek References.

Image Added

  • Folding / unfolding parts of the script such as: procedure body, BEGIN-END, IF-ELSE, IF-ELSIF, IF-ENDIF, FOR-END_LOOP ... The icons for folding / unfolding are located to the right of the line number, while the icons for folding are shown only if we move the cursor over this part of the editor.

Image Added

  • of RPC procedures which is visible in a different script. The comments and parameters of the RPC procedure are shown in the ESL script. The description can consist of one or more rows, the empty row is not allowed. The declaration of the procedure has to follow the description (without the empty rows). The description starts with a character ";", like the comments.
    Example of description:
    Description of RPC procedureImage Removed
    Example of display:
    Display of RPC procedureImage Removed
    Kotva
    odsadenie
    odsadenie
    Automatic indentation
    When writing the ESL script and moving to the new line, the ESL editor automatically indents the current line (according to the first non-zero line) and move the cursor on the given position. The indent size is automatically detected from the current script, but can also be adjusted in the status bar (Figure area 6).

    Features of automatic indentation:
    1. When moving on the to a new line after the action (e.g. selected actions (eg RPC, PROCEDURE, PUBLIC, FOR, DO_LOOP, IF ...) in the ESL editor, the text is automatically indented by 2 characters to the right from the previous linethe defined size.
    2. When moving on the to a new line after the action (e.g. selected actions (eg END_LOOP, ENDIF ...) in the ESL editor, the text is automatically indented by 2 characters defined size to the left from of the previous line.
    3. When pressing Ctrl+iyou press CTRL + K and then CTRL + F, the selected highlighted text is formatted according to the previous settings. For this action is important the indentation properties. The indent of the first line within in the selected lines.
    The automatic indentation may be enabled/disabled in the dialog box Settings under the menu System.
    1. marked set of lines is decisive for this action.
    2. Pressing SHIFT + ALT + F will format the entire text
  • Basic keyboard Keyboard shortcuts:

    ShortcutAction
    F1Display the complete list of actions together with keyboard shortcuts
    CTRL+F1Display editor help, if the cursor is over the function name, help for the function is displayed


    CTRL+SPACEShow suggestions
    CTRL+SHIFT+SPACEShow quick info for procedure and function parameters


    CTRL+K
    Causes
    CTRL+CAdd a comment to the current line
    , or current selection of lines to be commented.
    CTRL+
    SHIFT
    K CTRL+
    KRemoves the comment of the current line, or the current selection of lines.
    UDelete a comment from the current line
    CTRL+/Add / remove a comment from the current line
    SHIFT+ALT+AAdd / remove a comment from the current selection


    CTRL+F2Rename all occurrences
    F2Rename a symbol within its validity


    CTRL+F
    Displays the dialog box to search or to replace a text in the script.
    Search in the script
    ENTERFind another occurrence
    SHIFT+ENTERFind the previous occurrence


    SHIFT+ALT+FFormat the entire script
    CTRL+K CTRL+FFormat the selected area


    CTRL+F12Go to definition
    CTRL+G
    Goes to the given line in the text.CTRL+iIndents the selected rows in the script. The indentation of the first row of the selected part of the script is decisive.
    Go to line
    ALT+F8Go to the next problem
    SHIFT+ALT+F8Go to the previous problem
    SHIFT+F12Go to references
    CTRL+SHIFT+OGo to symbol - displays the option to go to functions, variables, parameters defined in the script


    CTRL+SHIFT+F8Check script syntax
    CTRL+F8Compile the script
    CTRL+SCompile and save the script
    CTRL+SFor active picture script - saving the picture.
    For the script of an object of Event type - saving.
    CTRL+1Opens a list of D2000 system objects.
    CTRL+2Opens a list of predefined constants.
    CTRL+3Opens a list of functions.
    CTRL+4Opens a list of actions.
    CTRL+5Opens a list of local variables.
    CTRL+6Opens a list of value attributes of an object or local variable.
    CTRL+~The ESL script editor will complete automatically a written word according to the next suitable one (from cursor position) and later according to its type (function, constant, action, ...). To add other adequate words press the button repeatedly.CTRL+>Shows tooltip in ESL script editor even if the automatic tool tip is switched off.
    F2Save the script to the file
    F8Switch to debug mode


Popup menu

...

The popup menu containing these items can be displayed over the script source text (part 4 on the picture). Click by right mouse button or push the Menu key on the keyboard.

Image RemovedImage Added

  • Go to definitionDefinition - cursor is automatically moved to the declaration of the identifier. When using "Go to definition" on the remote procedure (RPC/PUBLIC), the ESL editor automatically opens the script, which contains the definition of procedure, and moves the cursor on the definition.
  • Go back - cursor is moved back to the place where "Go to definition" had been called from. It keeps the last 50 callbacks "Go to definition".
  • Go forward - cursor is moved to the place where it was before "Go back" calling. "Go back" and "Go forward" are supported even between the different ESL scripts. ESL editor automatically chooses/opens the ESL scripts
  • Tool tip - enables/disables displaying of a tool tip.
  • to References (SHIFT + F12) - a nested editor is displayed with the option to switch between the individual references of the local variable / procedure.
  • Go to Symbol... (CTRL + SHIFT + O) - a selection box with filtering of all symbols (local variables, procedure parameters, procedures) is displayed, after selecting the symbol and pressing the ENTER key the cursor is moved to the symbol definition.
  • Peek - here are two options:
    • Peek Definition (ALT + F12) - the nested editor is displayed at the position of the local variable / procedure definition.
    • Peek References - a nested editor is displayed with a reference to a local variable / procedure, with a list of individual references in the right part.
  • Rename Symbol (F2) - renames the name of the local and global variable defined in the script within its scope.
  • Change All Occurrences (CTRL + F2) - allows you to rename text within the whole script.
  • Format Document (SHIFT + ALT + F) - adjusts the formatting of the document, applying the currently set indentation.
  • Editor settings - displays the ESL editor settings dialog (font and colors)Fill missing procedures - adds the missing procedures (with an empty body) defined in ESL Interface which has been declared in the ESL script. If the menu opens by right-clicking over the declaration of the used ESL Interface, only its procedures will be added. Otherwise, the procedures of all ESL Interfaces declared in the ESL script will be added.
  • Show All Instances - shows the list of all running instances of the edited ESL script.
  • Editor Settings... - shows ESL editor settings dialog (fonts and colors).
  • Edit object - if the text under the mouse cursor is a valid object name, the option enables to open it for editing.Cut (CTRL + X) - copies the selected content to the clipboard and removes it from the editor,
  • Copy (CTRL + C) - copy selected text into copies the selected content to the clipboard,Cut
  • Paste (CTRL + XV) - delete selected text,Paste (CTRL+V) - paste selected text from the clipboard.pastes the contents of the clipboard.
  • Command Palette (F1) - displays all available actions in the editor

Colors in ESL script

...

For better orientation in the ESL script, the editor uses a different colouring scheme for each type of the individual text tokens. Default coloring parameters can be modified using the ESL editor settings dialog.

Image RemovedImage Added

ESL Editor within String detects the references to the dictionary. If some reference to a dictionary (key), which has not been defined yet, is identified, it will be colored as Error (see the dialog above).

...