After much discussion about various ways to make the output folder of a Java project more "hospitable" to class files not generated by the compiler, we've come to the conclusion that the best way to address this problem is not by changing JDT core, but by using existing mechanisms.

Here is an example plug-in (attached) to show what is possible. It deals with the issues raised in the customer development scenarios that we are aware of. Please send comments to the jdt-core-dev@eclipse.org mailing list.

From the readme.txt...

The com.example.libcopy plug-in illustrates two things:

Installation

The file libcopy-plugin.zip should be extracted into the eclipse/plugins/ directory of an Eclipse install (1.0 or better). When correctly installed, an extra menu labeled "Extras" appears on the main menu after Eclipse is re-launched. There are 3 items on this menu: These actions affect the project currently selected in the Navigator View. Following these steps to see these in action: The class files from /Test/classes are copied into /Test/bin/. The class files in /Test/bin/ get replaced by ones that the compiler generates. The class files in /Test/bin/ are now a mixture of ones that the compiler generates and ones copied from the classes folder. Generated ones always take precedence over a copy.

The class files in /Test/classes/ for which there are corresponding source files in /Test/src/ have been deleted. There is no source code for the remaining class files.

That's about it. Complete source code is provided. See LibCopyBuilder.java and MinimizeLib.java for details. The known limitations of the approach are also documented there.