Author Topic: association name in class diagramm  (Read 693 times)

.Net Developer

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
association name in class diagramm
« on: April 15, 2008, 03:55:58 am »
How can I write an association name in a class diagram with a  direction?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: association name in class diagramm
« Reply #1 on: April 15, 2008, 08:18:46 am »
Right-click the text of the association name - not the association itself - and from the context menu choose Direction from the context menu. You'll get a sub-menu that allows you to set or clear the direction. An indicator will appear after you exit the dialog.

It can be a bit tricky to right-click the text without accidentally selecting the association. If you notice the association becomes selected then you have the wrong context menu.

I find it can help to select the text first. Then release the mouse and try the right-click on the corner of the text farthest from the association line. [I still 'miss' and get the association about 1/3 of the time, but I'm convinced this is an improvement...]

HTH, David
No, you can't have it!

.Net Developer

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: association name in class diagramm
« Reply #2 on: April 15, 2008, 10:44:30 pm »
Thank you for your answer.

Is there any possibility to have two different descriptions with direction?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: association name in class diagramm
« Reply #3 on: April 16, 2008, 12:59:01 am »
Perhaps. Try creating role names for each end and setting the direction.
No, you can't have it!

Torsten Binias

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: association name in class diagramm
« Reply #4 on: April 16, 2008, 05:51:40 pm »
Quote
Try creating role names for each end and setting the direction.

I wouldn't recommend that.
Consider that role names are different from the association name. EA will use the role name for code generation. Furthermore it is not compaint with the UML specification (at least to my knowledge).

If you want to descibe the association in more detail you can use the "Notes" in the property dialog of the association or create an "external" note.

Best regards,
Torsten

.Net Developer

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: association name in class diagramm
« Reply #5 on: April 16, 2008, 10:06:08 pm »
Thanks!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: association name in class diagramm
« Reply #6 on: April 17, 2008, 12:42:42 am »
Quote
Quote
Try creating role names for each end and setting the direction.

I wouldn't recommend that.
Consider that role names are different from the association name. EA will use the role name for code generation. Furthermore it is not compaint with the UML specification (at least to my knowledge).

If you want to descibe the association in more detail you can use the "Notes" in the property dialog of the association or create an "external" note.

Best regards,
Torsten
Torsten's right IMHO,

I wouldn't recommend it either. But the question was not what I recommended but whether it was possible.

That's why I said "try" instead of publishing the results of the trial. I was not going to do the trial myself...

David
No, you can't have it!

Torsten Binias

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: association name in class diagramm
« Reply #7 on: April 17, 2008, 05:11:11 pm »
Quote
But the question was not what I recommended but whether it was possible.

Perfectly correct!

Sorry David, I didn't mean to critizise you. I just wanted to be sure, .Net developer knows about the consequences.

Best regards,
Torsten

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: association name in class diagramm
« Reply #8 on: April 17, 2008, 09:55:52 pm »
None taken Torsten. And I agree with your additional caution to anyone trying this.
No, you can't have it!