Book a Demo

Author Topic: Initial values cut off in class diagram  (Read 8655 times)

RoNe

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Initial values cut off in class diagram
« on: March 15, 2016, 11:00:56 pm »
Hello,

I am facing a confusing issue where I am not sure if this is a bug or I just do not know the correct handling.

I created a class diagram with a new attribute: Teststring of type String. I set the initial value to "ThisIsMyNewTestString", and this value is cut off in the diagram.



This happens although there is obviously more than enough space to write out the whole initial value. Enlarging the object does not help. Is there any possibility to avoid this problem? It is quite annoying if the longer strings are cut off, even if enough space is existing...

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Initial values cut off in class diagram
« Reply #1 on: March 15, 2016, 11:10:03 pm »
I don't think there's anything you can do except for writing your own shapescript.

Geert

RoNe

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Initial values cut off in class diagram
« Reply #2 on: March 15, 2016, 11:40:19 pm »
I see, thank you.

If I want to write such a shape script, is there a way to access the default script of a class diagram and just modify it? Or do I have to start from scratch?

I know that I can use drawnativeshape() as a command, so maybe there is a description of what this command is doing in case of a class object?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Initial values cut off in class diagram
« Reply #3 on: March 15, 2016, 11:50:53 pm »
I don't think the default class shape is available as script somewhere.

I'm not even sure it exists as such. But you can always ask Sparx if they have something like that.
Like my grandmother used to say "No you have already, Yes you might become" (translated from Dutch)

Geert

RoNe

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Initial values cut off in class diagram
« Reply #4 on: March 16, 2016, 12:02:22 am »
Okay, I will check if writing a shape script leads me anywhere, or if the desired result is really worth the trouble.

Thank you anyway.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Initial values cut off in class diagram
« Reply #5 on: March 16, 2016, 01:33:14 am »
Don't go astray... Tidbits like the one you want are no real fun with shape script. There are quite some good uses for it, though.

q.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Initial values cut off in class diagram
« Reply #6 on: March 16, 2016, 06:48:25 am »
Hello,

I am facing a confusing issue where I am not sure if this is a bug or I just do not know the correct handling.

I created a class diagram with a new attribute: Teststring of type String. I set the initial value to "ThisIsMyNewTestString", and this value is cut off in the diagram.



This happens although there is obviously more than enough space to write out the whole initial value. Enlarging the object does not help. Is there any possibility to avoid this problem? It is quite annoying if the longer strings are cut off, even if enough space is existing...

Have you tried changing the resizing options before resizing?  Ctrl + Shift + Y


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Initial values cut off in class diagram
« Reply #7 on: March 16, 2016, 08:21:40 am »
There is no solution to this in the current version of EA.

Shape scripts won't help. The only way to render attributes is by calling drawnativeshape, which draws everything exactly as you're seeing.

Changing the resize options doesn't have any effect. It always displays the same amount of the default value unless it needs to be truncated earlier.

RoNe

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Initial values cut off in class diagram
« Reply #8 on: March 16, 2016, 08:38:25 pm »
Thank you for clarification. So I will just accept this as it is and add the cut off values in a note.

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Initial values cut off in class diagram
« Reply #9 on: March 18, 2016, 02:32:52 pm »
Why not put in a feature request?
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.