Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the predefined variables in eclipse?

With eclipse, I know how to use variables in my launch configurations. I also know there exist a set of predefined variables such as ECLIPSE_HOME or WORKSPACE_LOC.

What I don't know is the extensive list of these predefined variables (ie : variables names and values). Is there such a resource ?

like image 343
merours Avatar asked May 21 '15 08:05

merours


People also ask

What are variables in Eclipse?

A path variable is a name that is mapped to a specific location on the machine. By using a path variable, you can share projects containing linked resources with team members without requiring the same directory structure as on your file system.

How do I find variables in Eclipse?

To manually open the view, go to Window | Show View | Other | Debug | Variables.

Where are environment variables stored in Eclipse?

Environment Variables are attached to a "Run Configuration"(Run -> Run Configurations). Then you create a new Java Application run config, and will see Environment tab on the right panel.


1 Answers

I found a very good example about path variables in eclipse help documentation:

workbench user guide-concepts-ant & external tools

Lets assume your Eclipse workspace directory is: c:\eclipse\workspace and you have two projects, MyProject1 and MyProject2. The first project, MyProject1, is located inside the workspace directory, the second project, MyProject2, is located outside the workspace directory at c:\projects\MyProject2. Lets look at how the variable examples below will be expanded when an external tool is run, if the resource /MyProject2/MyFolder/MyFile.txt is selected.

    ****Variable Example ~~> Expanded Results****

    ${workspace_loc} ~~> c:\eclipse\workspace
    ${workspace_loc:/MyProject1/MyFile.txt} ~~> c:\eclipse\workspace\MyProject\MyFile.txt
    ${workspace_loc:/MyProject2/MyFile.txt} ~~> c:\projects\MyProject2\MyFile.txt
    ${project_loc} ~~> c:\projects\MyProject2
    ${project_loc:/MyProject1/MyFile.txt} ~~> c:\eclipse\workspace\MyProject
    ${container_loc} ~~> c:\projects\MyProject2\MyFolder
    ${resource_loc} ~~> c:\projects\MyProject2\MyFile.txt
    ${project_path} ~~> /MyProject2
    ${container_path} ~~> /MyProject2/MyFolder
    ${resource_path} ~~> /MyProject2/MyFolder/MyFile.txt
    ${project_name} ~~> MyProject2
    ${container_name} ~~> MyFolder
    ${resource_name} ~~> MyFile.txt
    ${build_type} ~~> none
like image 183
Wei Avatar answered Sep 21 '22 18:09

Wei