You may create more than one TC for transforming a particular model. One reason for doing so could be to build different variants, for example a debug and a release version, of the same application. Often the majority of all properties in such variant TCs are identical, and there are only a few properties which have different values. To avoid duplicating properties in multiple TCs you can arrange your TCs in an inheritance hierarchy, where common properties are placed in a base TC which the other TCs inherit from. You would not build that base TC. It only serves as a common place for properties that apply to all inherited TCs, unless they override them.
Here is an example of a TC “Specific” that inherits from a base TC called “Common”:
The inheritance can also be seen in the Project Explorer (if you have set the preference RealTime Development – Project Explorer – Show inherited transformation configurations):
Multiple inheritance of TCs is supported, i.e. a TC can have more than one parent TC.
When you change a property of a TC that inherits from another TC, the property will be marked in boldface. This shows that the property has been overridden in the inheriting TC. For example:
Note that the property may have a different or the same value in the inheriting TC as in the inherited TC. Boldface just shows that there is a value defined for the property in the inheriting TC.
There are also a few other visual indications of TC properties which are useful to know about. The picture below summarizes them:
There are several commands available in the TC editor which help you work with inherited properties. Commands that apply for a single property are located in the context menu of that property (right-click on the property label), while commands that apply for all properties in the TC are located in the toolbar menu in the TC editor.
Revert to Saved
Restore the property to what is stored in the TC file. Useful in case you made some changes (not yet saved) that you want to undo.
Delete Value
Remove the overridden value for the property, so that the value stored in the inherited TC is shown instead. After this the property will appear in italics instead of boldface to show that it no longer is overridden.
Revert All to Inherited Value
Reverts (i.e., deletes) overridden values for all properties in the TC.
Override
Overrides a property by storing the inherited value in the inheriting TC file. After this the property will appear in boldface to indicate that it now is overridden.
Override All
Overrides all properties in the TC.
Reinherit Identical Property Overrides Deletes the values for all properties that are overridden but have the same value as in the inherited TC.
Navigate to Inherited Value
Navigates to the inherited value for a TC property in a super TC. This command can be useful in order to find out from where a certain TC property gets its value (in case there are multiple super TCs).
Navigate to Source Code Shows where the property is assigned its value in the Code tab.
Navigate to Parent Transformation Configuration
Similar to "Navigate to Inherited Value" but works also for TC properties where the value is not inherited, but a default value defined in some parent (i.e. super) TC.
You can navigate to an inherited TC by double-clicking on an entry in the "Inherited transformation configurations" list. This, combined with the command "Show in Project Explorer" which also is available in the toolbar menu of the TC editor, makes it easy to navigate between model projects that are related by means of TC inheritance.