summaryrefslogtreecommitdiff
path: root/platform/configuration-store-impl/src/ProjectStoreBridge.kt
diff options
context:
space:
mode:
Diffstat (limited to 'platform/configuration-store-impl/src/ProjectStoreBridge.kt')
-rw-r--r--platform/configuration-store-impl/src/ProjectStoreBridge.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/configuration-store-impl/src/ProjectStoreBridge.kt b/platform/configuration-store-impl/src/ProjectStoreBridge.kt
index a64258168044..76024557cc79 100644
--- a/platform/configuration-store-impl/src/ProjectStoreBridge.kt
+++ b/platform/configuration-store-impl/src/ProjectStoreBridge.kt
@@ -17,6 +17,7 @@ import com.intellij.project.stateStore
import com.intellij.util.PathUtil
import com.intellij.util.containers.HashingStrategy
import com.intellij.util.io.systemIndependentPath
+import com.intellij.workspaceModel.ide.JpsProjectConfigLocation
import com.intellij.workspaceModel.ide.impl.jps.serialization.*
import org.jdom.Element
import org.jetbrains.jps.util.JpsPathUtil
@@ -67,7 +68,7 @@ private class JpsStorageContentWriter(private val session: ProjectWithModulesSav
override fun getReplacePathMacroMap(fileUrl: String): PathMacroMap {
val filePath = JpsPathUtil.urlToPath(fileUrl)
return if (FileUtil.extensionEquals(filePath, "iml") || isExternalModuleFile(filePath)) {
- ModulePathMacroManager.createInstance(Supplier { filePath }).replacePathMap
+ ModulePathMacroManager.createInstance(project::getProjectFilePath, Supplier { filePath }).replacePathMap
}
else {
ProjectPathMacroManager.getInstance(project).replacePathMap
@@ -125,7 +126,7 @@ private class ProjectWithModulesSaveSessionProducerManager(project: Project) : P
}
internal class StorageJpsConfigurationReader(private val project: Project,
- private val baseDirUrl: String) : JpsFileContentReaderWithCache {
+ private val configLocation: JpsProjectConfigLocation) : JpsFileContentReaderWithCache {
@Volatile
private var fileContentCachingReader: CachingJpsFileContentReader? = null
@@ -159,7 +160,7 @@ internal class StorageJpsConfigurationReader(private val project: Project,
}
private fun getCachingReader(): CachingJpsFileContentReader {
- val reader = fileContentCachingReader ?: CachingJpsFileContentReader(baseDirUrl)
+ val reader = fileContentCachingReader ?: CachingJpsFileContentReader(configLocation)
if (fileContentCachingReader == null) {
fileContentCachingReader = reader
}