Book a Demo

Author Topic: Set base class of custom stereotype in MDG Technology Profile  (Read 3282 times)

ea0220

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Hi,

I have several stereotypes extending object and want to create a custom toolbox so that I can drag and drop object instances of a certain class(es).
Is there an option to set the stereotype's base class so that these objects are instances of a certain class?
And if this option exists, how can I do that?

Example:
Let's say I have a Testcase stereotype extending object. Can I change that so that each Testcase object is an instance of my class Testcase?

Background is that I'd like to drag and drop object instances of certain classes using a custom toolbox.

Greetings

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Set base class of custom stereotype in MDG Technology Profile
« Reply #1 on: July 02, 2020, 08:59:53 pm »
No, you can't.

You are mixing meta-model with model elements. Your "certain" classes are not meta-classes but regular model classes, which you can't access in your meta-model.

The best you can do is link your instance stereotype with your classifier stereotype.
If you then drag a element of your classifier stereotype onto a diagram and choose to drop is as an instance, it will automatically get the instance stereotype.

Geert

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Set base class of custom stereotype in MDG Technology Profile
« Reply #2 on: July 03, 2020, 08:53:59 am »
What you are wanting to do is the same thing as SysML does with Unit and QuantityKind.

It's not quite as easy (for you or your users) as a simple stereotype, but it can be done.

You need:
  • A model wizard pattern for the actual classes that you want included in the user model.
  • A pattern for an instance of one of those classes
  • Add <technologyname>::<patternname>(UMLPatternSilent) to your toolbox. (You can also use UMLPattern so the dialog shows)
  • Users will need to import the model pattern and then they should be able to use the toolbox item.

ea0220

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Set base class of custom stereotype in MDG Technology Profile
« Reply #3 on: July 04, 2020, 12:31:58 am »
Thanks for the answers.

Considering the necessary steps and the ease of use for end users we'll refrain from that approach.
You need:
  • A model wizard pattern for the actual classes that you want included in the user model.
  • A pattern for an instance of one of those classes
  • Add <technologyname>::<patternname>(UMLPatternSilent) to your toolbox. (You can also use UMLPattern so the dialog shows)
  • Users will need to import the model pattern and then they should be able to use the toolbox item.

Greetings