A new feature of EA 6 is you can assign a shape script for the stereotype. Here's how...
From the main menu, Settings | UML | Stereotypes. Find and select the stereotype in the list, or create a new one. Select the "Shape Script" radio button and click "Assign". Enter your shape script, click "Refresh" to make sure it looks how you like, then click "OK", then "Save" and "Close".
So what should the shape script look like. Here's a very simple example to put a pale yellow rectangle in the top-right corner of an element:
Decoration Testing
{
Orientation="NE";
SetFillColor(255,255,200);
StartPath();
Rectangle(0,0,80,100);
EndPath();
FillAndStrokePath();
}
The orientation command positions the decoration according to compass position. Valid values are N, S, E, W, NE, NW, SE, SW and CENTER. The rectangle command works with percentage values. Decorations are a fixed size so this script draws a rectangle the full height but 80% of the width of a full-sized decoration. The startpath, endpath and fillandstrokepath commands when used together will fill whatever is drawn between the start and end with the defined fill colour (which is defined as a standard RGB value).
Shape scripts can have conditional logic based on most of the properties of the chosen element, and there's a large variety of drawing commands available. I don't think the help for shape scripts is finished yet, so we will give any assistance you need - just let me know what shape you want and I'll have a go...
