It seems CDT also does not support the idea of "Add" a file to a project
that exist outside of the project directory. If I use Import, it makes a
copy of that "external" file. Also, I cannot exclude a subdirectory under
the project.
When can the CDT team jump outside of the Java world and really add
features that make sense to C/C++ development?
Forgive me for being blunt. These restrictions are clearing came out of
the Java world where the structure of the project source directory must
reflect the Java class package structure. I can also argue against that
for Java (JDT), but come on, CDT begins with C and J.
In Microsoft Visual Studio, you can "Add" a C/C++ file to a project
resides in a totally unrelated directory or pick and choose which file to
include in the project. The dictatorship approach of scanning all and
include all should be a optional feature, and not a unforgiving fixture.
Let me give you a real life example. I have a CDT project created in a
directory with some C++ files that creates an .so (on Linux). I also have
a subdirectory under that call ./test that holds all the unit test file
that meant to be compiled into an executable. A very natural placement of
files, but this is a big no no in CDT, because the ./test subdirectory
also shows up in the project for the .so, which makes no sense. It would
be nice to either:
A. Prevent Eclipse from including the ./test directory (exclude a
directory);
B. Make Eclipse not to scan for source file at all, but accept explicitly
added source file may or may not related to the project directory.
Solution B will make it more like MSVC, a much more intuitive approach. If
it is a better design, who cares it is from Microsoft.