How to deal with stereotypes

Hi,
I’m currently dealing with custom stereotypes and need some help.
I’m able to add my stereotypes to the Model, by simply adding the stereotype

activityAction.addStereotype("Approved");

When I run the Plug-in this stereotype is added and also selected.
Is it, or how is it possible to access the stereotype, to select or deselect it?
Is it also possible to delete the default stereotypes?
I tried to remove the stereotypes by iterating through them and calling the

removeStereotype(IStereoType s)

method, but didn’t work.

With kind regards,

Michael

Hi,
have you found a way to remove the unwanted stereotypes?

IModelElement supports add/remove stereotype with String or IStereotype

void addStereotype(java.lang.String name)
void removeStereotype(java.lang.String name)
void addStereotype(IStereotype stereotype)
void removeStereotype(IStereotype stereotype)

ref:
https://www.visual-paradigm.com/support/documents/pluginjavadoc/com/vp/plugin/model/IModelElement.html#addStereotype(java.lang.String)

like this: