Prev | Next |
Function Details
Code Editor Functions
Function |
Description |
See also |
---|---|---|
Syntax Highlighting |
The Code Editor highlights - in colored text - the standard code syntax of all language file formats supported by Enterprise Architect
You can define how the Code Editor implements syntax highlighting for each language, through the 'Code Editors' page of the 'Preferences' dialog. |
Languages Supported Options - Code Editors Editor Language Properties Language Options |
Bookmarks |
Bookmarks denote a line of interest in the document; you can toggle them on and off for a particular line by pressing . Additionally, you can press and to navigate to the next or previous bookmark in the document. To clear all bookmarks in the code file, press . |
|
Cursor History |
The Code Editor Control keeps a history of the previous 50 cursor positions; an entry in the history list is created when:
You can navigate to an earlier point in the cursor history by pressing , and to a later point by pressing . |
|
Brace Matching |
When you place the cursor over a brace or bracket, the Code Editor highlights its corresponding partner; you can then navigate to the matching brace by pressing .
|
|
Automatic Indentation |
For each supported language, the Code Editor adjusts the indentation of a new line according to the presence of control statements or scope block tokens in the lines leading up to the cursor position.
The levels of indent are indicated by pale horizontal lines. You can also manually indent selected lines and blocks of code by pressing Tab; to un-indent the selected code, press . |
|
Commenting Selections |
For languages that support comments, the Code Editor can comment entire selections of code. The Code Editor recognizes two types of commenting:
You can toggle comments on the current line or selection by pressing:
|
|
Scope Guides |
If the cursor is placed over an indentation marker, the Code Editor performs a 'look back' to find the line that started the scope at that indentation level; if the line is found and is currently on screen, it is highlighted in light blue.
Alternatively if the line is off screen, a calltip is displayed advising of the line number and contents:
|
|
Zooming |
You can zoom into and out of the contents of the Code Editor using:
Zoom can be restored to 100% using Ctrl+keypad /. |
|
Line Selection |
If you want to move the cursor to a specific line of code, press and, in response to the prompt, type in the line number. Press the ; the editor displays the specified line of code with the cursor at the left. |