Book a Demo

Author Topic: v15.2 – Can we create an extended stereotype from Toolbox?  (Read 6578 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
v15.2 – Can we create an extended stereotype from Toolbox?
« on: March 30, 2021, 07:52:10 pm »
As mentioned elsewhere, we use special (supplemental) stereotypes to extend the metatype for specific purposes in a structured way.  We can [Ctrl-Drag] from the toolbox onto an existing item or via the Properties Window etc. and the supplemental stereotype will be applied to the item.

Is it possible to create an extended stereotype (such as you'd see in t_object.StereotypeEx) from the toolbox?  For example (something like),
Code: [Select]
<Tag name="mainstereo,suppstereo" type="" description="" unit="" values="" default="Extended stereotype"/>

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

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – Can we create an extended stereotype from Toolbox?
« Reply #1 on: April 08, 2021, 04:11:37 pm »
[BUMP]

Anybody?

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

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: v15.2 – Can we create an extended stereotype from Toolbox?
« Reply #2 on: April 09, 2021, 08:04:52 am »
You can't drop more than one stereotype at a time from the toolbox, unless you use an addin.
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – Can we create an extended stereotype from Toolbox?
« Reply #3 on: April 09, 2021, 10:29:25 am »
You can't drop more than one stereotype at a time from the toolbox unless you use an add-in.
Thanks, Neil, I suspected the same.

AFAYK is there any structural reason why it couldn't be done by EA natively (I guess not, since you say we could do it with an Add-in).  If there's not, I'll put in a feature request.

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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: v15.2 – Can we create an extended stereotype from Toolbox?
« Reply #4 on: April 09, 2021, 11:17:57 am »
One possibility to consider is using a pattern to do this.

You define a pattern with a single element that has both stereotypes, then in the toolbox use Technology::Pattern(UMLPatternSilent).

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – Can we create an extended stereotype from Toolbox?
« Reply #5 on: April 09, 2021, 02:00:04 pm »
One possibility to consider is using a pattern to do this.

You define a pattern with a single element that has both stereotypes, then in the toolbox use Technology::Pattern(UMLPatternSilent).
That's interesting Eve,

I'll give it a try when I get enough time to "scratch myself".
Are you able to supply a bit more of the supporting infrastructure

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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – Can we create an extended stereotype from Toolbox?
« Reply #7 on: April 21, 2021, 03:36:20 pm »
One possibility to consider is using a pattern to do this.

You define a pattern with a single element that has both stereotypes, then in the toolbox use Technology::Pattern(UMLPatternSilent).
Thanks, Eve,
I've now had a little time to "scratch myself" or more particularly, scratch the EA Patterns mechanism.  Your suggestion works but seems to require a diagram per pattern which generates a unique XML per pattern.  Is there any way to bundle these patterns up so that (similar to emitting a folder based profile, I can emit a folder of such diagrams (or any other mechanism) to reduce the number of files?  If we take this up, then there will be quite a number of patterns.

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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: v15.2 – Can we create an extended stereotype from Toolbox?
« Reply #8 on: April 21, 2021, 03:54:54 pm »
Yes, the easiest approach will be to have a separate diagram defining each one that would need to be exported. You can theoretically mark other elements on the diagram as not included in the pattern, but that is probably just a likely source of error.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – Can we create an extended stereotype from Toolbox?
« Reply #9 on: April 21, 2021, 04:59:40 pm »
Yes, the easiest approach will be to have a separate diagram defining each one that would need to be exported. You can theoretically mark other elements on the diagram as not included in the pattern, but that is probably just a likely source of error.
In theory, you can deselect a vertex, but in practice, you can't.  Try it...

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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: v15.2 – Can we create an extended stereotype from Toolbox?
« Reply #10 on: April 22, 2021, 09:09:53 am »
Okay, my mistake. I haven't used that dialog in quite a long time.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 – Can we create an extended stereotype from Toolbox?
« Reply #11 on: April 22, 2021, 10:02:24 am »
Okay, my mistake. I haven't used that dialog in quite a long time.
Nor had I, I used it in some experimentation on the topic and discovered the issue.

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