|Previous Index Next How To Use|
The editor contains a few structural tools that help you make the code structure more clear and to help you gain a better oversight of the structure.
These tools are:
Code Folding example, click to expand
"Code Folding" is the ability of being able to collapse blocks of code or multi-line comments. If you hover with your mouse cursor over a collapsed block, it will display a hint window with the code inside it.
By collapsing blocks of code, you can make the editor more clear for yourself, so you can concentrate on the relevant code at hand.
These blocks can be BEGIN..END blocks, LOOP blocks or other kind of code blocks, including whole sub-routines.
When a block is collapsed, the line numbering will be cut as well to reflect the original numbers of the lines.
Another tool to help you make sense of the code are "block staples".
Whenever a code block is available, the editor will draw a colored "staple" for it, clearly showing you the beginning of the block and end of the block.
Block Staples, two IF..THEN blocks, click to expand
In the above screen shot, you can see two IF..THEN..END IF blocks and the outer BEGIN..END block. As you can see, two staples are drawn for the IF..THEN blocks, to make the blocks stand out for the user.
Besides "current line" highlighting and matching parenthesis highlighting, there is more.
There is "dynamic current block boundaries highlighting", using the same block boundaries as the block staples, but it will highlight the current block of its type only.
Dynamic Block Highlighting, click to expand
In the above example, two blocks are highlighted: the outer BEGIN..END block and the IF..END IF block in which the caret resides. If you would move the caret outside the inner IF..END IF block, the outer IF..END IF block would become highlighted. This clearly shows your current block boundaries.
In addition to block highlighting, there's the "dynamic current routine highlighting". The current sub-routine is slightly highlighted with a greyish background, as you can see above. This is available for sub-routines and in the Package Editor only.