Book a Demo

Author Topic: Linking a method on a class to another diagram  (Read 6869 times)

dirc

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Linking a method on a class to another diagram
« on: March 10, 2006, 07:27:04 am »
I posted something on this ages ago, but can't for the life of me find it!

Basically, I would really like to be able to somehow link a method on a class in a class diagram to a sequence diagram which shows how the method works. On the sequence diagram, I'd like to add a link the other way.

Then, when you view the class diagram, you will be able view the sequence diagram for the method then navigate back to the class diagram.

Is this possible, even by devious means?
dirc

thomaskilian

  • Guest
Re: Linking a method on a class to another diagram
« Reply #1 on: March 10, 2006, 09:38:09 am »
Place a hyperlink near the class with a reference to the sequence diagram. So you will be able to create more than one reference (your method might appear in more than one diagram).

dirc

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: Linking a method on a class to another diagram
« Reply #2 on: March 11, 2006, 02:21:32 am »
I have used hyperlinks on a diagram, but this is not a very elegant solution.

I want to do it on the class itself, so that whatever diagram it appears in, you can navigate to the sequence diagram.
dirc

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Linking a method on a class to another diagram
« Reply #3 on: March 11, 2006, 05:05:15 am »
Hi,

a little workaround... create a diagram under the class and set the class as a Composite Element. Place the hyperlinks on the diagram under the class.
This way, whichever diagram the class is on, double-clicking on the class will take you to the kyperlinked diagram.

Hope this helps!
Bruno

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Linking a method on a class to another diagram
« Reply #4 on: March 11, 2006, 11:57:59 am »
Quote
Hi,

a little workaround... create a diagram under the class and set the class as a Composite Element. Place the hyperlinks on the diagram under the class.
This way, whichever diagram the class is on, double-clicking on the class will take you to the kyperlinked diagram.

Hope this helps!
Bruno


What do you mean by "create a diagram under the class?".  Does the class element overlay the diagram or does it appear higher on the diagram page?

Can you step me through the process?
Thanks
Verbal Use Cases aren't worth the paper they are written upon.

thomaskilian

  • Guest
Re: Linking a method on a class to another diagram
« Reply #5 on: March 12, 2006, 06:39:13 am »
I guess, Bruno meant to create the diagram as sub-element of a class (right click class in project view/Add xy Diagram)

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Linking a method on a class to another diagram
« Reply #6 on: March 12, 2006, 10:59:51 am »
Yes, that's what I meant :-) Thanks, Thomas!
Also, when you set the class as a Composite Element (right-click, them menu Advanced Settings > Composite Element), a diagram underneath the class will automatically be created for you.

Bruno


Quote
I guess, Bruno meant to create the diagram as sub-element of a class (right click class in project view/Add xy Diagram)


jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Linking a method on a class to another diagram
« Reply #7 on: March 12, 2006, 03:17:42 pm »
When you say composite element on a class, is that the same thing as a UML composite structure?
« Last Edit: March 12, 2006, 03:18:43 pm by jeshaw2 »
Verbal Use Cases aren't worth the paper they are written upon.

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Linking a method on a class to another diagram
« Reply #8 on: March 12, 2006, 04:19:28 pm »
No, it is not. Please see my description above.

Bruno

Quote
When you say composite element on a class, is that the same thing as a UML composite structure?


jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Linking a method on a class to another diagram
« Reply #9 on: March 12, 2006, 04:27:59 pm »
Ah!  I missed that..

It is the UML element that is a composite not the class being modeled.

Thanks
Verbal Use Cases aren't worth the paper they are written upon.

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Linking a method on a class to another diagram
« Reply #10 on: March 12, 2006, 05:35:35 pm »
Hi Jim

yes, that's it! Sorry for not having been clear on the first place.

Bruno