Macro Engine has the capability to record changes in a model. It uses opaque objects to generate macros and record them. This capability is especially useful when you want to redo some of your repetitive tasks.
The following is a list of actions that you can record:
- Creating UML, Stereotype, and DSL elements
- Creating relationships between UML, Stereotype, or DSL elements
You cannot move the element defined as a record scope during recording.
To record a macro
- Click Tools > Macros > Record Macro on the main menu. The Record Macro dialog opens.
- Select a macro language in the Language box (you will see the default macro language that you have previously selected (see Selecting a Default Macro Language).
- Select the
- Click to start recording.
- Work with the model in the scope you have defined.
- Click
- Click either or .
- If you do not open a project, the menu Tools > Macros > Record Macro will be disabled.
- You can select a record scope only before you start recording
- You cannot change a record scope during recording.
- If you do not define a record scope, the model Data will become the record scope.
- If you click the button, the Record Macro dialog will be closed.
- If you click the button, it will be changed to and the button will enabled.
- You cannot alter the Language, , or Model Scope options after you click the button.
- If you click the button, the recording will pause and the button will be changed to .
- If you click the
- the recording will continue
- the button will be changed to
button, the following things will happen: - The recording mechanism of Macro Engine can generate code for Beanshell, Groovy, Javascript (Nashorn and Rhino), and Jython. However, to ensure the best performance experience, it is strongly suggested that you use the recommended language (Groovy).