Code Editor Assistance(4.3)

In the code area the code is color coded according to type, for easier identification. When you right-click in the code area, a context sensitive popup menu appears. Here you can access the most common coding actions. Code completion provides proposals when requested to help you write code.

In addition, to make it easier to navigate in the code, there is an Outline navigation panel to the right of the code area. These features are described below.

Syntax Highlighting

The text is color coded according to the following definitions:

Brown  - Strings

Blue  - Functions

Green  - Types

Purple  - Keywords

Orange - Comments

Hint!

To refresh the text press Ctrl+Shift+L.

Right-Click Menu

The right-click menu has the following options:

Text Editor right-click menu

Option

Description

Font Size

Sets the font size.

Cut

Moves the selected text to the clipboard.

You can also press the CTRL+X keys to perform this action.

Copy

Copies the selected text to the clipboard.

You can also press the CTRL+C keys to perform this action.

Paste

Pastes the contents of the clipboard into the place where the insertion point has been set.

You can also press the CTRL+V keys to perform this action.

Select All

Selects all the text.

You can also press the CTRL+A keys to perform this action.

Undo

Undoes your last action.

You can also press the CTRL+Z keys to perform this action.

Redo

Redoes the last action that you undid with Undo.

You can also press the CTRL+Y keys to perform this action.

Find/Replace...

Displays a dialog where chosen text may be searched for and, optionally, replaced.

You can also press the CTRL+H keys to perform this action.

Quick Find

Searches the code for the highlighted text.

You can also press the CTRL+F keys to perform this action.

Find Again

Repeats the search for the last text entered in the Find/Replace dialog.

You can also press the CTRL+G keys to perform this action.

Go to Line...

Opens the Go to Line dialog where you can enter which line in the code you want to go to. Click OK to be redirected to the entered line.

You can also press the CTRL+L keys to perform this action.

Toggle Line Numbers

Adds or removes the line numbering.

You can also press the CTRL+F2 keys to perform this action.

Show Definition

If you right click on a function in the code that has been defined somewhere else and select this option, you will be redirected to where the function has been defined.

If the function has been defined within the same configuration, you will simply jump to the line where the function is defined. If the function has been defined in another configuration, the configuration will be opened and you will jump directly to the line where the function has been defined.

You can also click on a function and press the CTRL+F3 keys to perform this action.

Note!

If you have references to an external function with the same name as a function within the current code, some problems may occur. The Show Definition option will point to the function within the current code, while the external function is the one that will be called during workflow execution. 

UDR Assistance...

Opens the UDR Internal Format Browser from which the UDR Fields may be inserted into the code area.

You can also press the CTRL+U keys to perform this action.

Import...

Imports the contents from an external text file into the editor. Note that the file must reside on the host where the client is running.

Export...

Exports the current contents into a new file, for instance, to allow editing in another text editor or use in another  system.

Code Completion

Performs code completion on the current line. For more information about Code Completion, see the section below, Code Completion.

You can also press the CTRL+SPACE keys to perform this action.

Jump to Pair

Moves the cursor to the matching parenthesis or bracket.

You can also press the CTRL+SHIFT+P keys to perform this action.

Toggle Comments

Adds or removes comment characters at the beginning of the current line or selection.

You can also press the CTRL+3 keys to perform this action.

Surround With

Adds a code template that surrounds the current line or selection:

for Loop (CTRL+ALT+F)
while Loop ( CTRL+ALT+W )
Debug Expression ( CTRL+ALT+D )
if Condition ( CTRL+ALT+I )
Block Comment ( CTRL+ALT+B )

Code Completion

To make coding easier, the Code Completion feature provides you with context-sensitive functions and their respective syntax.

To access Code Completion, place the cursor where you want to add code, press CTRL+SPACE and select the correct function. In order to reduce the number of hits, type the initial characters of the function you are looking for. The characters to the left of the cursor will be used as a filter.

Code Completion covers:

  • Classes
  • Functions
  • Variables
  • Modules
  • Fields
  • Function blocks such as initialize
  • Installed UDR formats and user defined UDR formats
  • Keywords
  • Code snippets
  • Documentation