use of com.intellij.openapi.application.PathMacros in project kotlin by JetBrains.
the class PluginStartupComponent method registerPathVariable.
private static void registerPathVariable() {
PathMacros macros = PathMacros.getInstance();
macros.setMacro(KOTLIN_BUNDLED, PathUtil.getKotlinPathsForIdeaPlugin().getHomePath().getPath());
}
use of com.intellij.openapi.application.PathMacros in project intellij-elixir by KronicDeth.
the class ParametersList method getMacroMap.
private Map<String, String> getMacroMap() {
if (myMacroMap == null) {
// the insertion order is important for later iterations, so LinkedHashMap is used
myMacroMap = new LinkedHashMap<String, String>();
// ApplicationManager.getApplication() will return null if executed in ParameterListTest
final Application application = ApplicationManager.getApplication();
if (application != null) {
final PathMacros pathMacros = PathMacros.getInstance();
if (pathMacros != null) {
for (String name : pathMacros.getUserMacroNames()) {
final String value = pathMacros.getValue(name);
if (value != null) {
myMacroMap.put("${" + name + "}", value);
}
}
}
final Map<String, String> env = EnvironmentUtil.getEnvironmentMap();
for (String name : env.keySet()) {
final String key = "${" + name + "}";
if (!myMacroMap.containsKey(key)) {
myMacroMap.put(key, env.get(name));
}
}
}
}
return myMacroMap;
}
Aggregations