Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Eclipse: show used libs of project

 
manuel aldana
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i am looking for following eclipse-capability:
select a projekt and show me all the libraries (jars), my sources are using indeed.

this way i want to clean up unused and therefore unneccessary library imports into the classpath. i think this must be somehow included in eclipse IDE, because it should not be to tricky to be realized (browse all my sources and analyze imports and compare with types in included libraries.

of course this would not be completely reliable because you always can hack this static typing with reflection. but at least it would be a help to find dead library imports.

thanks.
 
Tim Holloway
Bartender
Posts: 18422
60
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Within an error-free Eclipse project, you can simply go to the builder page and remove JARs from the project one by one. Each missing jar with static usage will cause the java source file decorators to light up (the white "X" in the red circle), which will be an indicator that you should put it back.

Or you can remove all the jars and just keep adding back until all the errors go away. I've done this from time to time.

Once you've cleaned the list of jars from your project, you should be able to go into the physical library directories and delete the jar files.

I do recommend you archive the project before you do this, though!
 
manuel aldana
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, know how to it manually but hoped that there was an automatic help of eclipse... something similar to unused import -> unused libraries.
 
It will give me the powers of the gods. Not bad for a tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!