The I_DMLEditor DML Editor (DaVinci Modeling Language Editor) can be used to textually model AUTOSAR objects by using the DaVinci Modeling Language (DML).

Open DML Editor
(AUTOSAR Model Element must be selected)

<CTRL> + <SHIFT> + <D>, <D>

Limitations

Open Editor

Prerequisites:

  1. The selected object is not an AUTOSAR root object.
  2. The selected object has a short name.
  1. Open the AUTOSAR Model Explorer
  2. Select a package or an object below a package in the AUTOSAR Model Explorer.
  3. Open the context menu of the selected element and click I_DMLEditor Open in DML Editor.
  1. 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 I_Snippet.

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

  1. Open the context menu of the corresponding feature,
  2. 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.
  1. 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:

  1. The Editor Status must be I_ValidationStatus_Valid valid.
  1. Click on comfort / generic in the DML Editor.
  1. The generic / comfort representation is displayed.

S_DML_Toggle_Representation

Editor Status

The synchronization status of the DML Editor content is indicated by an icon in the upper left corner of the DML editor.

  • I_DMLEditor_Valid Valid: The content of the DML Editor is in sync.
  • I_DMLEditor_Sync Synchronizing: The content of the DML Editor is currently being synchronized.
  • I_DMLEditor_Invalid 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:

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.

notice

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