Addon to IJPL-157852,IJPL-16008: Introduce registry option ide.workspace.model.write.external.files.immediately

Component name to component attribute conversion was dropped by accident during merge conflict resolution, and was caught by existing tests

GitOrigin-RevId: 124b1b008d893db0e464c091aaa6d953231d78cd
This commit is contained in:
Andrei.Kuznetsov
2024-10-01 12:14:18 +02:00
committed by intellij-monorepo-bot
parent a52d98c55f
commit a66e762038

View File

@@ -43,6 +43,7 @@ import com.intellij.workspaceModel.ide.impl.jps.serialization.JpsProjectModelSyn
import com.intellij.workspaceModel.ide.impl.jps.serialization.ProjectStoreWithJpsContentReader
import com.intellij.workspaceModel.ide.impl.jpsMetrics
import io.opentelemetry.api.metrics.Meter
import org.jdom.Attribute
import org.jdom.Element
import org.jetbrains.annotations.ApiStatus
import org.jetbrains.jps.util.JpsPathUtil
@@ -201,6 +202,10 @@ private class HalfDirectJpsStorageContentWriter(
fun saveComponent(componentName: String, componentTag: Element?) {
if (componentTag != null) {
if (componentTag.name != "component") {
componentTag.attributes.add(0, Attribute("name", componentTag.name))
componentTag.name = "component"
}
components[componentName] = componentTag
}
}