Skip to content

ModelEditor.md

Andre Bossert edited this page Mar 18, 2017 · 1 revision

Feature Model Editor

Feature model editor allows to create feature model diagrams and their constraints.

Feature Modeling Perspective

It is recommended to switch to Feature Modeling Perspective which is available from Menu > Window > Open Perspective > Other. This perspective provides collection of standard views and their layout.

Creating New Feature Model

  1. Create an empty project inside your workspace from Menu > File > New Project... by selecting General/Project.
  2. Open New Feature Model Wizard from Menu > File > Other.. by selecting YAFMT > New Feature Model.
  3. Select parent project and name of the feature model file. Click Next to continue.
  4. Set properties of the feature model. Click Finish to complete the wizard.

New feature model wizard, page 1 New feature model wizard, page 2

The Editor Interface

The editor interface consists of 3 parts:

  1. Pallete.
  2. Editing area.
  3. Constraints editor.

Feature model editor

Using the Editor

Pallete

  • Select tool from the pallete by clicking on it.
  • Click on the editing area to create selected object.
  • Some objects can be also directly dragged from the pallete in the editing area.
  • Hold shift for repeated creation of objects.
  • Use the Left Arrow button to hide the pallete.
Tool Description
Mandatory feature. It can be created anywhere in the editing area.
Optional feature. It can be created anywhere in the editing area.
Attribute. It must be created in a feature.
Connection. Create connection by dragging from the parent feature to its child.

Editing Area

  • Click on an object to select it.
  • Double-click on an object to directly edit its name (or type in case it is an attribute).
  • Use toolbar or context menu to manipulate objects. Context menu can be opened by right-clicking on an object or the editing area.
  • Move objects by dragging them. This way you can change attribute position within a feature or move it into a different feature.
  • Drag borders of an object to resize it.
  • Drag start or end point of a connection to reconnect it.
  • Properties of selected objects can be also edited in the properties view.

Toolbar and Context Menu Actions

Icon Name Keyboard shortcut Description
Zoom In Ctrl++ Zooms in. You can also use mouse wheel together with Ctrl to zoom.
Zoom Out Ctrl+- Zooms out. You can also use mouse wheel together with Ctrl to zoom.
                           | Select All                    | *Ctrl+A*          | Selects all objects.

| Undo | Ctrl+Z | Undoes the last action. | Redo | Shift+Ctrl+Z | Re-does the last undone action. | Delete | Delete | Deletes selected objects. | Show Grid | | Enables snapping to grid. | Enable Snap to Geometry | | Enables snapping to geometry of other objects. | Set Optimal Size | | Sets optimal size for selected objects. | Apply Vertical Tree Layout | | Layouts all objects as vertically oriented tree. | Apply Horizontal Tree Layout | | Layouts all objects as horizontally oriented tree. | Make Feature Optional | Alt+O | Makes selected features optional. | Make Feature Mandatory | Alt+M | Makes selected features mandatory. | Generate ID from Name | | Generates ID of selected objects from their name. | Make XOR Group | Alt+X | Makes XOR group from selected features. | Make OR Group | Alt+G | Makes OR group from selected features. | Ungroup Features | Alt+U | Ungroups selected features. | Show Feature Model Visualizer | | Opens feature model visualizer view. | Show Properties | | Opens properties view for the selected object. | Export as Image | | Opens dialog window to export contents of the editing area as an image.

Editor objects

Object Visuals Description
Optional feature.
Mandatory feature.
Cloneable feature.
Feature which is not part of the main tree (orphan).
Feature with an attribute.
Feature with validation error. The tooltip of the Error icon contains error message. Validation errors are also displayed in the problems view.
Feature which is affected by a constraint.
XOR group.
OR group.
Generic group.

Constraints Editor

  • Double-click on the Add Icon Add New Constraint item to add new constraint.
  • Double-click on the existing constraint to edit it.
  • Use context menu to change constraint language or to delete selected constraint.
  • Properties of a selected constraint can be also edited in the properties view.
  • Use the Filter button to show only constrains affecting selected features.
  • Use the Right Arrow button to hide the constraints editor.
  • Some constraints languages (like BoolCL) support syntax highlighting and intelli-sense during editing. Press Ctrl+space to force intelli-sense.
  • Validation errors are displayed in the window status bar (bottom left part of the window).

Constrains Editor

Views

There are several views which can be used together with the main editor. The feature model visualizer view is described separately.

Properties View

  • Properties view displays properties of a selected object.
  • It can be opened from Menu > Window > Show View > Other.. by selecting General/Properties.
  • Click on the Value field to edit the value of a property.
  • Press ENTER to confirm the entered value.
  • Validation errors are displayed in the window status bar (bottom left part of the window).

Properties View

Problems View

  • Problems view displays all validation errors.
  • It can be opened from Menu > Window > Show View > Other.. by selecting General/Problems.
  • Double-click on an error to select corresponding invalid object in the main editor.
  • The same thing can be achieved by selecting Go to from context menu of an error item.

Problems View

Outline View

  • Outline view displays overview of the edited feauture model.
  • It can be opened from Menu > Window > Show View > Other.. by selecting General/Outline.
  • There are 2 tabs in the ouline.

Tree View Tab

  • Tree view tab displays tree structure of the edited feauture model.
  • Click on a tree item to select corresponding element in the main editor.

Outline View 1

Minimap Tab

  • Minimap tab displays editor contents at a smaller size.
  • Click on the minimap to move editor visible area.
  • When a constraint is selected in the editor, the affected features are highlighted

Outline View 1