|
RightEdge - The Ultimate Backtesting and Trading System Development Platform Using the Code Editor |
|
The Code and Text editor is the word processor of the integrated development environment (IDE). When it is used to edit text, it is referred to as the Text Editor. When used to edit source code in a development language, its most common use, it is referred to as the Code Editor. You can open multiple Code Editors to view the code in different files, and copy and paste among them. A list of all documents opened for editing in instances of the Code Editor is available in the Windows menu. Select the topics below to get relevant information quickly.
Code Window Components Code Pane The area where code or text is displayed for editing. It provides statement completion for the C# language. Indicator Margin A gray column on the left side of the Code Editor where indicators such as bookmarks are displayed. Selection Margin A column between the Indicator Margin and the editing window where you can click to select lines of code. Changes to code are tracked here when you select the Mark Modifications option from the Edit menu. Horizontal and Vertical Scroll Bars Allows you to scroll the Code Pane horizontally and vertically so that you can view the code that extends beyond the viewable edges of the Code Pane. Editing Text The editor provides the customary functionality of a text editor or word processor. The procedures to select, copy and paste text and code are familiar and consistent. The editor also provides automatic statement completion in C#, syntax checking, keyword colorization, and other services. There are various ways to move through text or code in the Code Editor using the mouse and navigation keys:
Cut, Copy and Paste As mentioned previously, the procedures to perform cut, copy and paste operations are standard. Click on the selection margin with the left mouse button and drag the mouse up or down. Selected text should now be highlighted in gray. Copy text by selecting Copy from the Edit menu. Cut the text by selecting Cut from the Edit menu. Pasting will remove the selected contents and paste what the text that is currently available on the clipboard. Find and Replace The code editor features an extremely powerful find and replace capability. Find operations support these options:
To invoke a simple find, select the Find item from the Edit menu.
When text is typed into the Find what text area, the Find Next button will enable. The Find dialog will stay on top of the code editor and highlight any text that is found. Use the Close button to dismiss the Find dialog. Editor Features Fonts and Colors This fonts and colors in the code editor are customizable. The Options screen contains a listing of colors and fonts to choose. Syntax Highlighting RightEdge recognizes language elements for C# and Visual Basic and highlights those language elements accordingly. Use the Options dialog to set the colors of each individual language element. Bookmarks You can mark lines in your code files with bookmarks. Bookmarks are a way to quickly navigate to previously marked lines of code. To set a bookmark, select the Bookmarks menu item from the Edit menu, followed by the Toggle Bookmark item. Bookmarks are shown in the indicator margin as a blue rectangle. Outlining Outlining is used to visually organize sections of code. To the right of the indicator and just left of the source code, a tree line with an expand and collapse control is displayed. To collapse a section of code, click the "minus" symbol. A collapsed region can be identified by an ellipsis (...) in the editable region. Click the "plus" symbol to expand this region. Statement Completion (C# Only) Statement completion is enabled as code is typed into the code editor. Specific language elements will automatically trigger the proposed completion path. This allows you to keep your context, find the information you need, and insert language elements directly into your code.
Line Numbering You can turn line numbering on and off in the Options dialog box. To jump to a particular line, choose Goto Line on the Edit menu or press CTRL+G.
Coding Problem Indicators (C# Only) As you enter and compile code in the Code Editor, wavy lines appear beneath code that is incorrect or could cause a problem. These are sometimes called "squigglies."
Code Snippets
The editor supports Visual Studio style code snippets. RightEdge ships with code snippets for performing common tasks. These definitions are installed in the Application Data\Snippets folder. Snippets can be created by adding snippet definitions to the corresponding folders.
To use a code snippet, begin typing the shortcut within the editor window. For example, to create a class definition, start by typing the word 'class' onto an empty line followed by the tab key. The code will be autogenerated and allow you to define your class name.
See the Code Snippets topic for detailed information about using and creating code snippets. |