Previous Topic Next topic Print topic


Linked Resources

Linked resources provide a way for a project to use files or directories that are not located under the project directory.

To add a linked folder to your project, click File > New > Folder to display the New Folder dialog box. Click Advanced, select Link to alternate location (Linked Folder), and then navigate to the folder that you want to link to.

You can specify the location as an absolute path, but this might not be convenient if multiple users on separate machines work on the same project shared though a source control system. In such cases, it is helpful to configure project or workspace variables.

For example, consider the following file system:

/root-folder
   	  /checkout-folder/
		           /shared_files
		           /project

Where the folders shared_files and project contain the sources for your application.

Different users could checkout the sources (shared_files and project) under a different directory structure on their local machines. This means if the project itself needs to make use of the sources in the shared_files folder, you could configure a linked folder such that the alternate location is a new variable whose value is ${PROJECT_LOC}/../shared_files. To add the variable, on the New Folder dialog box, click Advanced and then the click Variables.

Path variables

Note that you must use linked folders to access COBOL copybooks outside the project rather than individual linked files.

Using Linked Resources with Existing Source Structures

If you have an existing structure of sources which does not match the Eclipse model of one project per directory, you might find that linked resources are the best solution.

Linked resources enable you to use the sources without having to move them or co-locate them with the project files. You can even set the output folder to be a linked folder, so that your build artefacts could be located somewhere outside the project.

Previous Topic Next topic Print topic