Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Svend Erik Nygaard on November 10, 2017, 02:18:34 am
-
I created a custom diagram type in an MDG.
When I use the MDG, I can select my custom diagram type when I create a new diagram
BUT:
- The new diagram does not get a customized type - it is still just "Component"
- The new diagram does not get a customized stereotype - it is still blank in the stereoype
- If I try to change the stereotype in the properties field, my new stereotype does not show up
- The new diagram does not get a customized stereotype (in diagram peoperties window) - it is still blank in the stereoype
If I go to Design/Diagram/Manage/Change type... - then I can actually choose my new diagram type, but I still don't see any change in the diagram's type og stereotype.
The diagram pane's title bar does show the new customized stereotype though (<Steretype> diagram: <name>
EA also presents the associated toolboxes correctly
Does EA not set diagram type and stereotype in the usual fields (Diagram_Type and Stereotype) for a customized diagram?
I can see that it does include the name of my customized stereotype (CityMap) in the field StyleEx:
"MDGDgm=CPH_MetaModel::CityMap;HideQuals=0;HideConnStereotype=0;"
-
I'm pretty sure what you saw is normal behavior for EA.
Geert
-
If you create any diagram from BPMN you see that they are Analysis diagrams and don't have a stereotype. It's only that EA knows the meta-type and associates a toolbox with the diagram.
q.
-
If you create any diagram from BPMN you see that they are Analysis diagrams and don't have a stereotype. It's only that EA knows the meta-type and associates a toolbox with the diagram.
q.
Because Diagrams are 2nd (or lower) class citizens of the sparxian ecosystem, a diagram metatype is NOT a combination of Type and Stereotype, but just an entry in StylEx (as noted by the OP).
Getting Diagram stereotypes to appear in the dropdown has been problematic for us. IIRC we found we had to place them in the General stereotypes list with a base class of Diagram to get them to show up.
Paolo
-
IIRC we found we had to place them in the General stereotypes list with a base class of Diagram to get them to show up.
But that will not associate the MDG's diagram type with the general stereotype - correct?
Is there any way to add a stereotype (possibly as a default value) from within the MDG, to elements created from the MDG's diagram type?
-
IIRC we found we had to place them in the General stereotypes list with a base class of Diagram to get them to show up.
But that will not associate the MDG's diagram type with the general stereotype - correct?
Is there any way to add a stereotype (possibly as a default value) from within the MDG, to elements created from the MDG's diagram type?
I'm sorry I don't understand what you mean with "elements created from the MDG's diagram type"
Geert
-
I'm sorry I don't understand what you mean with "elements created from the MDG's diagram type"
Geert
Yeah, that was a bit of fast typing, sorry.
I mean:
I create a customized diagram type "CityMap" in my MDG.
Then, when the user creates a new CityMap diagram, I want EA to set the diagram's stereotype to "CityMap"
Is there any way, I can specify in my MDG, that the diagram should automatically be given the stereotype "CityMap" - for instance, can I, in my MDG, specify a default value for the Stereotype property?
-
Ah, thanks that makes more sense.
No I don't think you can, but diagram stereotypes aren't really valid UML constructs you know.
Why is it so important that you have a stereotype on your diagrams? I've done a number of MDG with diagram types, and I never really felt the need for stereotypes.
What would be nice is if we could specify our own icon for a diagram. That would visually set them apart from the other diagrams.
Geert
-
What would be nice is if we could specify our own icon for a diagram.
+1
-
What would be nice is if we could specify our own icon for a diagram.
+1
+1
Paolo
-
Why is it so important that you have a stereotype on your diagrams?
- Searching
- Reporting
- Applying logic/rules/quality checks
- ...
-
Can't you do all of that without the stereotype as well?
Geert
-
Yes, but it's inconvenient (due to inconsistency). You need to look after the "stereotype" of a diagram in StyleEx in the MDGDgm tag.
q.
-
Yes, but it's inconvenient (due to inconsistency). You need to look after the "stereotype" of a diagram in StyleEx in the MDGDgm tag.
q.
No argue with that.
Geert