Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: AndyJ on May 26, 2011, 08:41:47 am

Title: Is it possible to merge two classes into one?
Post by: AndyJ on May 26, 2011, 08:41:47 am
Good morning everyone...

The current project involves a number of Business Analysts who are working on separate parts of the problem definition phase...

We're currently creating domain models (class diagrams) and will often be in a position where a single entity will be "discovered" by more than one BA.

Where we later find two classes (on multiple diagrams) which should be a single class...

Is there a method for merging two classes into one?

Andy
Title: Re: Is it possible to merge two classes into one?
Post by: Geert Bellekens on May 26, 2011, 06:19:28 pm
Andy,

Because of a mess-up with a shared part of our models, and the option "Strip GUIDs" (before we introduced version control) I had the same challenge to "merge" different versions of the same elements.
I ended up writing a tool in C# to fix up all references.
I remember having to change
- connectors
- attribute types
- parameter types
- diagramObjects
- objects (using an element to merge as classifier)

Geert

(unfortunately I'm unable to share the code as it belongs to my client)
Title: Re: Is it possible to merge two classes into one?
Post by: AndyJ on May 27, 2011, 08:39:49 am
Thanks Geert,

So far we've managed to avoid having to do any coding associated with EA...

I think I'll stress to the team, the difficulty of manually rounding up all occurrences of a duplicated class, and the required analysis to make sure that they are indeed identical "things" and the manual steps required to replace all instances of one class with another class on all models.

Andy