Author Topic: Copying stereotypes  (Read 7084 times)

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Copying stereotypes
« on: January 07, 2014, 06:45:46 pm »
Is there a way to create a stereotype based no an existing one?
I would like to duplicate the table stereotype for other uses.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Copying stereotypes
« Reply #1 on: January 07, 2014, 08:30:32 pm »
You can export the table t_stereotypes and import it in the target repository.

q.

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Copying stereotypes
« Reply #2 on: January 07, 2014, 09:37:50 pm »
Or I could manipulate it.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Copying stereotypes
« Reply #3 on: January 07, 2014, 11:16:01 pm »
It won't work. It seems the "Table" stereotype is dealt with hard codded in EA. When opening the table there was nothing special I could relay on to copy it and have my new stereotype be a clone of it.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Copying stereotypes
« Reply #4 on: January 08, 2014, 12:42:46 am »
How did you "open the table"?

q.

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Copying stereotypes
« Reply #5 on: January 08, 2014, 02:55:08 am »
Access
Recursion definition:
If you don’t understand the definition read "Recursion definition".

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Copying stereotypes
« Reply #6 on: January 08, 2014, 08:28:46 am »
I don't know the Access client, honestly (though I had played with it in the past). But there must be a way to copy a table from one DB to another. Be it native or via some ex-/import mechanism. Definitely you can replace the contents of t_stereotypes in one DB with that of another. At least you can write a script in EA to do that.

q.

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Copying stereotypes
« Reply #7 on: January 08, 2014, 09:04:04 am »
I have developed many plug ins for EA a couple of years ago, I know how to do those things. The issue is that I wanted a stereotype with the same look and behavior as "table" stereotype.  Not to copy stereotypes table (I guess I did a poor job explaining my self...)
Recursion definition:
If you don’t understand the definition read "Recursion definition".

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Copying stereotypes
« Reply #8 on: January 08, 2014, 09:39:24 am »
Have your stereotype specialize an abstract stereotype named "EAUML::table". (You can only do it in a profile that is part of a technology)
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Copying stereotypes
« Reply #9 on: January 08, 2014, 11:56:17 am »
Quote
I have developed many plug ins for EA a couple of years ago, I know how to do those things. The issue is that I wanted a stereotype with the same look and behavior as "table" stereotype.  Not to copy stereotypes table (I guess I did a poor job explaining my self...)

IIRC the <<table>> received some special treatment which is in the guts of EA. You probably can't mimic it. You need to use the "real" stuff.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Copying stereotypes
« Reply #10 on: January 08, 2014, 03:22:55 pm »
Quote
IIRC the <<table>> received some special treatment which is in the guts of EA. You probably can't mimic it. You need to use the "real" stuff.
Everywhere that EA asks "is this element a table?" it should check the generalizations of all the element's stereotypes, so if you do as I suggested above, it ought to work.
The Sparx Team
[email protected]

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Copying stereotypes
« Reply #11 on: January 08, 2014, 06:14:17 pm »
Thanks for the help!
Recursion definition:
If you don’t understand the definition read "Recursion definition".