Book a Demo

Author Topic: Recognize relationships from generics in C#  (Read 2287 times)

Petr K.

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Recognize relationships from generics in C#
« on: November 05, 2009, 02:34:27 am »
When using generics in C#, relationships between classes do not seem to be properly recognized by EA when importing source code.

For instance:

public Class1 {
  public IList<Class2> SomeList {
    get {
      ....
      }
    }
}

Importing this code unfortunately does not generate a relationship between Class1 and Class2. Is there a way to make this work? Or am I doing something wrong?

Thanks in advance for your help,
Petr K.

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Recognize relationships from generics in C#
« Reply #1 on: November 05, 2009, 06:37:45 am »
Hi Petr,

If you choose 'Tools->Options' from the main menu and select your programming language under the 'Source code engineering' tree item, a dialogue appears on the right, to fill in language specifications. Near the bottom you'll find a button labeled 'Collection classes' that opens another dialogue, where you can specify your preferred language collection classes for the various multiplicity types. I'm not sure if this will affect reverse engineering of code also, and I'm aware this may not help with generics (since they're specific for their contained value types).

HTH (somehow)
Günther
« Last Edit: November 05, 2009, 06:38:12 am by g.makulik »
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/