Module paths

Module paths

To configure the module paths, you can:

  1. Select the File menu.
  2. Select the Project Structure menu.
  3. In the left navigation pane of the project structure dialog, select the Modules item.

Once you are finished, press the Apply button to make the changes and keep the dialog open, or OK to make the changes and close the dialog.

Specifying the source root

The source roots define where importable modules are searched for when resolving the import paths in the at part of importable modules.

NOTE: This does not currently work for relative import namespace paths, like those used by BaseX.

NOTE: If there are multiple at paths, only the first path that locates a file is used. The plugin does not currently support adding all the at paths to the specified namespace, like is used in some MarkLogic modules.

To specify the source root, you can:

  1. Click on the module source path on the right, below the Add content root button.
  2. Navigate to the directory you want to make the source root in the directory tree pane.
  3. Click on the Sources button above the directory tree pane.

Adding content roots

MarkLogic provides many helper modules that are importable, for example:

import module namespace sec = "http://marklogic.com/xdmp/security"
                     at "/MarkLogic/security.xqy";

These can be supported in IntelliJ by adding a content root to the project. To do this, you can:

  1. Click on the Add content root button above the pane on the right.
  2. Navigate to the path of the modules you want to support, e.g.
    C:\Program Files\MarkLogic\Modules.
  3. Press OK.
  4. Click on the top-level path that was added in the directory tree pane.
  5. Click on the Sources button above the directory tree pane.