In a separate thread
v15.2 – Can we create an extended stereotype from Toolbox?, Sparxian Eve shows how to create an extended toolbox item (i.e. an item with more than one stereotype on creation) using the Sparx UML Pattern process.
It is quite cumbersome! First, you have to create a specific diagram with ONLY one item on it, set up as desired. Then you have to export the diagram as a pattern (creating a specific XML file) and then include it specifically in the MDG creation script file.
Lastly, you have to create a toolbox entry that references the specific pattern. You can then drag the item from the toolbox and voila, an item with multiple stereotypes on creation!
That may seem like quite some overhead, for something that could (potentially) be easily handled by adding a _StereotypeEx attribute to the stereotype definition. But that's not the reason I capitalised the word
EXTRAORDINARY.
On investigation, we discovered that to (effectively add some tens of characters to the stereotype definition in the output XML), a single item added a pattern specification of 56KB!!! Now, we intend to have a number of these extended toolbox items, which implies between 50-60KB for each!
We've put in a lot of effort to reduce our MDG size via effective use of the model-based generation process and the size (for an even bigger and much more sophisticated metamodel than initially sized) has reduced from some 14MB to a little over 3 MB! But at "50-60KB a pop" it's not going to take long to have a humungous MDG file again!
Now that you're aware of the OVERHEAD, is there support for embedding the creation of extended toolbox items by a more efficient mechanism? If so, I'll put in a feature request and maybe in a couple of decades, we might see something.
TIA,
Paolo