Author Topic: Deleting Stereotypes  (Read 10553 times)

JanK

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Deleting Stereotypes
« on: November 05, 2009, 02:32:25 am »
Hi Gurus,
I am working with EA7.5 using a database repository. I am trying to clean up the stereotypes, which have been created over the time. I found the UI UML Types under Settings -> UML... in the menu. From here I cannot delete a stereotype, even those which are not used in any object. What am I missing here? Are they used in any other context, which I did not figured out yet? How could I check? I found the tabel t_stereotype. What if I delete rows in this table?
Any answer is highly appreciated.
Thanks and regards
jan

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Deleting Stereotypes
« Reply #1 on: November 05, 2009, 06:23:37 am »
Hi jan,

What exactly happens if you select a stereotype from the list in the right and press the 'Delete' button in the upper left section (I suppose you've tried this)?
For me this works even with EAs intrinsic sterotypes.

WBR
Günther
« Last Edit: November 05, 2009, 06:25:38 am by g.makulik »
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

JanK

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Deleting Stereotypes
« Reply #2 on: November 06, 2009, 11:31:21 pm »
Hi,
nothing happens. No error, no message, just nothing. And the stereotype ist still there.
Regards
jan

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Deleting Stereotypes
« Reply #3 on: November 06, 2009, 11:40:46 pm »
Just a guess, but couldn't it be that EA refuses to delete a stereotype when it is still in use?

Geert

JanK

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Deleting Stereotypes
« Reply #4 on: November 07, 2009, 12:10:47 am »
Hi,
I checked and I am quite sure the stereotypes I am trying to delete is not used anymore.
Regards
jan

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Deleting Stereotypes
« Reply #5 on: November 07, 2009, 01:05:23 am »
Strange,...

I just tried that here and I can delete any stereotype I want, even the standard stereotypes like <<enumeration>>.
You wouldn't have security setup would you? I can imagine that being a problem as well.

Geert

PS. I'm on 7.5.850

nestevao

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Deleting Stereotypes
« Reply #6 on: November 09, 2009, 10:47:01 pm »
Same thing happens to me, in all versions and build I used for 3 years.
I'm only able to delete stereotypes never used, i.e, if a stereotype is used and afterward I remove that reference, I no longer can delete that stereotype.

Even, when I create a stereotype and I want to delete it immediately, for instance I misspelled it, sometimes I can not do it.

Other thing, if you create a stereotype with the same name of an existing one, you have problems, you're not able to delete it.

I've full administration permissions so, i don't think that's a permission issue.

JanK

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Deleting Stereotypes
« Reply #7 on: November 10, 2009, 02:24:27 am »
Hi,
I set up security (sorry i did not mention before). I am working in Require User Lock mode. I am working as admin and the stereotype is not used anymore. Why isn't there any error message, if deletion is not successful?
regards
jan

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Deleting Stereotypes
« Reply #8 on: November 10, 2009, 03:11:16 am »
Quote
Hi,
I set up security (sorry i did not mention before). I am working in Require User Lock mode. I am working as admin and the stereotype is not used anymore. Why isn't there any error message, if deletion is not successful?
regards
jan

We live for a few years now with some stereotypes which have umlauts in their name. Those can not be deleted any more.
They came in with a transfer from a local EAP file to a SQL server storage and and I assume the database driver can not cope with those.

Oliver

beginner

  • Guest
Re: Deleting Stereotypes
« Reply #9 on: November 10, 2009, 06:09:10 am »
DELETE FROM T_STEREOTYPE WHERE name = "to be deleted";

DELETE FROM T_XREF WHERE (forgot the table) LIKE "%whatever stereotype%";

The latter with caution. Use a SELECT to check what you delete.

Good luck.

b.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Deleting Stereotypes
« Reply #10 on: November 10, 2009, 10:18:59 am »
Quote
I found the UI UML Types under Settings -> UML... in the menu. From here I cannot delete a stereotype, even those which are not used in any object.
I suspect that the delete command is trying to match an encoded version of either the stereotype name or the base class with an unencoded one, and these are different. Please send a bug report to Sparx support indicating the stereotype name and base class of the stereotype that you can't delete.

Quote
I found the tabel t_stereotype. What if I delete rows in this table?
Should be quite safe, I have done it myself in the past - backup your database before deleting anything though. As Beginner hints, there may also be some related information in the t_xref table. Rather than delete that, you are probably better off running Tools > Data Management > Project Integrity Check and letting that clear up any orphaned information for you.
The Sparx Team
[email protected]

beginner

  • Guest
Re: Deleting Stereotypes
« Reply #11 on: November 11, 2009, 06:55:17 am »
Neil,
I was never sure about what that cleanup actually does. I run it from time to time and most of it, it tells me that orphaned stereotypes are being delete (and sometimes other things). Would you be able to shed a bit light on the cleanup process?

b.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Deleting Stereotypes
« Reply #12 on: November 13, 2009, 08:54:32 am »
Quote
Would you be able to shed a bit light on the cleanup process?
There's not a lot to say really. I've had a look at the code and it just runs through 43 (currently) checks for inconsistent data in the database, the sort of thing that can occur if you have a powercut* in the middle of a non-atomic operation or if you delete records from a table using an SQL front-end rather than EA. It's actually more useful for Sparx's development team; for customers, I'd say the most useful part of the dialog is the progress bar.  :)


*We get a few out here, especially this time of year when the gum trees start drying out and dropping branches on power lines...
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Deleting Stereotypes
« Reply #13 on: November 13, 2009, 10:58:23 am »
Quote
[size=18]...[/size]
 for customers, I'd say the most useful part of the dialog is the progress bar.  :)
[size=18]...[/size]
Actually it's the [No Problems found] dialog at the end... :)

Seriously though, if you're developing Add-ins or "touching" stuff in the DB.  Running the checker before and after helps isolate "collateral damage".  If the checker had an extra mode that provided more information about exactly where it found problems, that would be cool...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!