Book a Demo

Author Topic: delete unused classes  (Read 4034 times)

phpweb

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
delete unused classes
« on: August 06, 2008, 11:59:12 pm »
Hello
(I'm Swiss - sorry for my English)

I have the following question: Is it possible to delete all the Classes in the Project Browser that are not used in a diagram? I've done many changes in my diagrams so I deleted the classes from the diagramm but not in the Project Browser. Is there a fast way to delete them automatically or do I have to delete them all by hand?

Thanks for answers.

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: delete unused classes
« Reply #1 on: August 07, 2008, 03:00:34 am »
I don't think there is an automatism for that. It has been debated in the suggestions and requests section a while ago but turned out to be far from trivial. What about classes, e.g., which are in no diagram but are base classes of classes which are? Or associated to them? And so on, recursively...

Thelonius

  • EA User
  • **
  • Posts: 274
  • Karma: +6/-0
  • I think. Therefore I get paid.
    • View Profile
Re: delete unused classes
« Reply #2 on: August 07, 2008, 07:52:12 am »
Me too.

Does EA have a built-in report (or could one be created) that would show classes that appear in no diagram?

Or - better - a 'SELECT' mechanism that displays a list of classes that appear in no diagram, allowing the user to delete all or some of the classes?

My naive response: 'They put a man on the moon in 1968. Surely all these intelligent people (working on EA) can fix a simple problem like this.'
 :D

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: delete unused classes
« Reply #3 on: August 07, 2008, 09:23:42 am »
Edit > Find in Model (Ctrl+F), Search="Find Orphans", Run, Close. If you wish, you can select all of the search results (Ctrl+A) and delete them (Ctrl+Delete), but be aware - as Frank suugested - that you could be deleting something important...
The Sparx Team
[email protected]

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: delete unused classes
« Reply #4 on: August 07, 2008, 09:32:00 am »
Quote
My naive response: 'They put a man on the moon in 1968. Surely all these intelligent people (working on EA) can fix a simple problem like this.'

I'm pretty sure it was 1969. Roy doesn't think it happened at all though, an alien told him that they filmed it in a studio.
« Last Edit: August 07, 2008, 09:32:23 am by mfraser »
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8