Event-B XText Front-end

From Event-B
Revision as of 16:21, 4 November 2016 by Son (talk | contribs)
Jump to: navigation, search

Return to Rodin Plug-ins

a basic view of the XContext Editor on a context

The Event-B XText front-end provides text editors for XContexts and and XMachines which then compiled automatically to Event-B contexts and machines.

Please have a look also at the Event-B XText Front-end User Guide.

Current version

The Event-B XText front-end is available as a separate plug-in from the main Rodin update site (under the Editor category).


The component contents are displayed as text. Once you component opened with the Rodin Editor, its contents are printed as text inside the Rodin Editor. However, as said, the Rodin Editor is not a text editor, and even if the component you edit is streamlined to basic text, what you edit is stored in an underlying database. That's the reason why you can not type text at any place at any moment. (i.e. there is no parsing of text file: what you see is a text component based form editor).

There are two types of edition possible. Because Rodin manipulates Event-B elements and their attributes, the Rodin Editor provides two ways to modify Event-B models:

  • you can navigate through the model contents and do things on the Event-B elements (e.g. add/remove/move/etc.) with the right-click actions or the keyboard shortcuts, depending on where is your cursor, or what you selected,
  • you can edit the Event-B element's attributes by entering the "edition" mode provided by the overlay editor. This is detailed here-after.

An overlay editor displays over the text to edit element's attributes The basic idea is: "when I want to edit some contents, I should open the overlay editor that will allow me to modify its value".

Everything happens where I click, or where my text caret is. The caret position, also set when the user left-clicks in the editor, is the base for component modifications:

  • if you click an editable attribute, the overlay editor opens on it and you are able to modify the attribute. The same action is possible if you press "Backspace" if the caret is on an editable attribute,
  • if you click on non editable places of the editor, you just move the text caret to the pointed position.

Implicit elements are displayed in grayed colors. The elements that are implicit at the current level of edition are not editable, and displayed in grayed colors. (See the figure below)

RodinEditor basicView4.png

A basic overview

The Rodin Editor might not be the 'preferred' editor that Rodin uses to open your Event-B models.
Thus, to open a component (e.g. a machine, a context, etc.), right-click on it and select Open with > Rodin Editor.
The context component is then opened with the Rodin Editor.

RodinEditor basicView2.png

On the figure above, you see the context component.

  • The user is editing the axiom axm8 and we see that the text is black and the background is grayed. This is the actually the overlay editor, that is open to edit the predicate contained by the axiom axm8.
  • There are buttons in the left ruler to fold some elements.
  • The comments are preceeded by the character ' › ' to indicate where to click for edition.
  • The other attributes are inlined as grayed text.
    • Note that : some attributes have type boolean, thus change value on click, and some attributes are choice attributes thus display a list of clickable values (see the image below) on click.
Error creating thumbnail: Unable to save thumbnail to destination

For more details, please go to the Rodin Editor User Guide.