EForms Oil Editor

From ERIKA WIKI
Revision as of 17:56, 11 January 2019 by Nicola (talk | contribs) (Radio)
Jump to: navigation, search

Short Description

The EForms Oil Editor is an alternative editor to modify oil files.

It is a graphical editor developed using Evidence EForms library.

Screenshots

Since RT-Druid is based on Eclipse, and Eclipse may run on multiple platforms, like Windows and Linux, so also RT-Druid may be used on multiple platforms. The actual “look and feel” of RT-Druid depends on the actual platforms where RT-Druid is running.

Where not explicitly expressed, all screenshots are taken using Windows 7.


Open EForms Oil Editor

To open an oil file using the EForms Oil Editor

  • select the file in Eclipse:

Select oil file.png

  • press the mouse right button
  • select “Open With -> EFORMS OIL”.

Eclipse open oil file with.png

Note, Eclipse uses the black dot to show the default editor used to open the selected file. Every time a different editor is chosen, Eclipse updates the default editor for that specific file.

The EForms Oil Editor is structured as multi-tab editor. Here is a screenshot of the default tab:
EForms Oil Editor Example.png


Default Editor

To set the default editor for all oil files

  • select the Preferences item in the window menu:

Eclipse preference menu.png

  • open the “File Associations” page. To easily find it, write file in the search box.
  • select the “*.oil” file type and choose the preferred default editor

Eclipse preference page file associatons.png


Undo-Redo

Every change done through the editor is stored (one history for each instance of editor), so it is always possible to undo an action or redo an “undone” action. Be aware that, once the editor is closed, this list of actions is lost.


Common widgets

Here is an alphabetic list of all available widgets.


Checkbox

A checkbox is used to enable/disable a simple feature, i.e. an option that does not have any sub-properties.
EForms oil checkbox.png
To switch between true-false values, just click on the square on the right of the property name.


Drop list

Using a drop list widget, it is possible to select on value over a list. Like the checkbox, the selected cannot have sub-values. To open the list, click on the widget.
EForms oil drop list closed.png
Then select the item
EForms oil drop list opened.png
Usually it is available also an “empty” value, to “unset” any value.

Warning:

sometimes, the mouse  wheel may change the chosen value. 
“If” and “when” it happens is strictly related to the OS and Window manager
where RT-Druid is running.
A common example is: the widget is selected, the mouse is over the widget.


Editor pages

The bottom part of the editor contains a list of editor pages, related to a specific aspect of the edited file. As example:

  • all tasks and their properties
  • the configuration of the OS

EForms oil editor pages.png

So, it’s enough to click on a the editor page name (OS, Arch, TASK…) to change the content of the editor and edit that part of the oil file.

Link

An editor page may contain an hyperlink to go directly to another page of the editor.
EForms oil links.png


List

A property may contain multiple values. There are two kind of items:

  • text, like a C flags
  • reference to an existing object, like a Resource or an Event.

In both cases:

  • the central part of the widget is dedicated to show all selected items. If there is not enough space to show all items, the scrolling bars will appear.
  • the right part contains two buttons: one button to add a new item, and one button to remove the selected item.

EForms oil list empty.png


To add a new item, press the “Add” button, then select the new item and write/choose the wanted value.

Text Example. Note that an empty text is replaced with a red “Please insert a value” sentence.
EForms oil links empty string.png


Warning:

on some linux installations, while editing the text, no cursor is shown.
Moreover, the text is update only after set the new value (for example,
pressing “Enter/Return” key).
The proposed solution is to upgrade gtk 3 to 3.22 (or newer).
For more details, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=533221.

References Example. The widget allows to add at most one reference for each referenced item. Clicking on the Add button, a new reference is added, and, by default, this reference points to the first not referenced item. Then, it is possible to change clicking on the right part of the text line and then select the item from the available list. Again, the proposed list contains the current element and all items that are not already referenced.
EForms oil links reference.png

Warning:

* if no object is present in the file, or if all available objects are already referred.
  As example, if there are no Resource object in oil file, it is not possible to add a reference.
* on some linux installations, while editing the value, the button on the right is not shown.
  Moreover, moving the mouse wheel do not produce any visible action, but the  text is update
  after selecting another widget.
  The proposed solution is to upgrade gtk 3 to 3.22 (or newer).
  For more details, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=533221.
  The following screenshot is done using ubuntu 18.4 LTS with gtk 3.22

EForms oil links reference gtk 322.png


List of complex objects

The oil file contains multiple objects that have a lot of properties. As example, Task and CPU. To handle them, the editor provides, on the left, a list of all objects and, on the right, shows all properties of the object selected in the list.

If all objects are of the same type (like task and resources), there are two buttons near the object list:

  • “Add” button to add a new object of the specific type (for example, a new Resource)
  • “Remove” button to remove the selected object

EForms oil list resources.png


If a list may contain multiple types of object, there is also a drop list widget to select the type to be added. An example is the list of CPU, where the actual type can be Avr8, Tricore and more (depending on the RT-Druid version)

EForms oil list cpu.png
EForms oil list cpu select.png


Radio

The radio button allows to select one of a specific list of values. These elements can be structured, i.e. each element may have one or more sub-properties, that are enabled for editing only if their “container” is selected.
EForms oil radio.png

Warning:

changing the selected item, will cause the loss of the value of all sub-properties

Section

Sections allows to organize properties. It is also possible to collapse a section to hide its content. To expand/collapse a section, click on its name; in the following example, we expand/collapse the Stask section.

Expanded: EForms oil section expanded.png

Collapse: EForms oil section collapsed.png

Table

The table widget allows to add/remove a list of objects with simple properties. An example is the Event, that has only a string to choose the bit mask associated to the event. The Add button creates a new object, while the Remove button removes the selected object. To edit a value (included the object name), just click the cell and edit it.
EForms oil table.png


Warning:

on some linux installations, while editing the text, no cursor is shown.
Moreover, the text is update only after set the new value (for example, pressing “Enter/Return” key).
The proposed solution is to upgrade gtk 3 to 3.22 (or newer).
For more details, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=533221.

Text value

The text widget shows the value of a text property and allows the user to change that value.
EForms oil text.png


Save

Every time the editor is saved, the oil file is stored as a text file, written using the oil syntax.

Warning:

the save action replaces the content of the file and may cause the loss of comments.
It also may change indentation and the order elements in the oil file.


Validation

Currently, the editor provides no validation.