Default Syntax Highlighting Colors; Autocomplete And Autosuggest - AMX NetLinx Studio Instruction Manual

Netlinx design v3.3 or higher
Table of Contents

Advertisement

Syntax Highlighting (Cont.)
Default Text

Default Syntax Highlighting Colors

The text in the Editor windows is syntax highlighted with color codes for increased readability with a default set of
colors that can be customized via the options in the Editor - Highlighting and Fonts tab of the Preferences dialog. Syntax
Highlighting assigns different colors to different types of data in your Source Code file.
Use chroma-coding to make your code easier to read and manage. For example, you could chroma-code all comments to
yellow, all identifiers to red and strings to blue to make them more easily identifiable in your code file.
The text elements that can be chroma-coded, and their default color assignments are listed in the Highlighting section of
the tab (FIG. 143).
FIG. 143
Preferences dialog (Editor - Highlighting and Fonts tab) - Highlighting options

AutoComplete and AutoSuggest

Use this feature to automatically complete the typing of many common and standard programming terms. When you
begin typing in the editor, a drop-down list of probable matches for the term you started typing is displayed.
Auto-Suggest suggests a single word if that word matches something that has already been typed.
Auto-Complete inserts the rest of the word to the right of the cursor when a suggestion is selected. Use the scroll bar to
scroll through the list (if necessary) and select the term or phrase that you want to insert at the cursor's position. Double-
click or press the Tab key (or Enter on your keyboard) to insert the selection.
In the example below, the user typed the character "D", and is selecting to insert the phrase "DEFINE_EVENT" into the
code. The selection always replaces the character(s) typed before the AutoComplete/AutoSuggest drop-down was
invoked (FIG. 144).
FIG. 144
Autocomplete and AutoSuggest example
AutoComplete/AutoSuggest is enabled by default. Enable or disable this feature by
toggling the Enable AutoComplete/AutoSuggest check box in the Editor - Display and
Indentions tab of the Preferences dialog.

Note that AutoComplete/AutoSuggest is case-sensitive. Typically section headings are capitalized and
commands are not.

Use the Edit > Rescan Current Source File option to rescan the active file and rebuild the symbol
information utilized by the AutoComplete/AutoSuggest feature.

With AutoComplete/AutoSuggest enabled, the program will suggest a name that has been previously
defined within the source code as you type in a variable name, device name or a reserved identifier,
NetLinx Studio - Instruction Manual
Any word that is not recognized as any of the above is syntax highlighted using the color
specified in Preferences > Editor - Highlighting and Fonts > Default Text.
Programming
81

Advertisement

Table of Contents
loading

Table of Contents