1.3. Quick Start

To get a quick start on developing your own scripts, you can follow these steps:

  1. Enable the optional script development support by navigating to Window > Preferences > Scripting and select Enable script development support.

  2. Use F5 or Refresh to refresh the browser view.

    A folder "config" appears with a folder inside called "scripts".

  3. Create a sample script named "sample.js" that includes the following code.

    alert("Hello World"); 
    console.log("User welcomed at {0}", new Date().toUTCString());

  4. To add "sample.js" to the "scripts" folder, right-click "scripts" and select New > External document.... Browse to the file and click Open.

  5. You can now use the Execute menu on any of the nodes in a project to execute the script on the selection or Execute Script directly on the script file.

All of the examples in the documentation can be run similarly. Note that in the following topics, JavaScript is used as the example language although other languages, such as OCL, are supported as well. Features that are only available in certain languages are noted as such.