I would also like it for operations.
Yes! That would make sense.
I agree that
#ifdef is a constraint, and should be modeled as such, but 'xUML' tag isn't really a constraint in the UML model, or maps to one, does it?
Or should we think of TVs as kind of 'specialized' constraints? Then 'xUML' is a pretty broad one IMHO.
So it's still all about visibility of the attributes'/operations' constraints, right?
1. Following the UML (2.3) specs a constraint should render within braces after the elements textual notation:
7.3.10 Constraint (from Kernel)
For an element whose notation is a text string (such as an attribute, etc.), the constraint string may follow the element text
string in braces
'xUML' unfortunately doesn't (you can use the braces explicitly though).
2. Before everyone starts to use 'xUML' as a surrogate for rendered constraints, it should be implemented as a native feature of EA (=>
feature request) to select the constraints, that should be shown for an element feature (attribute,operation, maybe others ...) on a diagram (similar as with linked notes). This would keep UML constraints usable for other processes like transformations, code generation and model validation.
Just my 0.02 EUR,
Günther