Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 24.0

Otp

The Action Script Editor dialog opens.

Image Modified

Info
iconfalse

The xUML Action Language is case sensitive. Every statement must end with a semicolon. Operations, functions, and macros of the action language are displayed in blue.

Entering a First Action Script Statement

Image Modified

To create an action script statement, for instance a create assignment statement, start by typing the create keyword. After adding a space, all available object nodes of the action node are listed.

Image Modified

Add a semicolon to finish the statement.

Image Modified

Now try the set statement to assign a value to the property of the newly created object. The Action Script Editor automatically adds an equal sign (=).

Select the object output from the suggestion list by clicking it. Alternatively, use the up and down arrow keys and confirm a selection by pressing Enter.

Image Modified

After adding a dot, all properties and operations of the object are listed in the suggestion list.

Select the property content by clicking or use the keyboard.

Info
iconfalse

You can use the mouse or the keyboard to select an object, an operation, etc. from the list of suggestions provided by the Action Script Editor. You can also open this list manually by pressing Ctrl together with Space.

Image Modified

Move the cursor to the end of the line and force the suggestion list by pressing Ctrl + Space.

Image Modified

Finalize the statement by selecting the property content of object input and adding a semicolon.

Image Modified

The action script for creating an object and assigning a value to a property is complete.

Click OK to save the changes and close the editor.

Image Modified

Info
iconfalse

You can recognize an action using an action script by the <<ActionScript>> stereotype and the tagged value script (see entry {script="..."} in the picture above).

Overview on the Suggestion List Features

As shown in the example above, the Action Script Editor helps you by offering appropriate elements that can be used in the action script statement.

Image Modified

Writing a create statement (e.g. create output;, the Action Script Editor offers all output object nodes defined for the action node in the activity diagram.

Image Modified

Referencing an object or an object property (e.g. output or output.content), the Action Script Editor offers all properties and operations defined for the class when the cursor is immediately after the dot following the object name.

The Action Script Editor colors object properties in black, attributes of a complex type in blue, and operations in green.

Image Modified

Referencing the operations of an object, the Action Script Editor offers each operation with its corresponding parameters.

Image Modified

The suggestion list can be filtered by starting to type the initial letters of the operation. The filtering is case insensitive.

Forcing the Suggestion List

Forcing the suggestion list by pressing Ctrl + Space, the Action Script Editor offers a filtered list dependent on the position of the cursor within the object node name. The Action Script Editor offers only objects, properties and operations that match the filter.

For example, in an activity diagram with object nodes: array1, array1Count, and length:

Image Modified

If the cursor is placed before the string "array1Count", the filter is empty and the Action Script Editor offers all 3 object nodes.

Image Modified

If the cursor is after "arr", the filter contains "arr" and the Action Script editor offers only array1 and array1Count.

Image Modified

If the cursor is after "array1C", the filter contains "array1C" and the Action Script editor offers only array1Count.

Image Modified

Referencing an array object node (e.g. array1), the Action Script Editor only offers operations that are relevant for arrays.

Image Modified

Referencing an array element object (e.g. array1[0]), the Action Script Editor offers all attributes defined for the array element class.

Image Modified

Static operations of classes can be made available by use-dependencies. These use-dependencies are listed in pink in the suggestion list.

Image Modified

After selecting the use-dependency, add a colon to get a suggestion list of all operations that are available via this dependency.

Panel
titleOn this Page:
Table of Contents