Author Topic: Cleanup Unused Elements in Packages  (Read 4680 times)

danielku15

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
  • Nobody is perfect and I'm a nobody :D
    • View Profile
Cleanup Unused Elements in Packages
« on: July 17, 2008, 12:50:25 am »
Hi.
Correct me if this feature exists. If you've got a lot of unused elements in your packages, you have to check each element if it is used in a Diagram (CTRL+U / Find in Diagram). If it is not used in any diagram, delete it.

Greets Daniel
CoderLine.net - The Online Coder Resource (comming soon)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8066
  • Karma: +118/-20
    • View Profile
Re: Cleanup Unused Elements in Packages
« Reply #1 on: July 17, 2008, 08:12:38 am »
There is a search named 'Find Orphans' that will help you with this.

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Best Regards, Roy

danielku15

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
  • Nobody is perfect and I'm a nobody :D
    • View Profile
Re: Cleanup Unused Elements in Packages
« Reply #3 on: July 17, 2008, 03:55:05 pm »
If I want to search for orphans I only receive this error:
OraOLEDB [-2147217900]
ORA-01795: maximum number of expressions in a list is 1000

- Daniel
CoderLine.net - The Online Coder Resource (comming soon)

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Cleanup Unused Elements in Packages
« Reply #4 on: July 17, 2008, 04:12:38 pm »
Quote
If I want to search for orphans I only receive this error:
OraOLEDB [-2147217900]
ORA-01795: maximum number of expressions in a list is 1000
That means you have found more than 1000 orphans in your model, and Oracle can't cope with the (single) query that attempts to get the display information for them all. Try modifying the Find Orphans search in the Manage Searches dialog to restrict the search a bit, maybe only searching for ObjectType="Class"...
The Sparx Team
[email protected]

danielku15

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
  • Nobody is perfect and I'm a nobody :D
    • View Profile
Re: Cleanup Unused Elements in Packages
« Reply #5 on: July 17, 2008, 04:59:33 pm »
Is there also a possibility to check if an element has a link to these orphans. Because not all interfaces are on my diagram, but the generalisation should not be deleted.
CoderLine.net - The Online Coder Resource (comming soon)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8066
  • Karma: +118/-20
    • View Profile
Re: Cleanup Unused Elements in Packages
« Reply #6 on: July 18, 2008, 08:22:29 am »
While Roy is right about the cause, please send in a bug report about the query failing.

If you open the relationships window or heirarchy window and scroll through the search results you can find out if they have any connectors.  Neither will tell you if something is used as a classifier though.

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Cleanup Unused Elements in Packages
« Reply #7 on: July 18, 2008, 09:24:17 am »
Actually, it was Neil that scored the touch-down with the explanation. I was just shaking the Help pom-poms on the sideline.
Best Regards, Roy