Saturday, August 27, 2011

Eclipse tricks: relative paths in linked source folders

One useful trick which I haven't seen properly documented anywhere: You can get relative paths to linked source folders in Eclipse by using the variable PARENT-N-PROJECT_LOC in the path. For example, the link from my test project (parent/TagListTest) to the main project (parent/TagList) in .project file:

<linkedResources>
    <link>
      <name>test-src</name>
      <type>2</type>
      <locationURI>PARENT-1-PROJECT_LOC/TagList/test-src</locationURI>
    </link>
</linkedResources>

No comments:

Post a Comment