Sparx Systems Forum

Enterprise Architect => Suggestions and Requests => Topic started by: danielku15 on July 17, 2008, 12:50:25 am

Title: Cleanup Unused Elements in Packages
Post by: danielku15 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
Title: Re: Cleanup Unused Elements in Packages
Post by: Eve on July 17, 2008, 08:12:38 am
There is a search named 'Find Orphans' that will help you with this.
Title: Re: Cleanup Unused Elements in Packages
Post by: RoyC on July 17, 2008, 10:38:19 am
As documented here:

http://www.sparxsystems.com.au/EAUserGuide/index.html?pre_defined_search_definitions.htm

HTH
Title: Re: Cleanup Unused Elements in Packages
Post by: danielku15 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
Title: Re: Cleanup Unused Elements in Packages
Post by: KP 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"...
Title: Re: Cleanup Unused Elements in Packages
Post by: danielku15 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.
Title: Re: Cleanup Unused Elements in Packages
Post by: Eve 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.
Title: Re: Cleanup Unused Elements in Packages
Post by: RoyC 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.