Book a Demo

Author Topic: Association to "used" classes not visible  (Read 4705 times)

TomerlandHome

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Association to "used" classes not visible
« on: August 14, 2006, 08:13:56 am »
Dear users,

I have a question to the display of association arrows, when reverse-engineering with C#

If a  class  contains (composite) a instance of another class, then an association is displayed in a class diagram. This is what I expect.

Code: [Select]

public class C_B {
     public someFkt() {}
}


public class C_A {
  // this is a class-member
   C_B m_instOfB;
}





If the same class just "uses" another class then no association-arrow is displayed and I have to draw manually an association (e.g. as dependency-association) if I want to have it on a diagram

Code: [Select]

public class C_Used {
    public void someFkt() {}
}


public class C_A {
   
    // just used here and not a classmember
    C_Used instUsed = new C_Used();
    instUsed.someFkt();
}




How can I convince EA to display "used" classes with an arrow-association; e.g. with an dependency-arrow.

I consider this as a very important feature for reverse engineering because it shows me all class-dependencies and not only "composite" dependencies


Kind regards


« Last Edit: August 14, 2006, 12:20:59 pm by TomerlandHome »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Association to "used" classes not vi
« Reply #1 on: August 14, 2006, 03:12:18 pm »
Are you talking about when a class is used only within the body of a method?

If so, then I'm afraid EA doesn't parse the method bodies and as a result can't create these dependencies for you.

If not, could you try explaining it a different way?

TomerlandHome

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Association to "used" classes not vi
« Reply #2 on: August 15, 2006, 04:02:39 am »
Hallo,

first: Thanks for your answer.

What you write, is exactly what I mean (e.g. using a class within a body of a method).



May be this is a new feature which could/should/may be added to EA. Let me try to explain my point.

One of the core-tasks of architects is to manage/detect the dependencies in SW-components. And for this task it is crucial also to get all the "using"-Dependencies.


With kind regards

JohnWSaundersIII

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Association to "used" classes not vi
« Reply #3 on: August 15, 2006, 09:37:20 am »
In your post, instUsed might be indicated by a dependency between classes C_A and C_B, but not by an association.
John Saunders