mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
[Workspace Model] [IJPL-389] Remove remaining unused fields after cleaning up the keys
Key `ide.workspace.model.separate.component.for.roots` was removed, but one field still remains in the code GitOrigin-RevId: 8848a6f478bf02930aea427ea716769e1d1f1b02
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2bc9525831
commit
c95e1a8d2b
@@ -29566,7 +29566,6 @@ a:com.intellij.workspaceModel.ide.impl.jps.serialization.BaseIdeSerializationCon
|
||||
- getCustomModuleComponentSerializers():java.util.List
|
||||
- getCustomModuleRootsSerializers():java.util.List
|
||||
- isJavaPluginPresent():Z
|
||||
- isOrphanageEnabled():Z
|
||||
f:com.intellij.workspaceModel.ide.impl.jps.serialization.BaseIdeSerializationContext$Companion
|
||||
- f:getCUSTOM_FACET_RELATED_ENTITY_SERIALIZER_EP():com.intellij.openapi.extensions.ExtensionPointName
|
||||
- f:getCUSTOM_MODULE_ROOTS_SERIALIZER_EP():com.intellij.openapi.extensions.ExtensionPointName
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.workspaceModel.ide.impl.jps.serialization
|
||||
|
||||
import com.intellij.ide.plugins.PluginManagerCore
|
||||
@@ -9,14 +9,11 @@ import com.intellij.platform.workspace.jps.entities.ModuleSettingsFacetBridgeEnt
|
||||
import com.intellij.platform.workspace.jps.serialization.SerializationContext
|
||||
import com.intellij.platform.workspace.jps.serialization.impl.*
|
||||
import com.intellij.platform.workspace.storage.url.VirtualFileUrlManager
|
||||
import com.intellij.workspaceModel.ide.EntitiesOrphanage
|
||||
|
||||
abstract class BaseIdeSerializationContext : SerializationContext {
|
||||
override val isJavaPluginPresent: Boolean
|
||||
get() = PluginManagerCore.getPlugin(PluginId.findId("com.intellij.java")) != null
|
||||
|
||||
override val isOrphanageEnabled: Boolean
|
||||
get() = true
|
||||
override val customModuleComponentSerializers: List<CustomModuleComponentSerializer>
|
||||
get() = CUSTOM_MODULE_COMPONENT_SERIALIZER_EP.extensionList
|
||||
override val customModuleRootsSerializers: List<CustomModuleRootsSerializer>
|
||||
|
||||
@@ -20,8 +20,6 @@ internal class SerializationContextImpl(
|
||||
|
||||
override val isJavaPluginPresent: Boolean
|
||||
get() = true //todo?
|
||||
override val isOrphanageEnabled: Boolean
|
||||
get() = false //todo?
|
||||
override val customModuleComponentSerializers: List<CustomModuleComponentSerializer>
|
||||
get() = emptyList() //todo
|
||||
override val customModuleRootsSerializers: List<CustomModuleRootsSerializer>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.platform.workspace.jps.serialization
|
||||
|
||||
import com.intellij.platform.workspace.jps.entities.ModuleSettingsFacetBridgeEntity
|
||||
@@ -21,9 +21,7 @@ interface SerializationContext {
|
||||
* currently is implemented inside the platform.
|
||||
*/
|
||||
val isJavaPluginPresent: Boolean
|
||||
|
||||
val isOrphanageEnabled: Boolean
|
||||
|
||||
|
||||
val customModuleComponentSerializers: List<CustomModuleComponentSerializer>
|
||||
|
||||
val customModuleRootsSerializers: List<CustomModuleRootsSerializer>
|
||||
|
||||
@@ -79,15 +79,7 @@ internal open class ModuleImlFileEntitiesSerializer(internal val modulePath: Mod
|
||||
createFacetSerializer().loadFacetEntities(moduleLoadedInfo.moduleEntity, reader)
|
||||
}
|
||||
|
||||
if (context.isOrphanageEnabled) {
|
||||
newModuleEntity = loadAdditionalContents(reader,
|
||||
virtualFileManager,
|
||||
moduleLoadedInfo.moduleEntity,
|
||||
exceptionsCollector)
|
||||
}
|
||||
else {
|
||||
newModuleEntity = moduleLoadedInfo.moduleEntity
|
||||
}
|
||||
newModuleEntity = loadAdditionalContents(reader, virtualFileManager, moduleLoadedInfo.moduleEntity, exceptionsCollector)
|
||||
}
|
||||
else newModuleEntity = null
|
||||
}
|
||||
@@ -109,19 +101,14 @@ internal open class ModuleImlFileEntitiesSerializer(internal val modulePath: Mod
|
||||
true, moduleLibrariesCollector)
|
||||
}
|
||||
|
||||
if (context.isOrphanageEnabled) {
|
||||
moduleEntity = loadAdditionalContents(reader, virtualFileManager, moduleLoadedInfo.moduleEntity, exceptionsCollector)
|
||||
}
|
||||
else {
|
||||
moduleEntity = tmpModuleEntity
|
||||
}
|
||||
moduleEntity = loadAdditionalContents(reader, virtualFileManager, moduleLoadedInfo.moduleEntity, exceptionsCollector)
|
||||
}
|
||||
else {
|
||||
val localModule = loadModuleEntity(reader, errorReporter, virtualFileManager, moduleLibrariesCollector, exceptionsCollector)
|
||||
|
||||
var tmpModule = localModule?.moduleEntity
|
||||
|
||||
if (context.isOrphanageEnabled && tmpModule != null) {
|
||||
if (tmpModule != null) {
|
||||
tmpModule = loadAdditionalContents(reader, virtualFileManager, tmpModule, exceptionsCollector)
|
||||
}
|
||||
moduleEntity = tmpModule
|
||||
@@ -611,7 +598,7 @@ internal open class ModuleImlFileEntitiesSerializer(internal val modulePath: Mod
|
||||
saveModuleEntities(module, entities, storage, writer)
|
||||
}
|
||||
else {
|
||||
val targetComponent = if (context.isOrphanageEnabled) ADDITIONAL_MODULE_ELEMENTS_COMPONENT_NAME else MODULE_ROOT_MANAGER_COMPONENT_NAME
|
||||
val targetComponent = ADDITIONAL_MODULE_ELEMENTS_COMPONENT_NAME
|
||||
if (ContentRootEntity::class.java in entities || SourceRootEntity::class.java in entities || ExcludeUrlEntity::class.java in entities) {
|
||||
val contentEntities = entities[ContentRootEntity::class.java] as? List<ContentRootEntity> ?: emptyList()
|
||||
val sourceRootEntities = (entities[SourceRootEntity::class.java] as? List<SourceRootEntity>)?.toMutableSet() ?: mutableSetOf()
|
||||
@@ -638,9 +625,7 @@ internal open class ModuleImlFileEntitiesSerializer(internal val modulePath: Mod
|
||||
.forEach { (contentRoot, sourceRoots) ->
|
||||
val contentRootTag = Element(CONTENT_TAG)
|
||||
contentRootTag.setAttribute(URL_ATTRIBUTE, contentRoot.url.url)
|
||||
if (context.isOrphanageEnabled) {
|
||||
contentRootTag.setAttribute(DUMB_ATTRIBUTE, true.toString())
|
||||
}
|
||||
contentRootTag.setAttribute(DUMB_ATTRIBUTE, true.toString())
|
||||
saveSourceRootEntities(sourceRoots, contentRootTag, contentRoot.getSourceRootsComparator())
|
||||
excludes[contentRoot.url]?.let {
|
||||
saveExcludeUrls(contentRootTag, it)
|
||||
@@ -653,27 +638,21 @@ internal open class ModuleImlFileEntitiesSerializer(internal val modulePath: Mod
|
||||
excludes.toSortedMap(compareBy { it.url }).forEach { (url, exclude) ->
|
||||
val contentRootTag = Element(CONTENT_TAG)
|
||||
contentRootTag.setAttribute(URL_ATTRIBUTE, url.url)
|
||||
if (context.isOrphanageEnabled) {
|
||||
contentRootTag.setAttribute(DUMB_ATTRIBUTE, true.toString())
|
||||
}
|
||||
contentRootTag.setAttribute(DUMB_ATTRIBUTE, true.toString())
|
||||
saveExcludeUrls(contentRootTag, exclude)
|
||||
rootElement.addContent(contentRootTag)
|
||||
writer.saveComponent(fileUrl.url, targetComponent, rootElement)
|
||||
}
|
||||
}
|
||||
|
||||
if (context.isOrphanageEnabled) {
|
||||
// Component to save additional roots before introducing AdditionalModuleElements.
|
||||
// It's not used for this function anymore and should be cleared
|
||||
writer.saveComponent(fileUrl.url, MODULE_ROOT_MANAGER_COMPONENT_NAME, null)
|
||||
}
|
||||
// Component to save additional roots before introducing AdditionalModuleElements.
|
||||
// It's not used for this function anymore and should be cleared
|
||||
writer.saveComponent(fileUrl.url, MODULE_ROOT_MANAGER_COMPONENT_NAME, null)
|
||||
}
|
||||
else {
|
||||
writer.saveComponent(fileUrl.url, MODULE_ROOT_MANAGER_COMPONENT_NAME, null)
|
||||
writer.saveComponent(fileUrl.url, DEPRECATED_MODULE_MANAGER_COMPONENT_NAME, null)
|
||||
if (context.isOrphanageEnabled) {
|
||||
writer.saveComponent(fileUrl.url, ADDITIONAL_MODULE_ELEMENTS_COMPONENT_NAME, null)
|
||||
}
|
||||
writer.saveComponent(fileUrl.url, ADDITIONAL_MODULE_ELEMENTS_COMPONENT_NAME, null)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user