I have an existing C project with the following folder structure:
.cproject (and the
.settings folder if it exists) contains the Eclipse-specific (general and C/C++) project configuration.
.metadata folder is a kind of cache/temp folder (to store error/warnings markers, local file history, etc.) and also used to store your workspace preferences (most of Window > Preferences).
Files in a project are tracked and can cause changes in the
.metadata folder. If the
.metadata folder would be located in a project, this could end in an infinite loop.
You could use the workspace folder of Eclipse (which contains the
.metadata folder) as part of your overall project folder and link instead of copy all files and folder that you want to see in Eclipse or that are required by Eclipse into your Eclipse project (you can also mark some files and folders as derived to stop them from being tracked and to make them less visible in Eclipse).
Note, do not share or move the
.metadata folder (and derived resources). In contrast,
.settings are intended to be shared.