Author Topic: Define a metarelationship towards "stereotype"  (Read 1588 times)

qwerty

  • EA Guru
  • *****
  • Posts: 12449
  • Karma: +348/-291
  • I'm no guru at all
    • View Profile
Define a metarelationship towards "stereotype"
« on: October 21, 2021, 02:50:09 am »
As it happens "stereotype" and "metaclass" are no stereotypes belonging to a profile. They are two of those ghost stereotypes. So how to nail the pudding to the wall? Or how to I get these into my Toolbox?

I fiddled for quite a while to realize that
Code: [Select]
      <Stereotype name="My Profile">
        <AppliesTo> <Apply type="ToolboxPage"/> </AppliesTo>
        <TaggedValues>
          <Tag name="UML::stereotype" default="Stereotype"/>
        </TaggedValues>
      </Stereotype>
 
will actually create such a ghost. (Trying with just "stereotype" simply did not create a toolbox entry; of course with no warning from EA.) It does show a class icon instead of the expected guillements. Well, I could live with that...

Now, how to do that for the "metaclass"?? The EA default creates a ghost stereotype (as said). Now I started experimenting.
Code: [Select]
      <Stereotype name="My Profile">
        <AppliesTo> <Apply type="ToolboxPage"/> </AppliesTo>
        <TaggedValues>
          <Tag name="UML::metaclass" default="Metaclass"/>
        </TaggedValues>
      </Stereotype>
 
That again shows the class icon and offers that wizard (argh) dialog to select. One chosen, EA starts complaining by popping up a message box telling that it does not like "UML::metaclass". Well, what? The created metaclass now has "UML Standard Profile::Metaclass" standing in the stereotype. Not a ghost one. And of course the quick linker does not recognize it (thus not offering Extenstion).

Well, while writing I changed the case for metaclass
Code: [Select]
          <Tag name="UML::Metaclass" default="Metaclass"/>
 

and now that shows the correct icon and does no longer complain. But still it creates no ghost metaclass but a "UML Standard Profile::Metaclass". The QL issue is the same.

I already went up the road defining my own stereotype and metaclass in my profile. Those showed up correctly in the toolbox and worked as expected. However, trying to add a metarelationship to show Extension between both did nothing.

So, what shall I do (except cursing)? I just need to add that metarelationship...

q.

P.S. When addding the constraint I tried something like this:
Code: [Select]
<Stereotypes>
<Stereotype name="stereotype" notes="" isAbstract="true">
<metarelationships>
<metarelationship metaclass="Generalization" constraint="UML Standard Profile::Metaclass"/>
</metarelationships>
</Stereotype>
...
but the Generalization did not show between ghost "stereotype" and the "UML Standard Profile::Metaclass"
« Last Edit: October 21, 2021, 03:04:27 am by qwerty »