The text editor is the word processor of the Fusion for MySQL. When the text editor is used to edit text, it is referred to as the text editor. When it is used to edit SQL source code, which is its more common use, it is referred to as the code editor. You can open multiple code editors to view or/and edit code. A list of all documents opened for editing in instances of the code editor is available on the Windows menu.
On the Fusion menu, click New SQL. Alternatively, click the New SQL button on the Devart - Main toolbar.
Code pane
The area where code or text is displayed for editing. It provides SQL statement completion.
Indicator margin
A gray column on the left side of the code editor where indicators for breakpoints and bookmarks are displayed. Clicking this area sets a breakpoint on the adjacent line of code.
Selection margin
A column between the indicator margin and the editing window where you can click to select lines of code.
Horizontal and vertical scroll bars
Lets you scroll the code pane horizontally and vertically so that you can view the code that extends beyond the viewable edges of the pane.
You can quickly select a single word, line of text, or multiple paragraphs while you work with code in the editor. Keyboard shortcuts also let you select text starting from the cursor to any other point in your document.
To select text:
The Editor allows you to manipulate text in the same ways as most word processing applications or text editors. For example, you can:
There are various ways to move through text or code in the Code Editor using the mouse and navigation keys:
Use the Go to Line command to a specific line number:
You can use menu commands or keyboard shortcuts to convert the case of selected text to all upper case or to all lower case.
To switch text to upper case:
To convert text to all upper case, choose Make Uppercase, or press CTRL+SHIFT+U.
To convert text to all lower case, choose Make Lowercase, or press CTRL+U.
As the name suggests, bookmarking accelerate your code navigation in the text editor.
There may be some piece of code where you need to move to very frequently. Generally, you scroll the page and move to that section, but Fusion for MySQL provides great features by which you can move to a particular section very quickly using some shortcut keys. This is called Bookmarking of Code.
You can place a bookmark by clicking on the bookmark icon or use CTRL + B, CTRL + T.
To create or remove a bookmark using the Text Editor toolbar:
To move to a bookmarked line:
You can turn View White Space and Word Wrap modes on or off by selecting corresponding commands on the Advanced submenu of the Edit menu.
View White Space mode displays spaces and tab characters.
Word Wrap automatically displays any portion of a line that extends horizontally beyond the viewable editor area on the next line.
The Editor provides text indenting functionality. You can set the indent at some line, thus when you press ENTER, this indent is set at the next line. To change line indenting, use the Increase Line Indent and Decrease Line Indent options.
To increase or decrease indenting perform the following actions:
SQL Editor allows you to hide parts of code. Outlining marks are shown left of the code editor window. Code blocks which belong to the same structural item can be collapsed by using the minus (-) symbol. Outlined code is not deleted, it is merely hidden from view.
You can then expand the outlined statement or user-defined region by clicking the plus sign (+) next to the symbol.
The statement is outlined in the following cases:
Nested SQL statement (for example, SELECT in CREATE VIEW) is outlined only if it starts from the new line.
Statement is not outlined if it is very short and takes only one line of the code. Stored code condition and cycle operators are not outlined; the same is about nested BEGIN … END blocks.
You can outline code block using Regions.
To create the region, type the –region command at the start line of the region. No symbols except spaces are allowed at the same line before –region command. Region may have the name, so simply specify it after space at the same line. Each region statement has to be closed by the –endregion command. Type –endregion at the beginning of the line determining the region end.
You can create named regions using the **–region
SQL code block, grouped by the specified region can be collapsed/expanded by user. You can create nested regions to operate several SQL code blocks.