From 8a8322dbddde56bcd3c2c75dec2563600d1e7904 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Mon, 18 Feb 2013 17:10:20 +0400 Subject: [PATCH] processing workspace.xml --- .../com/intellij/platform/templates/SystemFileProcessor.java | 5 +++++ .../intellij/application/options/ReplacePathToMacroMap.java | 3 +++ 2 files changed, 8 insertions(+) diff --git a/java/idea-ui/src/com/intellij/platform/templates/SystemFileProcessor.java b/java/idea-ui/src/com/intellij/platform/templates/SystemFileProcessor.java index 827997ac73a0..6520b83db128 100644 --- a/java/idea-ui/src/com/intellij/platform/templates/SystemFileProcessor.java +++ b/java/idea-ui/src/com/intellij/platform/templates/SystemFileProcessor.java @@ -17,6 +17,8 @@ package com.intellij.platform.templates; import com.intellij.ide.util.projectWizard.ProjectTemplateComponent; import com.intellij.ide.util.projectWizard.ProjectTemplateFileProcessor; +import com.intellij.openapi.components.PathMacroManager; +import com.intellij.openapi.components.impl.ComponentManagerImpl; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Condition; @@ -53,6 +55,8 @@ public class SystemFileProcessor extends ProjectTemplateFileProcessor { Element root = new Element("project"); for (final ProjectTemplateComponent component : componentList) { final Element element = new Element("component"); + String name = ComponentManagerImpl.getComponentName(component); + element.setAttribute("name", name); root.addContent(element); UIUtil.invokeAndWaitIfNeeded(new Runnable() { @Override @@ -66,6 +70,7 @@ public class SystemFileProcessor extends ProjectTemplateFileProcessor { } }); } + PathMacroManager.getInstance(project).collapsePaths(root); return JDOMUtil.writeElement(root); } } diff --git a/platform/projectModel-impl/src/com/intellij/application/options/ReplacePathToMacroMap.java b/platform/projectModel-impl/src/com/intellij/application/options/ReplacePathToMacroMap.java index 412c6b2abe68..a3876a6eac48 100644 --- a/platform/projectModel-impl/src/com/intellij/application/options/ReplacePathToMacroMap.java +++ b/platform/projectModel-impl/src/com/intellij/application/options/ReplacePathToMacroMap.java @@ -33,6 +33,9 @@ import java.util.Map; /** * @author Eugene Zhuravlev * Date: Dec 6, 2004 + * + * @see PathMacrosImpl#addMacroReplacements(ReplacePathToMacroMap) + * @see com.intellij.openapi.components.PathMacroManager */ public class ReplacePathToMacroMap extends PathMacroMap { private List myPathsIndex = null;