Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: Uffe on April 02, 2020, 09:01:53 pm

Title: Use metamodel constraints to allow specific built-in connectors
Post by: Uffe on April 02, 2020, 09:01:53 pm
I have a stereotype definition extending the Class metaclass.
I want the quick linker between two classes with this stereotype to show Generalization, Specialization and nothing else.

How do I do that?

There seem to be two ways to specify permitted connectors: a looping metarelationship with the tag metaclass set to Generalization, or a metaclass Generalization with two metaconstraint connectors to my stereotype class.

Which is correct for this use case?

To get Specialization in the quick linker menu, what do I do? Does it automatically show up when Generalization is specified?
The metaclass dialog has no Specialization metaclass. Is that missing? Should I create it manually?
If I use the metarelationship connector, should I add another with metaclass Specialization?



How do I prevent all the default menu items to show in the quick linker?

Quote from: https://www.sparxsystems.com/enterprise_architect_user_guide/15.1/modeling/metamodelconstraints.html
You can specify the source of a connector to be a superclass of all specialized forms, and the target to a special metaclass that specifies a relationship to the actual metaclass when it is used. You use one of these terms as the element name for a Class element with the stereotype «metaclass».
...
<none>  |  Use this metaclass name when you want to prevent the source element from inheriting the specified connector from its supertypes.

What does that actually mean?
Title: Re: Use metamodel constraints to allow specific built-in connectors
Post by: Uffe on April 03, 2020, 02:39:33 am
To prevent the default connectors from appearing in the quick linker menu for a stereotyped element, manually add an attribute _HideUmlLinks to the stereotype's metaclass element and set its Initial Value to true.

This works when using metarelationship and stereotyped relationship connectors, haven't tested the connector metaclass + metaconstraint connectors route.

_HideUmlLinks is not in the profile helper.

Still have no idea what that last bit of the manual page is supposed to mean. It's like a nonsense poem.

    "The time has come", the Walrus said,
    To have ourselves a think
    On metaclasses, ster'otypes
    On rapid little links
    And why for every bug we squish
    Three more beneath it wink

        -- Not Lewis Carroll
Title: Re: Use metamodel constraints to allow specific built-in connectors
Post by: Eve on April 03, 2020, 07:50:51 am
You might add a rule specifying the <none> metaclass when your element allows the UML Association, but you don't want to allow AssociationClass between the specified elements.

It is literally this relationship can not have this type of relationship.

I'm afraid that the help makes sense to me. How would you rephrase it?

UML generalization has the _MeaningBackwards defined for it, so you will get Specialization automatically.
Title: Re: Use metamodel constraints to allow specific built-in connectors
Post by: Uffe on April 03, 2020, 10:12:53 pm
I'm afraid that the help makes sense to me. How would you rephrase it?
I can't. That's my point.

If there was some sort of example on there, like with the other three constructs, that might help. But try as I might, I cannot wring any sense out of "You can specify the source of a connector to be a superclass of all specialized forms, and the target to a special metaclass that specifies a relationship to the actual metaclass when it is used."

What connector?
What forms? What is a form? Only use of that word on this page.
How does the special metaclass relate to the other metaclass and stereotype elements in my model?

The object of writing end-user documentation is not to produce the minimal number of words that can be parsed by someone who is already familiar with the subject, but to disseminate knowledge to those who aren't.