Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: qwerty on July 22, 2021, 08:09:38 pm
-
Here's one for the Sparxians: I have set _HideUmlLinks to True for all my metaclasses. Now I draw a QL from my «stereotype» to my «metaclass». Right there I find my Extension which I added via metarelationship. Fine! But right under that I see "Substution". What might that be I wonder and select it. Guess what: not UML compliant. How. Can. That. Be? Not that I told the bugger to hide anything I don't want to see, which it's silently ignoring. Rather it offers me some incompatible connector. What is wrong here? Btw. there are more entries listed by the QL and none is compliant - probably because I set metarelationships which mean all or nothing. Alas, why does the bugger list them in first place?
q.
-
Just a bit more fodder, here's part of my profile:
<Stereotype name="domain block" metatype="Block" notes="" cx="0" cy="0" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
<Image type="EAShapeScript 1.0" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">...</Image>
<AppliesTo>
<Apply type="Class">
<Property name="_HideUmlLinks" value="True"/>
<Property name="isActive" value=""/>
</Apply>
</AppliesTo>
</Stereotype>
in MyProfile. And <Stereotype name="stereotype" notes="" cx="0" cy="0" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
<metarelationships>
<metarelationship metaclass="Extension" constraint="MyMetaProfile::metaclass"/>
</metarelationships>
<stereotypedrelationships>
<stereotypedrelationship stereotype="MyMetaProfile::represent" constraint="MyProfile::domain block"/>
</stereotypedrelationships>
<AppliesTo>
<Apply type="Class">
<Property name="_HideUmlLinks" value="True"/>
<Property name="isActive" value=""/>
</Apply>
</AppliesTo>
</Stereotype>
<Stereotype name="metaclass" notes="" cx="0" cy="0" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0" generalizes="StandardProfileL2::Metaclass" baseStereotypes="StandardProfileL2::Metaclass">
<AppliesTo>
<Apply type="Class">
<Property name="_HideUmlLinks" value="True"/>
<Property name="isActive" value=""/>
</Apply>
</AppliesTo>
</Stereotype>
in MyMetaProfile. Awkwardly when dragging from «stereotype» to «domain block» I get that full list with wrong entries. Vice versa it shows (correctly) only the single Extension entry.
q.
-
And one more observation: while dragging from «stereotype» to «metaclass» the Extension is offered (among lots of unwanted stuff). But the other way round it does not show the extension (which should be listed as Extended by). Also the list of (unwanted) connectors is much smaller that way.
q.
-
Any takers? I'd rather continue with knowledge than the usual trial and error. Thanks.
q.
-
Any takers? I'd rather continue with knowledge than the usual trial and error. Thanks.
q.
As I mentioned in another thread, my "extension" from stereotype to metaclass has gone "missing in action". However, I don't see in your fragments where the "Extended by" comes from.
Also, in our MDG Metaclass has uppercase "M". StandardProfileL2::Metaclass We've found the correct casing is vital.
Paolo
-
Ah, those pitfalls. I have to get used to them. Thanks for taking a look!
q.
-
Unfortunately the M is what EA itself suggests (insert a metaclass element from the Stereotypes list). And that works. So my issue is still open: why does that list of elements appear in the dropdown although they are by EA's definition no valid entries.
Also not sure what you are missing. I added all Applies to records, didn't I?
q.
-
Here's one for the Sparxians: I have set _HideUmlLinks to True for all my metaclasses.
...
there are more entries listed by the QL and none is compliant - probably because I set metarelationships which mean all or nothing. Alas, why does the bugger list them in first place?
I believe the problem is having a class with the stereotype 'stereotype'. Because that's how EA represents the Stereotype metaclass. It seems like when determining what to show in the quicklinker it's seeing the object as a Stereotype, not a Class. When determining if it's a legal relationship it's using Class and therefore finding the information in your metaclass.
Unfortunately, I can't think of a way that you can work around that behavior.
while dragging from «stereotype» to «metaclass» the Extension is offered (among lots of unwanted stuff). But the other way round it does not show the extension (which should be listed as Extended by).
EA doesn't define the equivalent of _MeaningBackwards for all metarelationships. You may be able to do this for yourself by using a stereotyped Extension and defining it for yourself.
-
The reason for having a «stereotype» in my profile was (like with metaclass and a some connectors) to have them in my toolbox (which as written in another thread will also not show up in my own «profile» packages but being replaced with EA's toolbox). Now, the only way when fighting with that was that I defined my own «stereotype». I will investigate in that direction. Anyhow, I think I can say that defininig diagrams and toolboxes for profiles it not really working it should be.
q.
P.S. Now I seem to remember. It was not possible to bring «stereotype» (the native one) into a toolbox since you can't have the FQN of it. Catch 22.
-
P.S. Now I seem to remember. It was not possible to bring «stereotype» (the native one) into a toolbox since you can't have the FQN of it. Catch 22.
UML::Stereotype
-
Ok, thanks! I'll give that a try later the day then...
q.
-
Hmm. It's all weird. When I add UML::stereotype to my toolbox it creates a wild "stereotype" and not an UML::stereotype. Why? Also for the metaclass when using StandardProfileL2::Metaclass in my toolbox it does not offer the wizard dialog. When using my own MyProf::metaclass extending the latter it DOES offer the wizard. So: how do I add stereotype and metaclass to my toolbox so they behave like the native profile toolbox???
q.
P.S. Seems like I have to read (and understand) https://www.sparxsystems.com/forums/smf/index.php/topic,45880.0.html (https://www.sparxsystems.com/forums/smf/index.php/topic,45880.0.html) since Paolo seemed to fight a similar struggle.
-
I went back to square one and started with an empty project. Turned out that I had wiggled my mind in the depth of half a dozen profiles which my memory made me think to be the right. It wasn't. So I put in UML::Stereotype and UML::Metaclass and that seemed to behave the same way as EA's toolbox entries. I might still be in that profile maelstrom, but it seems I know what direction to paddle.
q.