How to determine which source files are needed for the Eclipse launch configuration
When writing code in an Eclipse project, I'm usually pretty messy and undisciplined in how I create and organize my classes, at least in the early stages of hacking and experimentation. Specifically, I am creating several classes with a basic method of testing different ideas that most of the same classes share.
If I come up with something like a useful application, I can export it to a runnable jar so I can share it with my friends. But this just packs up the whole project, which can be a few megabytes if I rely on a large library like httpclient.
Also, if I decide to refactor my piece of code into multiple projects, once I work out what works and I can't remember which source files are used in a particular launch configuration, all I can do is copy the main class to new project, and then continue copying the missing types until the new project is compiled.
Is there a way in Eclipse to determine which classes are actually used in a particular launch configuration?
EDIT: Here's an example. Let's say I am experimenting with web scraping and so far I have been trying to scrape both youtube.com and wrzuta.pl search result pages. I have a bunch of classes that implement cleanup in general, several that are specific to each of youtube and wrzuta. On top of that, I have a basic gui common to both scrapers, but a few buttons and options with wrzuta- and youtube functionality.
Each WrzutaGuiMain and YoutubeGuiMain class contains a basic method for configuring and displaying the gui for each respective website. Can Eclipse look at each one to determine what types of links are?
source to share
Take a look at ProGuard , it's a "java bush, optimizer, obfuscator, and perverter". I think you are primarily interested in the first opportunity for this problem.
Yes, it is not technically part of Eclipse as you asked, but it can be run from an Ant script that can be easily run in Eclipse.
source to share
I am creating several classes with a basic testing method of various ideas that most of the same classes share.
Better to be pedantic than lazy, it saves you coding time :-) You can have one class with a main method that takes a command line argument and calls a specific branch of functionality based on its value.