The current plugin does not allow modifying existing elements. For example, adding a stereotype to an existing profile or adding a value property to an existing block won't work. The code does not search the cameo model for existing IDs except when it has already been established that an element has been created.
Particularly, I've been looking at the parent relationship. An ID can be setup in the XML schema, but if that ID points to an existing element instead of a newly created element, it will not modify the existing element. This is due to the way the GetImportedOwner method is implemented (roughly starting line 1068 in ImportXmlSysml.java).
I don't think that modifying existing elements was part of the motivating use case for this tool, so I understand it not looking for existing elements. However, the change is fairly straightforward (will be implemented in an upcoming PR), and it extends the usability of the plugin. I hope this is useful to others.
The current plugin does not allow modifying existing elements. For example, adding a stereotype to an existing profile or adding a value property to an existing block won't work. The code does not search the cameo model for existing IDs except when it has already been established that an element has been created.
Particularly, I've been looking at the parent relationship. An ID can be setup in the XML schema, but if that ID points to an existing element instead of a newly created element, it will not modify the existing element. This is due to the way the
GetImportedOwnermethod is implemented (roughly starting line 1068 in ImportXmlSysml.java).I don't think that modifying existing elements was part of the motivating use case for this tool, so I understand it not looking for existing elements. However, the change is fairly straightforward (will be implemented in an upcoming PR), and it extends the usability of the plugin. I hope this is useful to others.