enterprise architect - Issue with Applying Custom Stereotype to Classes and Packages - Stack Overflow

admin2025-04-18  2

I'm trying to create a new stereotype to be applied to both classes and packages.

To achieve this, I've used the "Profile helper" -> "Add Stereotype."

I've added a custom stereotype to my toolbox and generated it. It works correctly when I add the stereotype to packages or manually add it to a class. However, it fails to work when I try to drag and drop it into the diagram to create a new element.

Is this functionality not supported? I've seen it work in some projects, but I'm not familiar with the metamodel behind it.

Can anyone explain why this might be happening and how to fix it?

I'm trying to create a new stereotype to be applied to both classes and packages.

To achieve this, I've used the "Profile helper" -> "Add Stereotype."

I've added a custom stereotype to my toolbox and generated it. It works correctly when I add the stereotype to packages or manually add it to a class. However, it fails to work when I try to drag and drop it into the diagram to create a new element.

Is this functionality not supported? I've seen it work in some projects, but I'm not familiar with the metamodel behind it.

Can anyone explain why this might be happening and how to fix it?

Share edited Jan 31 at 8:33 Geert Bellekens 13.8k3 gold badges29 silver badges55 bronze badges asked Jan 30 at 14:04 PB17PB17 353 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

The problem is that EA doesn't know which UML base type is needs to create when selecting your stereotype.
It could be either a Package, or a Class.

What you need to do is create a toolbox profile, with two separate entries, one for Class, and one for Package.

Then generate the toolbox as a UML profile and add the toolbox and stereotype profiles to an MDG Technology.

See the manual for more info.

转载请注明原文地址:http://www.anycun.com/QandA/1744914613a89415.html