The model editor features a copy mechanism that allows a deep copy of objects and all references from one model into another via drag and drop or copy/paste. It includes an Import dialog which shows potential conflicts in the target model and allows the copying of objects selectively. To copy objects from one model into another, simply select the required objects and copy them (via the context menu or by pressing Ctrl + C) and paste them anywhere (except the resource-object at the very top) in the target model.
Alternatively, drag and drop can be used to copy objects between models. To achieve this, both models need to be opened in the model editor. Additionally, both editors need to be visible at the same time. To achieve this, one editor must be dragged to the edge of the Eclipse editor area. Drag and drop is currently only supported for Microsoft Windows operating systems.
When both editors are visible, objects can be dragged and dropped from one model into the other.
The import mechanism will copy not only objects that were selected, but all underlying objects including referenced objects (recursively). Copying the category “Tool Descriptors” will copy all the containing tool descriptors, referenced properties and file descriptors (parameters), action descriptors (Job After Action) and so on. Copying the objects “Document Root” or “Model Configuration” will result in the whole model being copied.
It is not possible to copy objects explicitly that do not have an ID attribute (e.g. relationships or ISA attributes).
Once a copy operation is initiated, all relationships and references will be gathered and the Import dialog opens. The Import dialog shows the dragged object(s) and all their references that will be copied into the target model, in a table view. The table consists of two columns “Before” and “After”. The “Before” column indicates whether a copied object already exists in the target model. It contains the existing object from the target model or “---“ if there is none. The “After” column always shows the copied objects and relationships from the source model.
If a copied object contains children (like relationships) it can be expanded in the table view. Attributes of objects and relationships can be seen by moving the mouse cursor over the specific object.
Objects that should not be copied or overwritten can simply be unchecked in the table view.
The Import dialog also uses a certain typography to point out most common conflict situations.
Conflict situation | Explanation | Highlighting |
---|---|---|
No conflict | Copied object, relationship or attribute does not exist in target model. | Green |
Identical object | The copied object already exists in the target model with no differences. | Normal |
Change conflict | Copied object, relationship or attribute already exists in target model but with different attributes or children (e.g. relationships of an object). | Blue |
Remove conflict | Copied attribute/relationship exists in target model but will be removed since the source object does not contain this attribute/relationship. | Crossed out |
If an object already exists in the target model, the dialog shows both objects (source and target) in comparison. The mouse cursor can be hovered over any object or relationship to show the attributes of the corresponding objects.
In the dialog above, a file descriptor was copied from one model into another. The dialog notifies the user that the file descriptor FILE_DatasetList and the property PROP_DatasetName already exist in the target model but with different attributes. The property PROP_Suffix does not exist in the target model, and will be created if OK is clicked. Other existing (but identical) objects are hidden due to the “Filter Identical” check box.