Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Martin Terreni on January 07, 2014, 06:45:46 pm

Title: Copying stereotypes
Post by: Martin Terreni 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.
Title: Re: Copying stereotypes
Post by: qwerty on January 07, 2014, 08:30:32 pm
You can export the table t_stereotypes and import it in the target repository.

q.
Title: Re: Copying stereotypes
Post by: Martin Terreni on January 07, 2014, 09:37:50 pm
Or I could manipulate it.
Title: Re: Copying stereotypes
Post by: Martin Terreni 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.
Title: Re: Copying stereotypes
Post by: qwerty on January 08, 2014, 12:42:46 am
How did you "open the table"?

q.
Title: Re: Copying stereotypes
Post by: Martin Terreni on January 08, 2014, 02:55:08 am
Access
Title: Re: Copying stereotypes
Post by: qwerty 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.
Title: Re: Copying stereotypes
Post by: Martin Terreni 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...)
Title: Re: Copying stereotypes
Post by: KP 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)
Title: Re: Copying stereotypes
Post by: qwerty 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.
Title: Re: Copying stereotypes
Post by: KP 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.
Title: Re: Copying stereotypes
Post by: Martin Terreni on January 08, 2014, 06:14:17 pm
Thanks for the help!