Book a Demo

Author Topic: reverse engineering associations  (Read 2623 times)

Bokkie

  • EA User
  • **
  • Posts: 80
  • Karma: +0/-0
  • Lima Bravo!
    • View Profile
reverse engineering associations
« on: April 23, 2007, 10:08:38 pm »
After reverse engineering a C# project EA interprets collections such as:

Code: [Select]

public class ABC
{
 private List<DEF> _def;


as an attribute of the class ABC. In some cases I would like it to appear as an association. Is there an easy way to control whilst reverse engineering or promote an attribute to an association?

Regards,

M.
Lima Bravo!

michael.venema

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: reverse engineering associations
« Reply #1 on: April 26, 2007, 05:00:27 am »
I fear you'll have to manually create the appropriate association in an EA class view. Subsequently, you may edit this association and assign source resp. target role to the appropriate collection attribute. Will this help you?

Regards,

MV

sbrooke

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
  • Oscar Winning Rabbit
    • View Profile
Re: reverse engineering associations
« Reply #2 on: April 26, 2007, 07:45:33 am »
I have a similar problem with C++. If I manually add a composition connection between the container and the class, the connection is removed when I resync the class to code. Similarly, if I add a connection between the type class and the container, the connection is removed when the container is  resync'd with code.

The model validation does not seem to mind the connections in either case.

Next I tried including the container class as an instance rather than a simple link and then adding the composition connector. At least now, the resync with code does not remove the connection. I'm not sure what association I should have between the container and the type class. Does Dependency  or Realize make sense?

The associations with the container and it's class type are significant details I would like to appear in my class diagram. I cannot find much in the way of examples of parameterized class used within class diagrams.

Alternatively, if I wish to state that one class is composed of others without showing the detail of how it's implemented (container class) shouldn't I also be able to show that relationship that is reverse engineer compliant? What's up?
Steve