title: Eclipse project linked resources by environment variable
body: <p>I'm having trouble setting up my Eclipse C++ project. I need to link in source from different directories here and there and in my environment the source I need actually moves sometimes (for example when i always want the latest version of a sub system currently located in a directory like <code>/aaa/bbb/v1.2.3/src</code>). I always know the location of the source I want through linux environment variables, like <code>$SYSTEM1_LATEST_ROOT</code>. Without this I need to update all my projects whenever i should pick the source from a new location.</p>
  
  <p>I cannot find a way to include the environment variables in the paths for linked resources. Include directories work perfectly (these are defined in my <code>.cproject</code> file), for example (<code>.cproject</code>):</p>
  
  <pre><code>&lt;option id="..." name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"&gt;
      ...
      &lt;listOptionValue builtIn="false" value="${SYSTEM1_LATEST_ROOT}/src"/&gt;
      ...
  &lt;/option&gt;
  </code></pre>
  
  <p>For linked resources (defined in the .project file) I know I can use path variables but these are defined inside Eclipse only and I find no way to have them based on environment variables, but only to be relative to my own project location, which is not what I want to do.</p>
  
  <p>In short, I want to link in source code from locations based on environment variables. The variable name is constant, but the actual location (known through the environment variable) of the source is not.</p>
  
  <p>Working example with path relative to project. This is not what i want (.project):</p>
  
  <pre><code>&lt;linkedResources&gt;
      &lt;link&gt;
          &lt;name&gt;System1_src&lt;/name&gt;
          &lt;type&gt;2&lt;/type&gt;
          &lt;locationURI&gt;PARENT-6-PROJECT_LOC/src&lt;/locationURI&gt;
      &lt;/link&gt;
  &lt;/linkedResources&gt;
  </code></pre>
  
  <p>Non-working example of what i want to do (.project):</p>
  
  <pre><code>&lt;linkedResources&gt;
      &lt;link&gt;
          &lt;name&gt;System1_src&lt;/name&gt;
          &lt;type&gt;2&lt;/type&gt;
          &lt;locationURI&gt;${SYSTEM1_LATEST_ROOT}/src&lt;/locationURI&gt;
      &lt;/link&gt;
  &lt;/linkedResources&gt;
  </code></pre>
  
  <p>Any suggestions?</p>