CodeSnippet Editor
Content assist
Press [Ctrl + Space] to start the content assist. With [Enter] a resource can then be selected.
Content assist paging
There are severel content assist pages.
- Page 1: Resources
- Page 2: Text tokens
- Page 3: Deprecated resources
Press [Ctrl + Space] to switch the pages.
Annotations
Annotations can be used to make comments within a code snippet. These are coloured accordingly and displayed in the Model-Inconsistoncy View.
Data type validation
UP provides the possibility of type validation within code snippets. The data types of variables are checked and it is ensured that no unsuitable data types are used when parameters are passed or assigned.
Activation of the data types validation
If it does not already exist, create a new resource of type ModelConfig. This contains the attribute 'datatypeValidation'. This can be used to activate the validation.
Check variable assignment and parameter passing
Allowed types for operations
Allowed types for operations
Type conversion
In the code snippet, typecasting can be used to cast explicitly from one type to another.