Syntax Highlighting and Comments
Different language elements in the methods’ code are displayed using different styles. As an example, consider the following code snippet.
The code snippet include three styles:
Keywords (for, int, and so on) appear using a blue boldface font.
You can configure the syntax highlighting theme in the Preferences dialog box. Choose File>Preferences>Methods to see the preferences that are specific for methods. Under Syntax highlighting, the Theme list contains the following predefined themes: Same a desktop color theme is the default theme, which uses colors suitable for the desktop color theme. The Default, Dark, and Light options are the colors used by the default option but as explicit options to allow decoupling the syntax highlighting theme from the desktop color theme. Choose User defined to define a syntax highlighting mode where the colors can be assigned to individual parts of the code, such as keywords, numbers, strings, and language elements. Click the color chooser for each part of the code to choose a color from the color palette that opens. The Plain text setting determines the color of text that is not categorized as any of the other types, most notably it determines the color of punctuation. Click the Define Custom Colors button to add additional colors that are defined using RGB values.
Adding Comments
You can add comments to the code by preceding the comment by //. You can toggle comments on and off for a selected line using the shortcut Ctrl+7 or by right-clicking in the method window and choosing Toggle Comment.