Skip to main content
Jump to: navigation, search

CDT/Archive/Flexible Project Structure


The fact that Eclipse projects need to map so closely to the file system is very limiting to many CDT users. The often have existing directory structures that contain their code which don't map easily to Projects. As such we'd like to provide the flexibility to add files and directories from anywhere into their projects and have all existing Eclipse functionality work properly with them (and that's the hard part).

We have two solutions on the table at the moment.

  • One is to implement a EFS file system that allows you to add and exclude files and directories from anywhere using URLs. This file system then presents a logical hierarchy to the IResource tree and handles the parent/child mapping. The issue we run into immediately is that there is a lot of code in the CDT that assumes that the parent/child mapping in the IResource tree matches the physical file system and cheats by not asking EFS for that information but going directly to
  • The second one is to make linked resources and the new hidden resources feature work correctly. This seems to have the same issues with EFS and have been made to work by turning off features if they are in linked resources. These would all need to be looked at.


  • Version control simply didn't work at all
  • You can't make file system changes with links. For example, if you want to rename a file or folder, or move a file around, you can't do this with linked resources. It only changes the link itself, not the underlying resource.
  • Creating new resources in a project with links is confusing at best. Let's say you have a project with a linked folder and file at the root. If you create a new file or folder at the root, it is created in the workspace, not where the other folder/file are in the file system. But if you create a new file under the linked folder, it gets created where you'd expect.
  • The location of the .project/.cproject files are problematic. Some users will want to keep these in version control, while others won't. Those that do want them created in the source tree, but those that don't want them elsewhere, like the workspace. I forget now why this was a problem with linked resources, but there was something weird going on there.

Back to the top