The DML Editor (DaVinci Modeling Language Editor) can be used to textually model AUTOSAR objects by using the DaVinci Modeling Language (DML).
Open DML Editor | <CTRL> + <SHIFT> + <D>, <D> |
Limitations
- The DML Editor will not display sub-packages. If there are any sub-packages below the opened package, an info icon is displayed.
- The DML Editor cannot display AUTOSAR root objects.
- The DML Editor can only display objects that have a short name.
- It is currently not supported to write C++/Java like comments for the modeled objects.
Open Editor
Prerequisites:
- The selected object is not an AUTOSAR root object.
- The selected object has a short name.
- Open the AUTOSAR Model Explorer
- Select a package or an object below a package in the AUTOSAR Model Explorer.
- Open the context menu of the selected element and click
Open in DML Editor.
- The DML Editor opens in a new tab of the Project Frame.
Functions
Code Completion
To create valid content, the DML Editor supports code completion via the key combination <Ctrl>+<Space>.
We recommend using code completion as much as possible to avoid erroneous configurations as well as to speed up writing DML text.
The code completions are case-sensitive and support CamelCase notation (e.g. opening the code completion inside an element's list of an AUTOSAR Package and typing 'SSID' directly selects the SOME/IP Service Interface Deployment).
If there is only one proposal available, this proposal is inserted automatically. Most of the proposals are templates which provide the appropriate DML syntax and can be stepped through with <Tab>. The template proposals can be identified by the icon .
Hover
All objects in the DML Editor can be hovered over to get more information about this object.
Show in
All named objects and references in the DML Editor support the Show in function.
To use this functionality, press and hold <Ctrl> while hovering over the shortname or reference. A menu opens in which you can select the destination where the object or reference can be shown.
Filtering
To hide contents which are not of interest while editing the DML text, you can use filters.
Use Filter
- Open the context menu of the corresponding feature,
- click Code Actions | DML Filter and select the required option:
- Hide {feature} of {object} to filter this feature only for this object.
- Hide {feature} of all objects to filter this feature generally for all objects.
- The context menu Code Actions | DML Filter of objects shows a list of all features of this object and which of them are currently filtered in the DML text.
Remove a Filter
- Either use the context menu of the object or
- open the menu path Window | Preferences | DaVinci Adaptive | DaVinci Modeling Language and remove the corresponding filter from the list of active filters.
Toggle Generic / Comfort Representation
For objects where a Comfort Representation is available, you can switch to the Generic Representation.
Toggle Representation
Prerequisites:
- The Editor Status must be
valid.
- Click on comfort / generic in the DML Editor.
- The generic / comfort representation is displayed.
Editor Status
The synchronization status of the DML Editor content is indicated by an icon in the upper left corner of the DML editor.
Valid: The content of the DML Editor is in sync.
Synchronizing: The content of the DML Editor is currently being synchronized.
Invalid: The content of the DML Editor is not in sync (due to invalid configuration).
Next to synchronization status icon, the AUTOSAR path of the parent object is displayed under which all objects in this DML editor are created.
Synchronization
As explained in section Project Frame, the content of the DML Editor is automatically synchronized to the AUTOSAR model and therefore doesn't need to be saved.
When editing content with the DML Editor, the AUTOSAR model is edited rather than a file. It is important to note that. The content in the DML Editor reflects the content of the AUTOSAR model. Therefore, it might happen that content is moved in the DML Editor when the DML Editor content is synchronized with the AUTOSAR model.
Undo and Redo
The undo and redo operations work differently in the DML Editor than in other editors. This is because the DML Editor behaves like a text editor and therefore uses a text editor stack to store the entries for undo and redo operations. In addition, the DML Editor is automatically synchronized with the AUTOSAR model (refer to section Synchronization above) and therefore undo and redo entries are stored onto the model undo stack as well.
Therefore, the following behavior for undo and redo operations apply:
- The DML Editor places an entry for undo and redo operations onto the text editor stack.
- The DML Editor always performs forward-transactions. That means that each time the content is synchronized with the AUTOSAR model a new entry is also placed onto the model undo stack.
- This new entry onto the model undo stack applies for both, undo and redo operations.
- Synchronized content from the AUTOSAR model into the DML Editor, will be ignored by the undo redo operations in the DML Editor.
- Overlapping changes (e.g., changing an element's short name in the DML Editor and changing that same short name in another editor) will invalidate the changes made in the DML Editor and cannot be undone or redone anymore.
This behavior is required to be able to revert not yet synchronized contents in the DML Editor which would otherwise be lost by a model undo/redo.

Keep in mind the different behavior of the undo and redo operations when working with the DML Editor.