Bother, I've not managed to display tags with a shape script. I like the sound of qwerty's suggestion but I can't work out how to write the shape script.
Ideally I'd like the element to be drawn "as normal" but with the addition of a new compartment for the tags I want to always show.
This help topic looks like exactly what I want:
http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/add_custom_compartments_to_ele.htmlHowever that appears to be for "child elements" whereas I'm working with this-element's tags. I've read all(?) the other related help topics and examples, searched the forum and looked at the ebook:
https://leanpub.com/shapescriptI've tried building the shape "from scratch". Like this:
shape main
{
rectangle(0,0,100,100);
addsubshape("namecompartment", 100, 30);
addsubshape("tagscompartment", 100, 30);
addsubshape("notescompartment", 100,40);
shape namecompartment
{
h_align = "center";
//rectangle(0,0,100,30);
println("<<#stereotype#>>");
println("#name#");
}
shape tagscompartment
{
//rectangle(0,0,100,30);
println("MyTag_1: #TAG:MyTag_1#");
println("MyTag_2: #TAG:MyTag_2#");
}
shape notescompartment
{
//rectangle(0,0,100,40);
SetCompartmentName("notes");
println("#notes#");
}
}This looks close but I've a couple of issues I need help with:
1) How do I get the stereotype and name (in the namecompartment) to be drawn in bold font?
2) How do I draw the notes in gray color, italic font?
3) How do I position the compartments correctly (vertically) and have horizontal lines between them? (Note I've commented out calls to rectangle in the script above... I don't know how/where to position them).