Book a Demo

Author Topic: Can two classes from different models be merged?  (Read 2415 times)

MikeS

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • It works on my machine....
    • View Profile
Can two classes from different models be merged?
« on: September 14, 2005, 04:14:57 pm »
Hello

Is it possible to merge two classes from different models together?

For example, if two developers were to reverse engineer the same class, Foo, into their own EA models.  In addition, they create their own diagrams referencing class Foo.

Can Foo, along with the referencing diagrams, be merged into one model?

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Can two classes from different models be merge
« Reply #1 on: September 14, 2005, 05:49:32 pm »
You might be able to get something to work with UML Patterns. Save one diagram as a pattern, setting the "Merge" option for Foo and the "Create" option for anything else, then drop it onto the target diagram. The user guide will tell you how to do it. Give it a go and see if it does what you need (save all your work first, of course). Any questions, please ask.
The Sparx Team
[email protected]

MikeS

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • It works on my machine....
    • View Profile
Re: Can two classes from different models be merge
« Reply #2 on: September 15, 2005, 07:04:18 am »
Thanks for the help!

I gave UML Patterns a try, creating a pattern from one model and applying it to the other.  Everything merged/created as expected, except for relationships.  Relationships that existed in both the pattern and target model were duplicated.  Easy to clean up unless you're attempting to merge a large class library....  

Merging classes using UML Patterns comes close to what I need; however, is it a bit of a 'bastardization' of the intended use of UML Patterns?  Also, I did not try this with sequence diagrams that contain objects classified by the classes in one of the models, so I'm not sure how well this would work.