Eclipse - Resources
What are Resources?
Eclipse workspace contains Projects, folders, and files. Collectively these are called as Resources. There are three basic types of resources that exist in the Workbench:
- Comparable to files as you see them in the file system.
- Comparable to directories on a file system. In the Workspace, folders are contained in projects or other folders. Folders can contain files and other folders.
- Contain folders and files. Like folders, projects map to directories in the file system. (When you create a project, you specify a location for it in the file system.)
A project is either open or closed. When a project is closed, it cannot be changed in the Workbench. The resources of a closed project will not appear in the Workbench, but the resources still reside on the local file system. Since they are not examined during builds, closing a project can improve build time. When a project is open, the structure of the project can be changed and you will see the contents.
Folders and files can be linked to locations in the file system outside of the project's location. These special folders and files are called linked resources.
Linked resources are files and folders that are stored in locations in the file system outside of the project's location. These special resources can be used to add files and folders to your project that for some reason must be stored in a certain place outside of your project.
You can even use linked resources to overlap other resources in the workspace, so resources from one project can appear in another project. If you do want to have overlapping resources in your workspace, do so with caution. Keep in mind that this means changing a resource in one place will cause simultaneous changes in the duplicate resource. Deleting one duplicate resource will delete both!
Deleting a linked resource will not cause the corresponding resource in the file system to be deleted. However, deleting child resources of linked folders will cause them to be removed from the file system.
Linked resource target paths can be either defined as absolute paths, or relative to a path variable.
The linked resource target path can be changed by selecting the Edit... button in the File > Properties > Resource property page of the linked resource.
A list of all linked resources that exist in a project can be seen and edited from the File > Properties > Resource > Linked Resources property page, under the Linked Resources tab.
Linked resources can be disabled from the General > Workspace > Linked Resources preference page.