DataGrip 2023.1 Help

Path Variables

Path Variables page

Item

Description

Reset

Revert path variables and the list of ignored variables to their initially saved states.

Name

This field shows the name of a path variable (readonly).

Value

This field shows the value of a path variable (readonly).

the Add button or Alt+Insert

Create a new path variable.

the Edit button or Enter

Edit the selected path variable.

the Remove button or Alt+Delete

Delete the selected path variable.

Ignored Variables

List the names of the variables that should be ignored. Use semicolons ; to separate the list items.

Add / Edit Variable dialog

Item

Description

Name

Specify the path variable name.

Value

Specify the path variable value. Use the Browse button   Shift+Enter to select the necessary file or folder in the Select Path dialog.

Example: creating a new path variable

You may have an attached directory that is located outside your project directory. This directory is attached to your project, and the path to this library is included in the .iml file of your project. However, this path should not be absolute, because the location on this directory may be different on your teammates' computers. In this case, you can create the PATH_TO_ATT_DIR variable:

  1. Press Control+Alt+S to open the IDE settings and select Appearance & Behavior | Path Variables.

  2. Click the Add button.

  3. In the Add Variable dialog, type the PATH_TO_ATT_DIR variable, and its value that points to the library location on your disk.

  4. Share the .iml file through your version control system.

  5. After your teammates update their projects from VCS, they will change the PATH_TO_ATT_DIR variable value so that it points to the library location on their computers.

Last modified: 24 November 2022