Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: mvinca on May 05, 2010, 09:18:49 pm

Title: What MetaClass for diagram stereotypes?
Post by: mvinca on May 05, 2010, 09:18:49 pm
I want to create a stereotype that I can attach to any diagram. (Right now the pull down says "allocated" and "RequirementRelated".) However, I'm unable to figure out what MetaClass I extend in my UML Profile to do this. Can anyone help me out?
Title: Re: What Metaclass for diagram stereotypes?
Post by: Paolo F Cantoni on May 05, 2010, 10:21:08 pm
AFAIK, you can't attach diagram stereotypes to profiles...

You just set the stereotype name in the diagram.

If Sparx or others confirm this...

Submit a Feature Request (http://www.sparxsystems.com/support/feature_request.html) and tell us the name,
leaving a note here to say you've done it.
We users can then vote for it using a Feature Request (http://www.sparxsystems.com/support/feature_request.html) with the same name[/color]
Paolo
Title: Re: What MetaClass for diagram stereotypes?
Post by: mvinca on May 05, 2010, 10:24:50 pm
I was afraid that might be the case. What you say is how I am currently doing it, but was hoping the pull down would read from the profile to ensure consistency.

However, it also makes sense that it might not be in the profile. A diagram really isn't a UML type right? Just a view into the UML Model?
Title: Re: What Metaclass for diagram stereotypes?
Post by: Paolo F Cantoni on May 05, 2010, 10:31:24 pm
Quote
I was afraid that might be the case. What you say is how I am currently doing it, but was hoping the pull down would read from the profile to ensure consistency.
Someone after my own heart...

Eventually even Geoffrey Sparx must get the message...

Quote
However, it also makes sense that it might not be in the profile. A diagram really isn't a UML type right? Just a view into the UML Model?
Even in UML, an Activity Diagram is an Activity (and EA supports this).

But EA isn't just a UML modelling tool...  

It's a system design issue not a UML modelling tool issue.

Paolo
Title: Re: What MetaClass for diagram stereotypes?
Post by: KP on May 06, 2010, 09:17:18 am
Quote
I want to create a stereotype that I can attach to any diagram. (Right now the pull down says "allocated" and "RequirementRelated".) However, I'm unable to figure out what MetaClass I extend in my UML Profile to do this. Can anyone help me out?
"Diagram" (I believe «allocated» and «RequirementRelated» both extend "<all>", which is the sledgehammer answer)
Title: Re: What MetaClass for diagram stereotypes?
Post by: mvinca on May 06, 2010, 09:34:52 am
There is no "Diagram" in the metaclass list. There is "DiagramFrame", "DiagramGate" and "UMLDiagram". The first two didn't make sense and I already tried "UMLDiagram" and that didn't work.
Title: Re: What MetaClass for diagram stereotypes?
Post by: KP on May 06, 2010, 09:51:43 am
Quote
There is no "Diagram" in the metaclass list.
It doesn't matter: just create a class, name it "Diagram" and give it the «metaclass» stereotype...
Title: Re: What MetaClass for diagram stereotypes?
Post by: mvinca on May 06, 2010, 08:23:26 pm
Oh, ok, cool. Could I use the same technique to extend a SysML stereotype, like <<block>>?
Title: Re: What MetaClass for diagram stereotypes?
Post by: KP on May 07, 2010, 09:02:11 am
Quote
Could I use the same technique to extend a SysML stereotype, like <<block>>?
Not currently possible. You would need to extend the same metaclass (in this case "Class") and apply both stereotypes («block» and your own) to an element.