3. Using Relation Indexer

The Connector for Source Code Management enhances the Relations View with information about connections between pure::variants model elements and source code. Relations are added for features which are used in conditions of the ps:condxml and ps:condtext elements. For ps:flag and ps:flagfile elements the location of preprocessor constants in C/C++ source files are shown. In addition the locations of matching preprocessor constants are shown for a selected feature by using the mapping between feature unique names and preprocessor constants.

The relation indexer can be activated on a special project property page. Select the project and choose the Properties item in the context menu. In the upcoming dialog select the Relation Indexer page.


The relation indexer is activated for the project by selecting the Enable Relation Indexer option (1). After enabling the indexer there are some more options to define the project specific behavior. The indexing of pure::variants Conditions and C/C++ Preprocessor Constants can be activated separately (2). The list with file name patterns (3) is used to select the files for indexing. Only files which match one of the patterns are scanned. Add the "*" as pattern to scan all files of a project.

After activating the indexer for a project a builder is added to the project. This builder scans changed files for new relations to pure::variants model elements automatically.

With activated relation indexer the Relations View contains additional entries. These entries shows the name of the file and the line number of the variant point. The tool tip shows the appropriate section of the file. By double-clicking the entry the file will be opened into an editor.

To change the default behavior of the indexer open the Eclipse preferences and select the Relation Indexer page in the Variant Management category. The page shows two lists.


The upper list contains the default file patterns for the indexer (1). This list is the initial pattern setting for newly enabled projects.

The lower list contains the mapping between features and preprocessor constants (2). This mapping is used for all projects. Table 1, “Supported Mapping Replacements” shows all possible replacements.