Book a Demo

Author Topic: Enabling sequence numbering on existing diagrams  (Read 5574 times)

netripper

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Enabling sequence numbering on existing diagrams
« on: December 10, 2007, 05:33:28 am »
Hi there,

We are currently facing a problem when enabling sequence numbering in EA in an existing diagram. I think it is best explained by an example. See the images below.

We currently have sequence numbering disabled.


For documentation purposes we want to enable sequence numbering. However, all method labels are affected as visibel in the following image.


For a few diagrams it's not such a problem to manually enlarge the label boxes. However, we have hundreds of diagrams that need sequence numbering.

Is there a workaround to prevent the labels from having line breaks or to automate the 'enlarging of label boxes'?

We are currently using EA 7.0.816 (build 816).

Thanks in advance.
- Martijn

thomaskilian

  • Guest
Re: Enabling sequence numbering on existing diagra
« Reply #1 on: December 10, 2007, 05:44:43 am »
I'm afraid you will need to write an add-in to do the job.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Enabling sequence numbering on existing diagra
« Reply #2 on: December 10, 2007, 08:04:48 am »
Just a guess here...

Can you turn off sequence numbering? [That is, do you need it for corporate standards, or are the numbers used elsewhere in your model?] If not, then perhaps removing the space after the number will cause EA not to word wrap the label.

I know that's far from perfect, but it might get you through the current crunch, while we see if Sparx can come up with an option to not word wrap.

David
No, you can't have it!

netripper

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Enabling sequence numbering on existing diagra
« Reply #3 on: December 10, 2007, 10:46:19 am »
We had turned off sequence numbering previously, as we didn't expect to use it. However, now we are documenting many sequence diagrams for additional clarification. This requires the numbering.

We want to use the auto-numbering instead of numbering manually (I suspect that's what you are suggesting), so that if any calls are added to a diagram, we won't have to renumber everything. Besides, manual numbering would still require to modify all labels by hand. This is simply too much work.

I'm currently checking if I can make an add-in myself to do this on a per-diagram base (add a button to fix all labels). If I got anything, I'll post it. I'll have to figure out how to get to the proper data and it's my first time using interop ;)

I also found another topic with bugs and feature requests. Point 4 of the first post is a feature request for non-breaking labels. He mentions he sent the feature request via official ways. This was posted July 2007. It'd be nice if Sparx would grant the request.

I was hoping for some option or trick I had missed and you guru's could point out to me. :)

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Enabling sequence numbering on existing diagra
« Reply #4 on: December 10, 2007, 11:23:37 am »
Sigh...

I think you'll get a space after an automatic number, no matter what you do.

Perhaps an add-in could walk through the diagram after the numbers were assigned, and replace the space with (for example) an underscore. You'd have to try this, though. For all I know EA might just render the number and space before your joined string. [However, perhaps you could turn numbering off at that point...]

Meanwhile, 7.1 should beta any time now. Perhaps this requirement made the list.

David
No, you can't have it!

netripper

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Enabling sequence numbering on existing diagra
« Reply #5 on: December 10, 2007, 11:37:57 am »
I see what you mean. We could implement the numbering ourselves using the underscore. However, we also have connections that are not described by a method name, but by a few words. All spaces would need to be converted to underscores. I don't think it'd look so nicely anymore. Thanks for thinking along though, much appreciated. :)

With an add-in I'm going to try another approach. When the 'multiline' problem in a label occurs, you can manually fix it by selecting the label belonging to the method arrow (connection) and dragging the box larger. I'll try to make my add-in find all connections in a diagram and automatically make them 100px (or similar) wider.

netripper

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Enabling sequence numbering on existing diagra
« Reply #6 on: December 14, 2007, 05:15:33 am »
Just an update.

I have solved my problem by writing an Add-In which increases the width of the labels associated to all connectors in a diagram.

The add-in can be downloaded from my website (direct link). Source code will also be available there in a few days.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Enabling sequence numbering on existing diagra
« Reply #7 on: December 14, 2007, 05:41:55 am »
Hi netripper,

Can you also post it on the EA User Wiki?

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