Resources

A resource is a generic term used to describe a project, file, folder or a combination of these. Resources exist in Eclipse but might not always exist in the workspace. There are three types of resources:

Project

A project is displayed in the Project Explorer view and can be stored within the workspace folder or can be a linked resource.

A project must exist in Eclipse before other resources can be imported or linked to that project. The project creation process creates additional configuration files and folders, for example, build properties. These additional files and folders must not be edited or deleted.

Folder

A folder is displayed in the Project Explorer view and can be located within the project folder or can be a linked resource.

File

A file is displayed in the Project Explorer view and can be located within the project folder or can be a linked resource.

Show/hideLinked resources

Resources can be shared between projects or they can exist in the file system outside of your selected workspace. To do this a link must be created within Eclipse.

Note

A linked file or folder must have a project as its parent resource.

Deleting, moving or copying a linked resource only affects the link in your workspace and not the resource that it links to. However, deleting a child resource from within a linked folder also deletes it from the file system!

Linked file

To link an existing file to a project in your workspace instead of copying it, you can use the advanced options of the New File wizard. By default the advanced options are not visible, click on the <<Advanced button to reveal them. A path variable can also be used to reference a file. For more information on referencing with path variables, use the dynamic help.

Figure 4. Linked file

Linked file

Linked folder

To link an existing folder to a project in your workspace instead of copying it, you can use the advanced options of the New Folder wizard. By default the advanced options are not visible, click on the <<Advanced button to reveal them. A path variable can also be used to reference a file. For more information on referencing with path variables, use the dynamic help.

Figure 5. Linked folder

Linked folder

Linked project

Eclipse uses the Import wizard to create a link to an existing project. This can be useful if you have a central folder with shared projects. By default, the Copy projects into workspace checkbox is selected to ensure that a copy of your project is placed in your current workspace. If you want to leave your project where it is and create a link to it, you must deselect this option.

Figure 6. Linked project

Linked project

Disabling the use of linked resources

You can disable the use of linked resources by changing the General → Workspace → Linked Resources settings in the Preferences dialog box.

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0480L
Non-ConfidentialID100912