Is it possible to replace the circled-letter with an <<interface>> stereotype?

0 votes
asked Nov 14, 2021 in Question / help by Omar Assadi
I was wondering if there is any way to switch from the circled "I" for interfaces with a stereotype instead. At the moment, I've sort of done an ugly hack of "hide circle" followed by "interface IObjectSerializer <<interface>> { ... }".

Alternatively, is there any way to define a procedure that will let me automate this a bit more? Or is it possible to alias the "interface" keyword with my own that already has the stereotype?

1 Answer

0 votes
answered Nov 14, 2021 by Martin (8,360 points)

To be honest your 'hack' is already pretty minimal, you turn off circles once, and then add <<interface>> to each interface - seems a reasonable payoff for your end result.

However, you could write this macro:

!unquoted procedure interface($i)
interface $i <<interface>>

Which would let you write your interface as:


Note that instead of "hide circle" which hides circles for everything you can use "hide interface circle" to only hide it for interfaces, or "hide <<interface>> circle" to only hide for your interface stereotype.