|
Re: DSML configure Diagram Assistants [message #1835805 is a reply to message #1835743] |
Sun, 13 December 2020 18:07 |
|
Hi, Christoph,
I attach a sample project that defines an element types configurations model with a single type: an association between interfaces in which all ends are owned by the association. Included is an assistants model that, at run-time, lets me create this special association between interfaces or to/from an existing interface and a new interface. But, it does not allow to connect to any non-interface nor to create any non-interface as source/target of a new "interface association."
One of the important aspects in the creation of a connection to/from a new element in the diagram is that the assistant model must enumerate the creatable element types for its relationship types.
Another important aspect (I think; not sure) is that the registrations of these models must both reference the Papyrus element-types context ID. I think I've seen models that leave the context ID null, but I don't know what that means.
Perhaps you can see some meaningful difference between my minimal example and your case?
As regards the restriction of what can be created in the diagram: the assistants models are good for specifying how to create and connect new (custom) types of elements. Not so much restricting the capabilities of existing types, or types defined by other bundles/languages. Perhaps for this you need to define a custom diagram type ("representation kind") in an architecture context model. Not something that I have much experience with, myself, but others on this forum have.
HTH,
Christian
|
|
|
|
Re: DSML configure Diagram Assistants [message #1836035 is a reply to message #1836034] |
Fri, 18 December 2020 16:05 |
|
Hi, Christoph,
No, generalizations should be no different to any other relationship as far as the connection assistants are concerned. I found it tricky in developing my example to get the right mix of element-type references. There's the question of whether to reference a "visual" specialization type representing a particular visualization of the element in the diagram, or the "semantic" element type that it is based on. And also making sure that not only the element types for which you're defining assistants are listed in the root assistants model element, but also the element types that you want those assistants to connect.
Cheers,
Christian
|
|
|
Powered by
FUDForum. Page generated in 0.03139 seconds