use of com.intellij.openapi.components.ExpandMacroToPathMap in project intellij-community by JetBrains.
the class ModuleRootsExternalizationTest method testExpandMacro2.
public void testExpandMacro2() {
final ExpandMacroToPathMap map = new ExpandMacroToPathMap();
map.addMacroExpand("MACRO", "forms_rt.jar!/");
final String expanded = map.substitute("jar://C:/idea/lib/$MACRO$", false);
assertEquals("jar://C:/idea/lib/forms_rt.jar!/", expanded);
}
use of com.intellij.openapi.components.ExpandMacroToPathMap in project intellij-community by JetBrains.
the class ModuleRootsExternalizationTest method testExpandMacroNoExpand.
public void testExpandMacroNoExpand() {
final ExpandMacroToPathMap map = new ExpandMacroToPathMap();
map.addMacroExpand("MACRO", "C:/idea");
final String expanded = map.substitute("jar://C:/idea$/lib/forms_rt.jar!/", false);
assertEquals("jar://C:/idea$/lib/forms_rt.jar!/", expanded);
}
use of com.intellij.openapi.components.ExpandMacroToPathMap in project intellij-community by JetBrains.
the class ModuleRootsExternalizationTest method testExpandMacroNoExpand2.
public void testExpandMacroNoExpand2() {
final ExpandMacroToPathMap map = new ExpandMacroToPathMap();
map.addMacroExpand("MACRO", "C:/idea");
final String expanded = map.substitute("jar://C:/idea/lib/forms_rt.jar!/$", false);
assertEquals("jar://C:/idea/lib/forms_rt.jar!/$", expanded);
}
use of com.intellij.openapi.components.ExpandMacroToPathMap in project intellij-community by JetBrains.
the class ConversionContextImpl method createExpandMacroMap.
private ExpandMacroToPathMap createExpandMacroMap(@Nullable ModuleSettingsImpl moduleSettings) {
final ExpandMacroToPathMap map = createExpandMacroMap();
if (moduleSettings != null) {
final String modulePath = FileUtil.toSystemIndependentName(moduleSettings.getModuleFile().getParentFile().getAbsolutePath());
map.addMacroExpand(PathMacroUtil.MODULE_DIR_MACRO_NAME, modulePath);
}
return map;
}
use of com.intellij.openapi.components.ExpandMacroToPathMap in project intellij-community by JetBrains.
the class ConversionContextImpl method createExpandMacroMap.
private ExpandMacroToPathMap createExpandMacroMap() {
final ExpandMacroToPathMap macros = new ExpandMacroToPathMap();
final String projectDir = FileUtil.toSystemIndependentName(myProjectBaseDir.getAbsolutePath());
macros.addMacroExpand(PathMacroUtil.PROJECT_DIR_MACRO_NAME, projectDir);
PathMacrosImpl.getInstanceEx().addMacroExpands(macros);
return macros;
}
Aggregations