I have a number of projects which interact with one another. A scenario which we often see in the wild is a "common" or "shared" project, which supports other projects.
I used the UCDetector plugin for Eclipse to detect unnecessary/dead code which found a couple of instances of "dead code," but upon further investigation we find that this code is actually being used outside the project, by another project.
Is there any decent static code analysis tool which will account for these multiple project scenarios?
I don't think that you can easily do this with static code analysis. It may not be obvious that some code is used until you configure your application a certain way.
Instead, you could write integration tests that cover all of your use cases and then attach a code coverage plugin to it. At the end of your integration tests, code coverage can report lines of code that are untested and therefore likely unused.
He's dead Jim. Grab his tricorder. I'll get his wallet and this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners