In eclipse CDT 4.2 i want to include only few folders as resource.
eg “/root” is the place where project “myproject” is created. I want to include only these folders and exclude any others.
- /root/A
- /root/B
- /root/C/D
I am aware that this can be done in
Project -> Resource -> Resource Filters
But the UI there is confusing me.
- What is the difference between Location and Relative path.
- The check box “Apply recursively” is also confusing me a bit.
- There is a way to specify regular expression but if I put a regex starting with *, like */root/A/* or */myproject/A/* it will give error saying “Dangling meta character near index 0”.
In short because of these seemingly confusing options (to me) I am not yet able to acheive above. Please clarify
PS : The way source lies in linux my file system and proprietary source control system they all are links. Not sure if this matters , but just mentioning.
eg
root/A/file.c –> [link to version control system for file.c]
The Location is the full path (e.g.
/home/user123/workspcae/proj1/src/foo.c), where relative path is only the part within the project directory (e.g.src/foo.c)Means the rule is not only used for the projet-root, but also for any sub-directory. I.e. a rule to match
src/*.cwon’t do anything without “Apply recursivly”, because it only matches files in the sub-directorysrcYou are using wildcards, not regular expressions. regex are much more complex, and stars mean the previous ‘object’ may occur zero or more times. Without this previous object Eclipse gets confused. Just don’t check the regex-box and it should work as you expected, or add a dot before the star, meaning any character.
To Solve your Problem do: