views:

65

answers:

2

I have been in the process of creating a "lite" version of an existing Flex application, and thereby porting many of the classes that are used by both into a library project. As such, I want to easily find all of the "orphan" classes in the original project - those classes that are no longer referenced/used by the project. Is there an Eclipse plug-in, or some other easy way to find these in Flex Builder 3?

Thanks.

A: 

Here's what I do sometimes, lets say we've been refactoring, and a class becomes obsolete, I simply move the suspecting file from Flex Builder to the desktop, rebuild the project and see if it the compiler spits out any Errors.

If it doesn't complain, I know I can safely delete it.

If your class is depended on, the compiler will throw some errors in the Problems panel in Flex Builder and give you a fairly clear hint of what's missing.

This won't be fun however if you have thousands of classes, as you have to traverse them one by one.

I would suggest, always keep copies of the old ones in Subversion, just in case you had something re-usable in there, and later you want the deleted file restored.

Joe Zephyr
This is what I typically have to resort to as well, subversion is definitely your best friend here.
Tyler Egeto
Yeah, I've done this too - this is exactly what I want to avoid, though. I was hoping for some built-in - or plug-in - that I didn't know about.
Eric Belair
+2  A: 

MXML Compiler (mxmlc) compiler has "link-report" which will generate all the classes you are using in your original application. From there, with a bit of grep / awk / xsl magic, you should be able to diff with the classes you have in your library project.

Myo Thein