Jump to: navigation, search

FAQ How do I accommodate project layouts that don't fit the Eclipse model?

Revision as of 13:56, 14 March 2006 by Claffra (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Let’s say that you are new to Eclipse, but have some existing projects with file system layouts that cannot be changed. Perhaps you have other tools or build processes that require your projects to be laid out in a certain way. Because Eclipse also has expectations about how projects are laid out on disk, you can run into problems when you try to get started in Eclipse with your existing projects.

In release 2.1, Eclipse introduced the notion of linked resources to help deal with problems like this. Linked resources can refer to files or folders anywhere in your file system, even inside other Eclipse projects. Using linked resources, you can cobble together a project from files and folders that are scattered all over your file system. The link descriptions are stored in the file called .project inside your project content area. If you share this file with a repository, other users will be able to load the project and get all the links reconstructed automatically in their workspace. If you do not want to hard-code particular file system paths, you can define linked resources relative to workspace path variables. Path variables can be added or changed from the Workbench > Linked Resources preference page.

For more information on using linked resources, see the good general introduction in the Workbench User Guide, under Concepts > Workbench > Linked resources. The Java Development User Guide also has an excellent tutorial that helps you get started with various types of project configurations. Look under Getting Started > Project configuration tutorial. Information on how to define linked resources programmatically is found in the Platform Plug-in Developer Guide, under Programmer’s Guide > Resource and workspace API > Linked Resources.