Text Editor

You can use any text editor for editing Art files, but it's highly recommended to edit them in Code RealTime. Thereby you will have access to features such as syntax coloring, content assist and semantic validation.

Syntax Coloring

Code RealTime provides color themes that have been specifically designed for being used for editing Art files. Activate one of these color themes from File - Preferences - Color Theme.

Content Assist

This feature, which also is known as IntelliSense or Code Completion, helps you when editing an Art file by proposing commonly used Art constructs that are valid at the current cursor position. Invoke Content Assist by pressing Ctrl+Space. Depending on where the cursor is placed you will get different proposals to choose from. There are four kinds of proposals as shown in the picture below:

Note that code templates are also available in some C++ code snippets (e.g. rt::decl and rt::impl) and can help you insert pieces of C++ code that are commonly used in Art applications.

MyTransition: State -> X on timer.timeout

Use in Code Snippets

If you use Content Assist within a C++ code snippet, Code RealTime will delegate the request to the C++ language server extension that is installed. It works by computing valid completions from the cursor position based on the generated C++ file that contains the code from the code snippet.

Note that the "Microsoft C++" and "clangd" language servers work slightly differently in this regard. It can happen that you in some cases need to invoke Content Assist twice, before the correct results appear. This has to do with how the language servers keep cached information from C++ files, and will hopefully improve in future versions.

Hint

The "clangd" language server supports an argument --completion-parse=always which you can add in its settings. It's recommended to set this argument, since it will force the generated C++ file to be parsed each time Content Assist is invoked, without relying on cached information.

Renaming Elements

To rename an Art element place the cursor on the element's name and press F2 (or invoke the command Rename Symbol from the context menu). This performs a "rename refactoring" that updates all references to the renamed element too.

Note

Avoid renaming an element by simply editing its name. For Code RealTime to understand that you want to rename an element, rather than replacing it with another element, you need to use the approach described above.