Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Otp |
---|
The Action Script Editor dialog opens.
Image Modified
Info | ||
---|---|---|
| ||
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 | |||||
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.
| |||||
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 | ||
---|---|---|
| ||
You can recognize an action using an action script by the <<ActionScript>> stereotype and the tagged value script (see entry |
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. |
Image Modified | Referencing an object or an object property (e.g. 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 |
Image Modified | If the cursor is after "array1C", the filter contains "array1C" and the Action Script editor offers only |
Image Modified | Referencing an array object node (e.g. |
Image Modified | Referencing an array element object (e.g. |
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 | ||
---|---|---|
| ||
|