void (String macro, @Nullable File file) { if (file == null) { return; } doAddFileHierarchyReplacements(macro + "/..", file.getParentFile()); String path = FileUtilRt.toSystemIndependentName(file.getPath()); if (StringUtilRt.endsWithChar(path, '/')) { myExpandMacroMap.put(macro + "/", path); myExpandMacroMap.put(macro, path.substring(0, path.length()-1)); } else { myExpandMacroMap.put(macro, path); } }