- Overview
- Highlighting selected elements
- Finding code
- Search in a selection
- Finding and accessing an event
- Selection in the code editor
- Selecting code lines
- Selection in rectangle
- Selection by level of blocks
- Handling one or more code lines
- Selecting code lines
- Moving code lines
- Duplicating code lines
- Reverse assignments
- Adding quotes/square brackets or brackets automatically
- Switching a text into uppercase/lowercase
- Description window of the current element from the code editor
- Moving procedures or methods
- Creating a procedure with the keyboard
Code editor: Various operations
The code editor is the editor where the developers spend most of their time. This help page presents the different options useful for the common operations: Highlighting selected elements In the code editor, whenever the cursor is positioned on an identifier (variable, procedure, data file, etc.), all uses of this identifier are highlighted in the current code. Similarly, if the mouse cursor is positioned on a block statement (IF, THEN, ELSE, FOR, END, LOOP, WHEN EXCEPTION ON, etc.), the different elements of this block are highlighted. Remark: When the secondary keywords (ELSE, END, etc.) are hovered by the mouse cursor, the associate condition is displayed in a tooltip. Finally, the current line can be easily identified via dots used to highlight the current line.
All these options can be modified if necessary. To modify the highlighting options: - Display the configuration window of code editor: on the "Home" pane, in the "Environment" group, expand "Options" and select "Options of the code editor".
- In the "Code" tab, select the following options if necessary:
- "Highlight the blocks of code (IF/THEN/END, brackets, ...)".
- "Highlight the current line".
- "Highlight the declaration and the uses of the variable".
- Validate.
Remark: All the colors used to highlight the elements can be configured in the "Coloring" tab of the configuration window of code editor. To find an element in the code editor, all you have to do is use the "Find/Replace" pane, enabled via Ctrl + F. To perform an immediate search on an element found in the code editor, all you have to do is press Ctrl F3 on an element of code editor (the "Find/Replace" pane being displayed). Pressing Ctrl + F3: - fills the search control with the word onto which the cursor is positioned.
- triggers the search.
- highlights in the code all the occurrences found and positions on the first occurrence.
The F3 and Shift + F3 keys allow you to navigate from an occurrence to another one via the keyboard. Search in a selection The code editor allows you to perform a search (and a replacement) in a selection. If a selection exceeding one line is active, the search is automatically performed in this selection. When performing a search in a selection, the searched word is highlighted in the code.
F3 and Shift + F3 allow you to go from one occurrence to another. Finding and accessing an event The code editor allows you to find and access an event of the current element: window, page, report, ... - On the "Code" pane, in the "Navigation" group, type the event you want to find. Remark: To automatically display the list of events, use Alt + C.
- Select the desired event in the list. It is automatically displayed in the code editor.
Selection in the code editor Selecting code lines To perform a simple selection: - A simple click positions the cursor.
- A double click selects the word.
- A triple click selects the line.
- A quadruple click selects the entire text.
During a selection in the code editor, the coloring of the code is kept. Selection in rectangle You have the ability to select a rectangular text area in the code editor (horizontal or vertical), then to paste it. To perform a selection in rectangle: - Position the cursor at the beginning of the area to select.
- Press the Alt key and keep it down.
- Press the left mouse button and select the desired area.
Then, the area can be copied via the popup menu.
Remark: When it is copied to a rectangular area, the copied text is also inserted in rectangle.
Selection by level of blocks You have the ability to perform a selection by level of code blocks. To perform a selection by level of blocks: - Position the cursor in the block to select.
- Press Ctrl + Alt + Up arrow to select the block found above the cursor. Repeat this operation as many times as necessary.
- Press Ctrl + Alt + Down arrow to deselect the block found above the cursor. Repeat this operation as many times as necessary.
Handling one or more code lines Selecting code lines - A simple click positions the cursor.
- A double click selects the word.
- A triple click selects the line.
- A quadruple click selects the entire text.
Moving code lines A selected area (one or more lines of code) can be moved directly using the key combination Alt + Up Arrow or Alt + Down Arrow. Duplicating code lines The duplication of code lines (Ctrl + D) operates on a single line or on a selection of code lines. Versions 24 and laterReverse assignments To reverse an assignment: - Select the code line that contains the assignment.
- Press Ctrl + Alt + Left Arrow or Right Arrow to reverse the assignment.
For example, the following code:
nx is int ny is int nx = ny
becomes
nx is int ny is int ny = nx
New in version 24Reverse assignments To reverse an assignment: - Select the code line that contains the assignment.
- Press Ctrl + Alt + Left Arrow or Right Arrow to reverse the assignment.
For example, the following code:
nx is int ny is int nx = ny
becomes
nx is int ny is int ny = nx
Reverse assignments To reverse an assignment: - Select the code line that contains the assignment.
- Press Ctrl + Alt + Left Arrow or Right Arrow to reverse the assignment.
For example, the following code:
nx is int ny is int nx = ny
becomes
nx is int ny is int ny = nx
Adding quotes/square brackets or brackets automatically To automatically add quotes, square brackets or brackets: - Select one or more words in the code editor.
- Press the quote, square bracket or bracket key.
- The selected text is automatically enclosed between 2 quotes, 2 square brackets or 2 brackets.
Switching a text into uppercase/lowercase To automatically switch a text found in the code editor into uppercase or lowercase characters: - Select one or more words in the code editor.
- Press the following key combination:
- Ctrl + M: to switch the selected text into lowercase.
- Ctrl + Shift + M: to switch the selected text into uppercase.
Description window of the current element from the code editor To display the description window of the element corresponding to the displayed code: - Position the cursor in the desired code.
- Press the following key combination: Alt + Enter.
Moving procedures or methods The procedures or the methods are displayed in their creation order by default.
To move a procedure or a method: - Position the cursor at the beginning of code to move.
- Select the procedure or method code: use the mouse or press Ctrl + A for example.
- Cut the procedure or method (Ctrl + X).
- Position the mouse cursor at the new position of procedure or method.
- Paste the procedure or method (Ctrl + V).
The procedure or method was moved. Creating a procedure with the keyboard To create a global procedure, you can: - use the project explorer.
- use the "Code" pane of code the editor ("New" button).
- type the prototype of the procedure to create at the end of an existing procedure.
To create a local procedure, you can: - use the "Project explorer" pane.
- use the "Code" pane of code the editor ("New" button).
- type the prototype of the procedure to create in the "Global declarations" event of the window or page.
For more details, see:
This page is also available for…
|
|
|