Eclipse Workspace

The Reactive Blocks Perspective

Eclipse organizes the views, actions and menus in the workspace by different perspectives. After the installation, you can open the Reactive Blocks Perspective, which combines a number of useful views.

Here is how you open the perspective:

There are several important parts:

  1. The Blocks view, providing list of all building blocks, both the ones you create and those coming from libraries.
  2. The Package Explorer view, showing Java element hieararchy of Java projects in your workspace.
  3. The area for the Blocks Editor, the editor that shows a block specification.
  4. The Analysis window, showing the result of verifying a block. This view may be hidden. However, it will be opened automatically when you open or analyze a block.

Tips and Tricks

  • If you close views or mess up their layout, you can select Window → Reset Perspective to restore the perspective.
  • If you have your own preferences about the layout of your workspace, all you need is to open the Blocks view.

The Blocks Editor

Building blocks are created and edited in the Blocks editor, which combines several pages depending on the type of block.

Multiple Pages

The editor displays diagram on different pages. Note that not all pages are present in all types of building blocks.

  • The Behavior page shows an activity diagram that describes the detailed behavior.
  • The Contract page specifies the behavior of the block seen externally.
  • The Overview page summarizes information about the block, its instance parameter, included Java API and other resources.
  • The Documentation page is used to add descriptions to the block so others know how to use it.
  • The Pins page shows a list of pins available for a block. This page is only available for shallow and state machine blocks.
  • The State Machine page describes the behavior in a state machine form. This page is only available for state machine blocks.

Actions

All actions are chosen from the context menu (i.e., right-click on the behavior page). Individual page shows different menus, and the content of the menu also depends on the selected element.

Modeling Elements

Modeling elements are also provided from the context menu. Depending on the types of building blocks being created, elements that are not suitable are not shown.

Tips and Tricks

Grid

The editor has a grid that is shown when an element is moved. All nodes are aligned to the major grid (18 pixels). The bend-points of connections are aligned in-between the major grid. For that reason, nodes like fork, join, opeartion and event receptions should have a width or height of an uneven number of grid spaces.

Moving and Resizing Elements

You may move all nodes by dragging them or using the arrow keys. Some elements, such as operations, forks, joins, set and get variable actions, receptions and guards, can also be resized.

Orientation of Elements

The orientation of some nodes, like join, fork, input and output parameters, pins on operations and events, can be changed by pressing “r” (for rotate), as shown below.

To edit the pins on blocks, use “r” to switch the sides they are attached to, and the arrow keys to put them into place.

Connectors

Once selected, the tool to create control or object flows stays active until you press “r” or select another element. Hence, you can create several connections at once.

Layout Tricks

You can align the title bar of building blocks by a double click on it.

Copy, Paste and Duplicate

You can copy modeling elements and paste them in the same editor or other editor. If two elements that are connected by edges are selected, then the edges are also copied.

Duplicate is a dedicated action to copy and paste elements within the same building blocks. This action can be accessed via the context menu in the blocks editor.

Undo and Redo

You can undo actions (e.g., deleting an element by accident) up to the first action after saving. In addition to the usual key bindings, you can access undo and redo via the context menu. A short description is shown on the context menu.

Known issues:

  • Moving multiple elements at once (e.g., by dragging them) are counted as several actions. Hence, an undo action will only move an element to its original location.