Book a Demo

Author Topic: Same name, different stereotypes?  (Read 3496 times)

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Same name, different stereotypes?
« on: March 12, 2006, 06:22:17 pm »
When I create a class element on different diagrams (in different packages) having the same name, but different stereotypes, they both appear in the project window (eg., <<A>>myClass and <<B>>myClass.  I like this, but not knowing EA's internal logic, am I setting myself up for problems later in the way EA will be dealing with these classes? (perhaps at code generation time?)

Thanks
Jim
Verbal Use Cases aren't worth the paper they are written upon.

thomaskilian

  • Guest
Re: Same name, different stereotypes?
« Reply #1 on: March 12, 2006, 10:39:06 pm »
Hi Jim,
jow can you create ONE element on DIFFERENT diagrams with DIFFERENT stereotypes? To my knowledge you have to have one element per used stereotype.

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Same name, different stereotypes?
« Reply #2 on: March 13, 2006, 03:23:55 am »
Actually, In one package I dragged a class element from the toolbox onto a diagram, named it "ATM_Machine" and set the stereotype property to "<<Variant>>".  On another diagram, in another package, I did the same thing, but gave it stereotype "<<WallMounted>>".
Verbal Use Cases aren't worth the paper they are written upon.

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Same name, different stereotypes?
« Reply #3 on: March 13, 2006, 03:31:05 am »
Which means you have two unrelated elements that just happen to have the same name. I can not think of any issues with code geenration or anything else, as duplicate names of elements are nothing unusual.

Bruno

thomaskilian

  • Guest
Re: Same name, different stereotypes?
« Reply #4 on: March 13, 2006, 04:06:18 am »
Jim,
Bruno is right. Select either element and use ALT-G to navigate to the project view. You will find two different elements - with the same name. It is even possible to have to elements with the same name in one package. Although this is not illegal, it could be used to confuse the Russians - or yourself when looking at the model after a while ;)