Search code examples
c++eclipse-cdt

Eclipse CDT convert a "normal folder" to a "source folder" or vice versa


Because of me not being used to Eclipse I have projects whose subfolders are mixed "source" and "normal" folders. This is not much of a problem since those are Makefile projects but it bothers me to have my folders not being listed alphabetically (the source folders are displayed first).

I would like to convert my "normal" folders to "source" folders but I can't find anything related in the right click menu on said folders nor in the "properties" window.

Is there a way to convert folder types that doesn't involve editing the .cproject file manually ? If not, can I just edit the sourceEntries tag (it seems to work so far) ?

I am using CDT 8.0.2.


Solution

  • In order to do this in Eclipse, you should get in your project's properties, then expand C/C++ general -> Paths and Symbols -> Sources tab

    Then click the Add Folder button, and choose the normal folders you wish to include as "source" folders.