JpsMacroExpander (final Map<String, String> pathVariables, @NotNull Path moduleFile) { JpsMacroExpander expander = new JpsMacroExpander(pathVariables); String moduleDirPath = PathMacroUtil.getModuleDir(moduleFile.toAbsolutePath().toString()); if (moduleDirPath != null) { expander.addFileHierarchyReplacements(PathMacroUtil.MODULE_DIR_MACRO_NAME, new File(FileUtilRt.toSystemDependentName(moduleDirPath))); } return expander; }