Actions

EmSys

Eclipse - Path variables

From EdWiki

Revision as of 10:11, 6 March 2022 by Jshankar (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


What are Path variables?

By using a path variable, you can share projects containing linked resources with team members without requiring the exact same directory structure as on your file system.

  • Path variables specify locations on the file system.
  • The location of linked resources may be specified relative to these path variables.
  • They allow you to avoid references to a fixed location on your file system.

Path variables can be either defined at the project level or at the workspace level. Creating path variables at the project level ensures that projects that contain linked resources using those path variables remain portable across workspace and computers.

Each project contain a pre-defined set of path variables available for defining linked resources, including ECLIPSE_HOME, PARENT_LOC, PROJECT_LOC and WORKSPACE_LOC.

You can create new path variables and edit and remove existing path variables in the File > Properties > Resource > Linked Resources property page for a project resource and at the workspace level on the General > Workspace > Linked Resources preference page.

New path variables can be defined relative to existing path variables by using the ${VAR} syntax. For example, a path variable FOO can be defined relative to BAR by defining it as:

 "${BAR}../foo".