Book a Demo

Author Topic: Can’t display hidden label for Constraint  (Read 5647 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Can’t display hidden label for Constraint
« on: August 23, 2017, 10:03:31 am »
We're naming our UML Constraints - so we can tell one from the other.  This will produce a Label.  However, once the label is suppressed (either intentionally or otherwise) there is no mechanism to recover it and make it visible again.

Please Rectify!
Report,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Can’t display hidden label for Constraint
« Reply #1 on: August 23, 2017, 12:10:52 pm »
Constraints don't display a name (in a separate label or otherwise)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Can’t display hidden label for Constraint
« Reply #2 on: August 23, 2017, 04:56:49 pm »
Constraints don't display a name (in a separate label or otherwise)
Tell that to my repository.  I can even (and have) coloured them up.

I haven't figured out how to get it to show, but it does (under, as yet, undetermined circumstances)  ...

Even if constraints notionally don't (currently) display their name if assigned, they should!

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Can’t display hidden label for Constraint
« Reply #3 on: August 23, 2017, 05:55:31 pm »
In OCL (AFAIK) constraints do have a name. More and more people seem to use OCL. So it would be a good way to add OCL constraints using the name attribute. Just a thought.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Can’t display hidden label for Constraint
« Reply #4 on: August 24, 2017, 09:36:56 am »
In OCL (AFAIK) constraints do have a name. More and more people seem to use OCL. So it would be a good way to add OCL constraints using the name attribute. Just a thought.

q.
Thanks, qwerty,

I thought of that but two reasons why not.
  • Narrative Constraints are, typically, MUCH longer than names.  Anyway, names are identifiers, constraints are descriptive.  There's a semantic mismatch.
  • This bug means I can't display it when I need to and not when I don't.

BTW: I've had a think about why the (name) label is sometimes visible, but I don't have time to follow it up at present.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Can’t display hidden label for Constraint
« Reply #5 on: August 24, 2017, 04:58:52 pm »
You could stereotype your notes and apply a shape script.
Code: [Select]
shape main {
DrawNativeShape();
print("#name#");
}

q.
« Last Edit: August 24, 2017, 05:03:29 pm by qwerty »

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Can’t display hidden label for Constraint
« Reply #6 on: August 25, 2017, 03:13:04 pm »
If you set Rectangular Notation (in this case via script) the note displays, if not in Rectangular, it doesn't.  So now I can show/hide it at will, so to speak (since my shapescript - and it is a stereotyped Constraint - makes no distinction between Rectangular and Non-Rectangular).

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!