Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: Paolo F Cantoni on May 22, 2012, 03:33:42 pm
-
If a shape script is set up to hide labels, and functions correctly for non-reflexive relationships; it will fail for reflexive relationships.
This is because the labels are different on reflxive relationships than on non-reflexive.
There is NO mechansm to determine within a shapescript if the arc is refelxive or not.
EAUI all round...
Reported,
Paolo
-
I'd strongly recommend against using hidelabel at all as the effect persists even if hidelabel is no longer called (eg. stereotype removed)
Instead override the label and print an empty string. Hiding the label in this way will work for reflexive relationships and doesn't have any known negative repercussions.
-
I'd strongly recommend against using hidelabel at all as the effect persists even if hidelabel is no longer called (eg. stereotype removed)
Instead override the label and print an empty string. Hiding the label in this way will work for reflexive relationships and doesn't have any known negative repercussions.
I understand what you're saying, but which label do I override? The one for the non-reflexive setting or the one for the reflexive one - since the same information appears in different labels depending upon the reflexiveness.
Paolo
-
As soon as you override any label in a shape script the labels operate the same for reflexive and non-reflexive.
-
As soon as you override any label in a shape script the labels operate the same for reflexive and non-reflexive.
As far as I can see Simon, you're not understanding what I'm saying (or perhaps asking): the stereotype appears in label "Middle Bottom Label" (as reported using: <Context menu> |Visibility >Set Label Visibility...) for an non-reflexive and in "Middle Top Label" for a reflexive relationship. So, if I want to suppress the stereotype, which label do I use in the shape script?
Paolo
-
No... I understand exactly, and you haven't tried what I suggested.
Just add shape middlebottomlabel
{
print ("");
}
to a shape scripted connector. Move it around between objects including so that it's reflexive. It works.
-
No... I understand exactly, and you haven't tried what I suggested.
Just add shape middlebottomlabel
{
print ("");
}
to a shape scripted connector. Move it around between objects including so that it's reflexive. It works.
It's pistols at dawn! :P
Nowhere, until now, did you explicitly say: use the label applicable to the non-reflexive relationship and it will automatically apply to the reflexive one. If you did, please indicate.
I'll give it a try and confirm back...
Paolo
-
Pistols at dawn? Does that mean I have a 3 hour headstart?
As soon as you override any label in a shape script the labels operate the same for reflexive and non-reflexive.
-
Pistols at dawn? Does that mean I have a 3 hour headstart?
As soon as you override any label in a shape script the labels operate the same for reflexive and non-reflexive.
Sorry, that's not explicit enough. As you know by now, I'm pretty much of a literalist. The above statement just says they operate the same, but it doesn't say which one to override. In fact, if one were to analyse the order of terms, one would be forgiven for assuming the reflexive label shoudl eb the one to be used.
My point about dawn is pertinent - I didn't specify which dawn... :-*
Have a good weekend,
Paolo
[edit]Confirmed that creating the additional shapes and printing empty strings for the non-reflexive labels carries over into the reflexive ones.[/edit]