-
Notifications
You must be signed in to change notification settings - Fork 3
Feature Editor
Luca Gherardi edited this page Dec 10, 2013
·
2 revisions
The Feature Model Editor allows the design of Feature Models
In order to create a new Feature Model:
- Right click on the model folder of your VARP project.
- Select the item Feature Diagram
The wizard will open the Feature Diagram editor (the picture below depicts a diagram designed with the editor).

The palette on the right provides the tools for inserting new features, containments and connecting them:
-
Feature: this tool can be used for inserting a new feature.
- Name
- Required: true if the feature is mandatory, else if it is optional.
- Root: true only for the concept feature.
- Lower Bound: the minimum number of times that the feature that can be present in an instance.
- Upper Bound: the maximum number of times that the feature can be present in an instance.
-
Containment Association: this tool can be used for defining a containment relationship.
- Lower Bound: the minimum number of sub-features that have to be present in an instance.
- Upper Bound: the maximum number of sub-features that have to be present in an instance.
-
Simple Attribute
- Name
- Type: the type of the attribute (e.g. int, string, ...)
- Value: the attribute default value
- Connection: this tool can be used for connecting features, containment associations and attributes. A feature or a containment association can be connected with a parent only if the parent is already connected to its own parent (except for the root feature).
The Feature Diagram Editor provides a view for defining constraints on the feature selection. This view is depicted below.

The view is organized in three columns:
- The first one reports the name of the constraint
- The second one reports the rule
- The last one reports the current status of the constraint (satisfied or not) when an instance has been loaded (see the Feature Selector)
On the top right corner there are the buttons that allows the creation, deletion and modification of the constraints.
- The "plus" button can be used for creating a new constraint.
- The "X" button can be used for removing the constraint currently selected in the view.
- The "folder" button can be used for modifying the constraint currently selected in the view.
Constraint creation and modification can be executed by means of the dialog reported below.

Constraints are defined in the form A rules B
- A and B can be features or logical composition of features (AND, OR, XOR and NOT are the available operators)
- Rules can be requires or excludes (see the Feature Models page for more information)