|
Intellectual ControlDifferent tools, from the auto substitution of names and tips of functions to bookmarks and hotkeys, are implemented in MetaEditor for the convenient development of programs. These means allow to quicken up the process of the source code writing, conveniently navigate through it and avoid mistakes. The following functions are described in this section:
Auto Substitution of Function NamesIt is the possibility of viewing the list of variants of names of built in and user functions, constants, variables, members of classes, keywords, etc. The variants of substitution are determined by the first typed symbols. Opening of this list is performed automatically when writing the source code. In order to manually open this list one should use the "
Further it is only left to choose the necessary variant using the "Arrow Up" and "Arrow Down" keys and then press the "Enter" key. The choice can be made using the mouse as well. If one continues to type the letters of the function name, the list of possible variants of substitution will get shorter. Information about ParametersThis feature allows viewing parameters of a chosen function and their types. In order to open this information one should execute the "
Let's consider the displayed information in the example shown in the screenshot above:
Go To DefinitionThis function allows to automatically move to the declaration or definition of the selected function or variable. If the definition or declaration is in another file, then this file will be opened and the mouse cursor will be moved to the corresponding position. This function also allows to move to the include files (#include). In order to go to definition one should place the cursor at a parameter and execute the " List of FunctionsThis feature allows to open the list of all declared functions in the current file. In order to open the list one should execute the "
The parameters that were specified for the functions are shown in brackets. By clicking with the left mouse button or using the "Enter" key one can go to the definition of the selected function in the file. Each type of the function has its own icon in the list:
Comments InsertingDifferent commands for working with comments in the source code are implemented in the "Edit" menu and in the "Standard" toolbar:
The execution of the "
If the "
Working with BookmarksBookmarks are intended for denoting necessary lines in the source code for further convenient navigation through them. The commands for working with bookmarks are located in the "Bookmarks" submenu of the "Edit" menu, in the "Standard" toolbar and in the context menu of the text. There are the following commands for working with them in MetaEditor:
Go To LineTo quickly go to a line in the code of the current file, one can use the "
The range of lines containing code in the file is specified in the window. To go to a line, one should indicate its number and press the "OK" button. SnippetsTo make writing of a code easier, MetaEditor includes a possibility of inserting snippets — small template fragments of code that describes a structure element of the MQL5 language. To insert a snippet you should type a special keyword. As soon as you do it, the cursor will change to For example, to insert a class declaration, type the keyword "class" and press the "Tab" key:
As soon as you do it, the keyword will be replaced with a class declaration. To switch between the active fields of a snippet (in this case? they are the name, constructor and destructor of a class), use the "Tab" and "Shift+Tab" keys. If you change an active field, the other fields of the snippet will be changed automatically. For example, if you change the class name, the names of the constructor and destructor will be changed automatically; if you change a variable name in one of the expressions of a "for" operator, the names of variables in its other expressions will also be changed. The system of working with snippets recognizes structures, classes, enumerations, methods and functions if your press the "Ctrl+Enter" key combination. At that the cursor must be within description of the corresponding structural element. As soon as that combination is pressed, the user will be able to move between members (for classes, structures and enumerations) and arguments (for methods and functions) using the "Tab" and "Shift+Tab" keys as well as to edit them together as described above. At this moment, the following snippets are supported:
Resources InsertingTo make using of resource files in developed applications easier, the " Once this command is executed, the standard dialog window of your operating system appears. In it you should select one or several resource files to be declared in the file.
Once the above actions are performed, the corresponding directives will be added to the beginning of the file. For example:
The path to resource files can be specified in two ways:
|
MetaTrader 5 — a complex trading platform for providing brokerage services on the retail Forex market.
Copyright 2000-2012, MetaQuotes Software Corp.





