Page 1 of 1

Checking for unused includes

Posted: Fri Jul 07, 2006 4:17 pm
by abcoates
I'm working on a big project at the moment refactoring over 100 Schemas for a client. oXygen 7.2 has been fantastic; I'm thrilled that you have added the kind of refactoring functionality for W3C XML Schemas that Java developers, etc., get with their GUIs.

One thing my Java IDE does is check the Java import statements, and remove any that aren't used. I'm missing a function like that in oXygen. What typically happens with large sets of Schemas is that people copy old Schemas to create new ones, or don't remove unused includes after removing definitions from a Schema. The unused includes are almost certainly causing run-time penalties, and they also make it too easy to end up with circular dependencies among Schemas.

So, what I would like in oXygen is a feature that will check for potential unused includes. There is no way you can be completely sure without checking all Schemas, but for a single Schema you could indicate "this is an include that this Schema doesn't use" (maybe underline it somehow), and that would help remind people to tidy up after themselves. All this applies to import statements too, I'm just dealing with includes at the moment. How does that sound? Since you can find references, I suspect you have the information available to check this kind of thing.

Cheers, Tony.