Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 238
J.N. Avatar asked Mar 22 '12 01:03

J.N.


2 Answers

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.

like image 194
Marco Rodolfo Pérez Peña Avatar answered Oct 29 '22 15:10

Marco Rodolfo Pérez Peña


Right click on the folder, "BuildPath" and "Use as Source Folder"

like image 45
Edgard Leal Avatar answered Oct 29 '22 16:10

Edgard Leal