Author Topic: Case matters (profile quirks)  (Read 5964 times)

qwerty

  • EA Guru
  • *****
  • Posts: 12334
  • Karma: +347/-287
  • I'm no guru at all
    • View Profile
Case matters (profile quirks)
« on: June 23, 2021, 12:42:12 am »
Although EA does not seem to care for the case there are places where it does. First I noticed it with _HideUmlLinks which is case sensitive (most likely but not tested like all the other attributes which do or don't have an underline in front; oh Sparxian where have you been when the Lord spread brain?). Now I noticed a similar thing when adding Toolbox entries. stereotype and metaclass: the first belongs to no profile since it uses a keyword (ah, and where have those OMG guys been?) while the 2nd is per t_xref stated to be in StandardProfileL2 (though the properties display something different). Anyhow, what you need to enter in the toolbox is UML::Stereotype and UML::Metaclass. In that exact casing! Anything else (like UML::metaclass) will either not work at all or let EA croak in the strangest way.

Not reported since it won't be fixed anyway.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11251
  • Karma: +415/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Case matters (profile quirks)
« Reply #1 on: June 23, 2021, 01:21:16 am »
Yes, anything UML profile/MDG related is usually case sensitive.

In general anything based on XML will be case sensitive, while anything based on a database won't.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 12334
  • Karma: +347/-287
  • I'm no guru at all
    • View Profile
Re: Case matters (profile quirks)
« Reply #2 on: June 23, 2021, 01:50:00 am »
Well, all that stuff is inside a database. And when you assign a stereotype by hand writing EA will translate whatever case you choose to the nearest match of the nearest profile. Formerly metaclass appeared always in lower case. Now it comes with a capital M. Same, same, but different. It's EA, we all know. This is just a remembering: there be dragons.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7572
  • Karma: +94/-18
    • View Profile
Re: Case matters (profile quirks)
« Reply #3 on: June 23, 2021, 09:14:25 am »
Not having a good day today q?

Yes, stereotype lookups have always been case insensitive. No idea why, but it's not something that can change now.

I've gone into some detail about what's going on with Stereotype and Metaclass in a previous discussion with Paolo here. That includes the distinction between StandardProfileL2 and UML Standard Profile. There have also been a couple of extra places here that I have discussed profile Aliases. If you are wanting to create your own toolbox for them though I would recommend UML::Stereotype and StandardProfileL2::Metaclass(UML::Class). The 'UML::' prefix will require an case sensitive name match because even if it ends up mapping to a stereotype you're not referring to a stereotype.

PS. You haven't noticed in your short forays into recent versions that you can no longer type a stereotype at all?
Eve

support@sparxsystems.com

qwerty

  • EA Guru
  • *****
  • Posts: 12334
  • Karma: +347/-287
  • I'm no guru at all
    • View Profile
Re: Case matters (profile quirks)
« Reply #4 on: June 23, 2021, 06:42:17 pm »
Yes, Eve, I thought of the typing while sitting over my breakfast. Some things you get used to and don't notice they've changed. And having a good day? Well, it always depends.

Honestly, I do think that the stereotype handling has changed to the better in EA. Still of course not being at a stage I would call it superb. It took me quite an quarter of an hour to find out that casing (because I'm already a bit used to Sparxian thinking). But still I'm fighting with those new constraints so I can handle them, which is by far not easy. The reason for it bascially is that the standard QL does not offer an Extension between stereotype and metaclass and I was thinking of ways to introduce that. It's almost as tricky as decoding the stereotype property GUID creation (for what I just learned to use an Intel debugger after about 40 years having used an IBM/370 debugger during my time at univeristy). Still a riddle to me why this is a secret. I wasn't made to make me busy, was it?

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7572
  • Karma: +94/-18
    • View Profile
Re: Case matters (profile quirks)
« Reply #5 on: June 24, 2021, 08:43:18 am »
Still a riddle to me why this is a secret. I wasn't made to make me busy, was it?
The stereotype property guids? That just comes down to the reluctance to change the data model, so someone came up with a "smart" solution. The only secret there is the code to generate the prefix, and that's only a secret because it's part of EA's code.
Eve

support@sparxsystems.com

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 7949
  • Karma: +208/-127
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Case matters (profile quirks)
« Reply #6 on: June 24, 2021, 10:02:54 am »
Still a riddle to me why this is a secret. I wasn't made to make me busy, was it?
The stereotype property guids? That just comes down to the reluctance to change the data model, so someone came up with a "smart" solution. The only secret there is the code to generate the prefix, and that's only a secret because it's part of EA's code.
Well, these days, by attaching enough tags to enough stereotypes in the MDG and generating one instance of each, collecting the prefixes one could get some ML to figure out the prefix for any new tag-stereotype combination.   ::) ::) :P ???

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

qwerty

  • EA Guru
  • *****
  • Posts: 12334
  • Karma: +347/-287
  • I'm no guru at all
    • View Profile
Re: Case matters (profile quirks)
« Reply #7 on: June 24, 2021, 06:01:31 pm »
Well, yes, of course. That's what everyone is doing. But knowing the algorithm to create a guid from tag name, profile name and some unknown salt would be much smarter, wouldn't it? That algorithm could well be documented. Since Sparx is so reluctant in doing proper documentation it's up to the users to supply that.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7572
  • Karma: +94/-18
    • View Profile
Re: Case matters (profile quirks)
« Reply #8 on: June 25, 2021, 08:42:59 am »
Well, yes, of course. That's what everyone is doing. But knowing the algorithm to create a guid from tag name, profile name and some unknown salt would be much smarter, wouldn't it? That algorithm could well be documented. Since Sparx is so reluctant in doing proper documentation it's up to the users to supply that.
The only reason for anyone to use that would be to directly insert into the database without using EA. Something that we are very clear that we don't support.
Eve

support@sparxsystems.com

qwerty

  • EA Guru
  • *****
  • Posts: 12334
  • Karma: +347/-287
  • I'm no guru at all
    • View Profile
Re: Case matters (profile quirks)
« Reply #9 on: June 25, 2021, 06:17:40 pm »
Well, you have a point there. Though as a serious EA user I know that often you need to exactly do that. So it will keep me busy. Interesting endeavour in any case.

q.