Book a Demo

Author Topic: Sequence diagram with classes in different package  (Read 3329 times)

davijeb

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Sequence diagram with classes in different package
« on: August 03, 2012, 09:13:01 pm »
Hi,

I have a C# app with the classes arranged in a variety of packages.

Now, when I create a simple sequence diagram for package1.Class1 and package2.Class2 by dragging each onto the diagram frame and making each an instance.

Class1 has method1()
Class2 has method2()

I can make a self call from the Class1 instance to method1(. That all works fine. But when I do the same to the Class2 instance for method2() I see nothing.

I'm guessing this is because they are not in the same package but having to put all my classes under a single root seems ridiculous.

Any ideas what I need to do?

Cheers,

Jez

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Sequence diagram with classes in different pac
« Reply #1 on: August 03, 2012, 10:19:34 pm »
Must be something else and has nothing to do with the class location. Can you post a picture?

q.

davijeb

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Sequence diagram with classes in different pac
« Reply #2 on: August 03, 2012, 10:43:25 pm »
Sequence diagram is: http://tinypic.com/r/2s9do5e/6
Code generated is: http://tinypic.com/r/1mbs1/6
Message properties for self call on Promote class: http://tinypic.com/r/wrbdxt/6

I'd have expected the
Code: [Select]
anotherMethodName() call to have been included in the code generated.

Thanks

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Sequence diagram with classes in different pac
« Reply #3 on: August 03, 2012, 11:04:21 pm »
Maybe its the fact that instance and class live their own life. The instance in the diagram does not create a method in the class when you add a message. You need to to that the other way around: create the method in the class and then use it from the drop down.

I'm just guessing and may be completely wrong, though.

q.