Hello

As per the title I would like different source code folders for different configurations - but with the same source file.

For example, imagine you have an application that could have demo mode functionality, instead of using preprocessing which can get messy one could have the following structure:

src
demo-mode
on
demo-mode.java
off
demo-mode.java

One issue is the package name. Eclipse assumes that package name for "demo-mode.java" in each folder should correspond to its folder structure, but really what we want is a package name such as:

org.someorg.someapp;

in each of those source files. We then want to include the appropriate source file based on a build configuration of some sort.

I have seen this used before but not sure how it was done. I remember vaguely it had to do with what's included on the project classpath.

Will Eclipse be able to create/store such configurations or does this require some manual tweaking from something such as ant?

I have been searching for info on this but cant seem to find a solution, any hints would be much appreciated.

Regards
Amin