Author Topic: Turn off Common Relationships toolbox  (Read 6941 times)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Turn off Common Relationships toolbox
« on: May 18, 2021, 05:59:02 pm »
I seem to remember this being asked before (and anticipating the answer as well). But again: is it somehow possible to turn off that toolbox? The new Metaconstraints seem to be a (now rare) nugget which is why I'm after them now. There's that Filter to Toolbox check mark. And that includes the Common Relationships as well (it probably does for elements but I'm not that far yet). Now it's really nice that we now can show our own relevant connectors in the menu (don't tell me the old QL could do that as well...). But the Common ones are included as well. Is there any way to turn them off so we can be really strict in our modeling environment - and not just somehow strict.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #1 on: May 18, 2021, 06:31:55 pm »
Adding the attribute _HideUMLLinks=true in the metaclass helps with Filter to Toolbox = true (but I think it needs to be for every item in the profile - leastways that's what we've done)

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Turn off Common Relationships toolbox
« Reply #2 on: May 18, 2021, 06:34:26 pm »
No, I don't think you can turn them off.

But you can be strict though (at least if working with your own stereotypes). I never rely on the existence of a toolbox to determine what I want to allow or not.
If you set the _HideUMLLinks property to true, your stereotype will no longer inherit the standard UML relations.
You then have to make sure to provide all the allowed relationships in your profile.

Geert

PS. I see that Paolo has the same suggestion :)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #3 on: May 18, 2021, 06:46:49 pm »
Ah, good to hear. Sounds like labor but I'm already chained here...

Thank you both!

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #4 on: May 19, 2021, 06:45:58 pm »
Well, that attribute's meaning is obfuscated. The Common Relationships are there are before. I'll play around a bit more, but obviously my goal to just plainly get rid of an imposed toolbox is not achievable.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Turn off Common Relationships toolbox
« Reply #5 on: May 19, 2021, 06:52:37 pm »
Well, that attribute's meaning is obfuscated. The Common Relationships are there are before. I'll play around a bit more, but obviously my goal to just plainly get rid of an imposed toolbox is not achievable.

q.
You definitely can't get rid of the common toolboxes.
The only thing you can can do is make the rules so strict the relationships on there cannot be used on any of your artifacts.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #6 on: May 19, 2021, 07:41:26 pm »
I think I now see a bit more clear. This attribute has to be set to the element and not for any relation itself. I had been thinking the wrong way...

q.

P.S. That does not seem to work too. I'll have a break...
« Last Edit: May 19, 2021, 07:48:04 pm by qwerty »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #7 on: May 19, 2021, 10:26:16 pm »
Ah well, to and fro it turned out to be case sensitive. It must be _HideUmlLinks. Using _HideUMLLinks does not work. Feel scolded, Paolo AND Geert! ;-)

q.

P.S. Oh my! It works now for one stereotype. But doing the exact same thing to another one yields nothing. UML connectors present despite adding the Hide.
« Last Edit: May 19, 2021, 10:37:50 pm by qwerty »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #8 on: June 09, 2021, 11:37:03 pm »
It does not look like this is working at all. I boiled it down to a very simple example where I have a stereotyped relationship from Package to Artifact. That's well show in the QL with the respective names. But once I turn on _HideUmlLinks the dropdown is completely empty.

Code: [Select]
<Stereotype name="represent" notes="">
<AppliesTo>
<Apply type="Dependency">
<Property name="direction" value="Source -&gt; Destination"/>
<Property name="_MeaningForwards" value="Represent"/>
<Property name="_MeaningBackwards" value="Represented by"/>
</Apply>
</AppliesTo>
</Stereotype>
and
Code: [Select]
<Metamodel>
<Metaclass name="Package" notes="">
<stereotypedrelationships>
<stereotypedrelationship stereotype="myProf::represent" constraint="Artifact"/>
</stereotypedrelationships>
</Metaclass>
</Metamodel>
is what the profile holds.
P.S. And the source stereo looks like
Code: [Select]
<Stereotype name="theBadOne" notes="">
<AppliesTo>
<Apply type="Package">
<Property name="URI" value=""/>
<Property name="_HideUmlLinks" value="true"/>
</Apply>
</AppliesTo>
</Stereotype>
Without the Hide property the list is complete. And with it it's not present.

q.
« Last Edit: June 09, 2021, 11:49:24 pm by qwerty »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #9 on: June 10, 2021, 12:08:12 am »
And what really made my day:
Code: [Select]
<Metamodel>
<Metaclass name="Package" notes="">
<stereotypedrelationships>
<stereotypedrelationship stereotype="myProf::represent" constraint="Package"/>
</stereotypedrelationships>
</Metaclass>
</Metamodel>
has the same effect. The QL from a package to another (or anything) is empty.

Why?

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #10 on: June 10, 2021, 08:08:43 am »
I suspect your problem is that you're adding myProf::represent to a UML type. Then on your stereotyped package you are saying not to include any relationships inherited from the UML type, which includes your relationship.

If you want to hide the UML relationships you will need to define your relationships as starting from your stereotypes instead/as well.

PS. You can hide individual items from a common toolbox by defining and selecting a perspective. Set it to 'Strict' (meaning nothing outside the perspective can be created) and then 'Restrict' it to a subset of the included technologies, which includes selection of the items in the common toolboxes. If you're so inclined you can even turn off specific Link/Source/Target combinations.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #11 on: June 10, 2021, 04:58:58 pm »
I suspect your problem is that you're adding myProf::represent to a UML type.
Sorry, but I don't understand that :-/

Maybe you did not see the definition in the 2nd last post?

q.
« Last Edit: June 10, 2021, 05:24:51 pm by qwerty »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #12 on: June 11, 2021, 09:16:21 am »
No, I saw the second post. They are both doing the same thing. Adding a target for myProf::represent to UML Package.

The rule is added to all unstereotyped packages. Stereotyped packages will inherit it from the Package definition as well by default.

The problem that _HideUmlLinks is not intended to hide UML relationship types, it hides all relationships defined against the base UML element. In your particular example that includes your custom relationship.

Is your intention to define myProf::represent so that it is offered as a relationship between unstereotyped Package and Artifact/Package? Or is that a misunderstanding of what you need to do to use it within your own profile?

You can and should define the relationships against your stereotypes. The only reason to include any metaclass elements is if you explicitly want unstereotyped elements as a valid source or target. This definition should mean that theBadOne is allowed to have a myProf::represent to a UML Artifact, Package or myProf::otherPackage. In the model that would correspond to 3 stereotyped relationship connectors.
Code: [Select]
<Stereotype name="theBadOne" notes="">
<AppliesTo>
<Apply type="Package">
<Property name="URI" value=""/>
<Property name="_HideUmlLinks" value="true"/>
</Apply>
</AppliesTo>
<stereotypedrelationships>
<stereotypedrelationship stereotype="myProf::represent" constraint="Artifact;Package;myProf::otherPackage"/>
</stereotypedrelationships>
</Stereotype>


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #13 on: June 11, 2021, 04:28:33 pm »
I think I know what you mean, but it needs to settle down first. Pretty sure it's what I call "Sparxian thinking".

What I meant was to add the stereotyped relation to all packages and to show this as the only one being allowed (for this test case). That's why I added it for the Package metaclass and my intention of setting the _Hide was to eliminate everything else. As said, I have to brood over that for a moment.

Anyway, thanks for the pointers.

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Turn off Common Relationships toolbox
« Reply #14 on: June 11, 2021, 10:41:21 pm »
I got it. Indeed it is that Sprarxian thinking. Or as your CDO might say "bloody user thinking". So when using the _Hide it's of no use to define metaconstraints between metaclasses. Rather I have to do that for each and ever stereotype. Well, I have to dig that.

q.