blob: d1c5bc8c13bb15866ad668ff5011bad27da54277 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Creating linked resources</title>
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>Creating linked resources</H1>
<p>
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
<a href="../concepts/concepts-13.htm">linked resources</a>.
</p>
<P>To create a linked folder:
</P>
<ol>
<li>In one of the navigation views, right-click the project or folder
where you want to create the linked folder.</li>
<li>From the pop-up menu, select
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.ui.wizards.new.folder)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="command link">
<b>New &gt; Folder</b></a>.</li>
<li>Specify the name of the folder as it will appear in the workbench. This
name can be different from the name of the folder in the file system.</li>
<li>Click <b>Advanced</b>.</li>
<li>Check <b>Link to alternate location (Linked Folder)</b>.</li>
<li>Enter a file system path, or click <b>Browse</b> to select a folder in the file system.</li>
<li>Click <b>Finish</b>.</li>
</ol>
<P>To create a linked file, follow the same steps as above, except choose
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.ui.wizards.new.file)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="command link">
<b>New &gt; File</b></a> instead of
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.ui.wizards.new.folder)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="command link">
<b>New &gt; Folder</b></a> in the context menu. </P>
<P>Linked resource locations can also be specified relative to a variable. This makes
it easier to share projects containing linked resources with other team members,
since it avoids hard-coded absolute file system paths that may vary from one
machine to the next.
</P>
<P>
To define a linked resource relative to a path variable, do the following after step 5
above:
</P>
<ol start="6">
<li>Click the <b>Variables</b> button.</li>
<li>In the resulting dialog, select an existing path variable or create a new one.</li>
<li>If the chosen variable defines the exact path of the linked resource, click <b>OK</b>.
Otherwise, click <b>Extend</b> to specify a file or folder below the location described
by the path variable, then click <b>OK</b>.</li>
<li>Click <b>Finish</b>.</li>
</ol>
<p><em>Tip:</em> The
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.LinkedResources)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="command link">
<b>General &gt; Workspace &gt; Linked Resources</b></a>
preference page also allows you to define path variables.
</p>
<P>Note that, once you create a linked resource you will be able to change
the link target path that you entered in step 6. or 8. above. by selecting the
<b>Edit...</b> button in the
<b>File &gt; Properties &gt; Resource</b> property page of the linked resource.
</P>
<P><img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
<a href="../concepts/concepts-12.htm">Resources</a><br>
<a href="../concepts/concepts-17.htm">Resource hierarchies</a><br>
<a href="../concepts/concepts-13.htm">Linked resources</a>
</P>
<P><img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
<a href="tasks-42.htm">Creating a project</a><br>
<a href="tasks-44.htm">Creating a file</a><br>
<a href="tasks-43.htm">Creating a folder</a><br>
</P>
<p><img border="0" src="../images/ngrelr.png" alt="Related references" >
<br><a href="../reference/ref-14b.htm">Linked resources</a>
<br><a href="../reference/ref-38.htm">New Folder wizard</a>
<br><a href="../reference/ref-39.htm">New File wizard</a>
</p>
</BODY>
</HTML>