In this section: |
The Options menu, invoked from the Options button on the toolbar, presents preferences that help you manage your code.
You can selectively turn these preferences off or on in a file, as shown in the following image.
Preferences include:
The Editor supports line numbering, which displays line numbers for each line you create in the Editor, including blank lines. The line numbers appear in the sidebar. This is useful when you need to refer to specific lines in a file.
You can selectively turn line numbering off or on from the Options menu on the toolbar. The default value is on.
The following image displays a WebFOCUS procedure, with line numbers in the sidebar, for each line of code.
The Editor supports code folding, which lets you selectively collapse and expand sections of code in a file you are currently editing. This is useful when you need to manage large amounts of code, and view only those subsections that are relevant.
You can selectively turn code folding off or on from the Options menu on the toolbar. The default value is on.
Code folding is supported in a FOCEXEC for WebFOCUS DEFINE, TABLE, GRAPH, Dialogue Manager, and inline Stylesheet code. It is also supported for JavaScript, CSS, HTML, and Python files. Code folding is not supported for SQL and R files.
The following image displays a WebFOCUS procedure, with the code-folding toggle icons included in the sidebar (lines 1, 14, 15, 23, 26, and 27).
To collapse the DEFINE statement, click the code-folding toggle icon on the DEFINE FILE command line (line 1). Note that lines 1 through 14 are collapsed, as shown in the following image.
To collapse the inline StyleSheet code, click the code-folding toggle icon on the ON TABLE SET STYLE command line (line 23). Note that lines 23 through 26 are collapsed, as shown in the following image.
To collapse the TABLE request, click the code-folding toggle icon on the TABLE FILE command line (line 15). Note that lines 15 through 27 are collapsed, as shown in the following image.
The following procedure shows the code folding icons on comment lines (lines 1 and 3) and Dialogue Manager commands (lines 4 and 6).
To collapse the comment lines, click the code folding icon on line 1. Note that lines 1 through 3 are collapsed, as shown in the following image.
To collapse the Dialogue Manager commands, click the code folding icon on line 4. Note that lines 4 through 6 are collapsed, as shown in the following image.
How to: |
Autocomplete is a function that allows progressive suggestion of code as you type.
You can selectively turn Autocomplete off or on from the Options menu on the toolbar. The default value is on.
When typing code, a list of suggestions will display below the text, in alphabetical order. You can use the up and down arrow keys to navigate to the desired value and press Enter to select the value.
The suggestion list displays one of the following labels, on the right of each suggestion:
Note: In the following example, the variables COG_US and CITY_NAME are not WebFOCUS keywords, they are local to the syntax. On the second attempt or later attempt to type the letter C, both variables display as local, as shown in the following image.
Autocomplete is available for FOCEXEC, HTML, JavaScript, CSS, and Python files. Autocomplete is not supported for SQL, R, STY, and TXT files.
Note that the command GRAPH is suggested, as shown in the following image.
Note also that GRAPH is a WebFOCUS keyword.
Note that the command FILE is suggested, as shown in the following image.
Note: Autocomplete is not supported for Master Files.
Note that the command PRINT is suggested, as shown in the following image.
The Status bar displays contextual information for a open file at the bottom of the Editor.
You can selectively turn the status bar off or on from the Options menu on the toolbar. The default value is on.
Note: The Status bar is global for the Editor environment. If you uncheck the Status Bar option in one tab, this is applied to all open tabs, including any new tabs you create in the Editor.
The following values display in the Status bar:
The following image shows an example of values displayed in the Status bar.
Indent guides are useful in helping you understand the structure of code by showing indentation levels and to quickly find where a block of code starts and ends.
You can selectively turn indent lines off or on from the Options menu on the toolbar. The default value is on.
Clicking the Tab key inserts a 4-space indent. The indent guides are represented by vertical light gray lines, as shown in the following image.