LSPS documentation logo
LSPS Documentation
Writing Expressions

Properties of items in Definition and Configuration files, such as, initial values of variables, assignments of process elements, Form elements in the Expression component, etc. are defined as expressions in the Expression Language. The expressions are evaluated on runtime.

When editing expressions, you can use the following features:

  • Content Assistant (auto-complete): displays possible values including available data types, language constructs variables, function calls, etc. To display Content Assist, press CTRL + space.
    autoComplete.png
    Content Assist menu
  • Hyperlinking to definitions: opens the definition of the item usage in an expression

    To go to the definition of an item, press CTRL + left-click.

    openingDefinition.png
    Link to definition

Testing Expressions

You can test expressions in the Expression Evaluator REPL view.

By default, the view is not displayed: To display it, go to Window > Show View > Other and in the displayed dialog search for the view.

In the view, you can enter expression and have the system return the resulting value: write an expression and click Evaluate or press CTRL + Enter (Enter will make a new line in your expression).

Note that you can list the history of expression by pressing the arrow-up key and display auto-completion options by pressing CTRL + Space. The view does not support calls to library resources, such as functions.

REPL.png
To erase the context data you created with your expressions in the view, click the clear button.

If you want to test your expressions in a context of a model instance and use resources of libraries, use the Expression Evaluator view.