ReplacePathToMacroMap (final String macroName, @NotNull Path dir) { ReplacePathToMacroMap map = new ReplacePathToMacroMap(); map.addMacroReplacement(FileUtilRt.toSystemIndependentName(dir.toAbsolutePath().toString()), macroName); PathMacrosImpl.getInstanceEx().addMacroReplacements(map); return map; }