mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +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
|
- getCustomModuleComponentSerializers():java.util.List
|
||||||
- getCustomModuleRootsSerializers():java.util.List
|
- getCustomModuleRootsSerializers():java.util.List
|
||||||
- isJavaPluginPresent():Z
|
- isJavaPluginPresent():Z
|
||||||
- isOrphanageEnabled():Z
|
|
||||||
f:com.intellij.workspaceModel.ide.impl.jps.serialization.BaseIdeSerializationContext$Companion
|
f:com.intellij.workspaceModel.ide.impl.jps.serialization.BaseIdeSerializationContext$Companion
|
||||||
- f:getCUSTOM_FACET_RELATED_ENTITY_SERIALIZER_EP():com.intellij.openapi.extensions.ExtensionPointName
|
- f:getCUSTOM_FACET_RELATED_ENTITY_SERIALIZER_EP():com.intellij.openapi.extensions.ExtensionPointName
|
||||||
- f:getCUSTOM_MODULE_ROOTS_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
|
package com.intellij.workspaceModel.ide.impl.jps.serialization
|
||||||
|
|
||||||
import com.intellij.ide.plugins.PluginManagerCore
|
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.SerializationContext
|
||||||
import com.intellij.platform.workspace.jps.serialization.impl.*
|
import com.intellij.platform.workspace.jps.serialization.impl.*
|
||||||
import com.intellij.platform.workspace.storage.url.VirtualFileUrlManager
|
import com.intellij.platform.workspace.storage.url.VirtualFileUrlManager
|
||||||
import com.intellij.workspaceModel.ide.EntitiesOrphanage
|
|
||||||
|
|
||||||
abstract class BaseIdeSerializationContext : SerializationContext {
|
abstract class BaseIdeSerializationContext : SerializationContext {
|
||||||
override val isJavaPluginPresent: Boolean
|
override val isJavaPluginPresent: Boolean
|
||||||
get() = PluginManagerCore.getPlugin(PluginId.findId("com.intellij.java")) != null
|
get() = PluginManagerCore.getPlugin(PluginId.findId("com.intellij.java")) != null
|
||||||
|
|
||||||
override val isOrphanageEnabled: Boolean
|
|
||||||
get() = true
|
|
||||||
override val customModuleComponentSerializers: List<CustomModuleComponentSerializer>
|
override val customModuleComponentSerializers: List<CustomModuleComponentSerializer>
|
||||||
get() = CUSTOM_MODULE_COMPONENT_SERIALIZER_EP.extensionList
|
get() = CUSTOM_MODULE_COMPONENT_SERIALIZER_EP.extensionList
|
||||||
override val customModuleRootsSerializers: List<CustomModuleRootsSerializer>
|
override val customModuleRootsSerializers: List<CustomModuleRootsSerializer>
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ internal class SerializationContextImpl(
|
|||||||
|
|
||||||
override val isJavaPluginPresent: Boolean
|
override val isJavaPluginPresent: Boolean
|
||||||
get() = true //todo?
|
get() = true //todo?
|
||||||
override val isOrphanageEnabled: Boolean
|
|
||||||
get() = false //todo?
|
|
||||||
override val customModuleComponentSerializers: List<CustomModuleComponentSerializer>
|
override val customModuleComponentSerializers: List<CustomModuleComponentSerializer>
|
||||||
get() = emptyList() //todo
|
get() = emptyList() //todo
|
||||||
override val customModuleRootsSerializers: List<CustomModuleRootsSerializer>
|
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
|
package com.intellij.platform.workspace.jps.serialization
|
||||||
|
|
||||||
import com.intellij.platform.workspace.jps.entities.ModuleSettingsFacetBridgeEntity
|
import com.intellij.platform.workspace.jps.entities.ModuleSettingsFacetBridgeEntity
|
||||||
@@ -21,9 +21,7 @@ interface SerializationContext {
|
|||||||
* currently is implemented inside the platform.
|
* currently is implemented inside the platform.
|
||||||
*/
|
*/
|
||||||
val isJavaPluginPresent: Boolean
|
val isJavaPluginPresent: Boolean
|
||||||
|
|
||||||
val isOrphanageEnabled: Boolean
|
|
||||||
|
|
||||||
val customModuleComponentSerializers: List<CustomModuleComponentSerializer>
|
val customModuleComponentSerializers: List<CustomModuleComponentSerializer>
|
||||||
|
|
||||||
val customModuleRootsSerializers: List<CustomModuleRootsSerializer>
|
val customModuleRootsSerializers: List<CustomModuleRootsSerializer>
|
||||||
|
|||||||
@@ -79,15 +79,7 @@ internal open class ModuleImlFileEntitiesSerializer(internal val modulePath: Mod
|
|||||||
createFacetSerializer().loadFacetEntities(moduleLoadedInfo.moduleEntity, reader)
|
createFacetSerializer().loadFacetEntities(moduleLoadedInfo.moduleEntity, reader)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context.isOrphanageEnabled) {
|
newModuleEntity = loadAdditionalContents(reader, virtualFileManager, moduleLoadedInfo.moduleEntity, exceptionsCollector)
|
||||||
newModuleEntity = loadAdditionalContents(reader,
|
|
||||||
virtualFileManager,
|
|
||||||
moduleLoadedInfo.moduleEntity,
|
|
||||||
exceptionsCollector)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
newModuleEntity = moduleLoadedInfo.moduleEntity
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else newModuleEntity = null
|
else newModuleEntity = null
|
||||||
}
|
}
|
||||||
@@ -109,19 +101,14 @@ internal open class ModuleImlFileEntitiesSerializer(internal val modulePath: Mod
|
|||||||
true, moduleLibrariesCollector)
|
true, moduleLibrariesCollector)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context.isOrphanageEnabled) {
|
moduleEntity = loadAdditionalContents(reader, virtualFileManager, moduleLoadedInfo.moduleEntity, exceptionsCollector)
|
||||||
moduleEntity = loadAdditionalContents(reader, virtualFileManager, moduleLoadedInfo.moduleEntity, exceptionsCollector)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
moduleEntity = tmpModuleEntity
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
val localModule = loadModuleEntity(reader, errorReporter, virtualFileManager, moduleLibrariesCollector, exceptionsCollector)
|
val localModule = loadModuleEntity(reader, errorReporter, virtualFileManager, moduleLibrariesCollector, exceptionsCollector)
|
||||||
|
|
||||||
var tmpModule = localModule?.moduleEntity
|
var tmpModule = localModule?.moduleEntity
|
||||||
|
|
||||||
if (context.isOrphanageEnabled && tmpModule != null) {
|
if (tmpModule != null) {
|
||||||
tmpModule = loadAdditionalContents(reader, virtualFileManager, tmpModule, exceptionsCollector)
|
tmpModule = loadAdditionalContents(reader, virtualFileManager, tmpModule, exceptionsCollector)
|
||||||
}
|
}
|
||||||
moduleEntity = tmpModule
|
moduleEntity = tmpModule
|
||||||
@@ -611,7 +598,7 @@ internal open class ModuleImlFileEntitiesSerializer(internal val modulePath: Mod
|
|||||||
saveModuleEntities(module, entities, storage, writer)
|
saveModuleEntities(module, entities, storage, writer)
|
||||||
}
|
}
|
||||||
else {
|
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) {
|
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 contentEntities = entities[ContentRootEntity::class.java] as? List<ContentRootEntity> ?: emptyList()
|
||||||
val sourceRootEntities = (entities[SourceRootEntity::class.java] as? List<SourceRootEntity>)?.toMutableSet() ?: mutableSetOf()
|
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) ->
|
.forEach { (contentRoot, sourceRoots) ->
|
||||||
val contentRootTag = Element(CONTENT_TAG)
|
val contentRootTag = Element(CONTENT_TAG)
|
||||||
contentRootTag.setAttribute(URL_ATTRIBUTE, contentRoot.url.url)
|
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())
|
saveSourceRootEntities(sourceRoots, contentRootTag, contentRoot.getSourceRootsComparator())
|
||||||
excludes[contentRoot.url]?.let {
|
excludes[contentRoot.url]?.let {
|
||||||
saveExcludeUrls(contentRootTag, it)
|
saveExcludeUrls(contentRootTag, it)
|
||||||
@@ -653,27 +638,21 @@ internal open class ModuleImlFileEntitiesSerializer(internal val modulePath: Mod
|
|||||||
excludes.toSortedMap(compareBy { it.url }).forEach { (url, exclude) ->
|
excludes.toSortedMap(compareBy { it.url }).forEach { (url, exclude) ->
|
||||||
val contentRootTag = Element(CONTENT_TAG)
|
val contentRootTag = Element(CONTENT_TAG)
|
||||||
contentRootTag.setAttribute(URL_ATTRIBUTE, url.url)
|
contentRootTag.setAttribute(URL_ATTRIBUTE, url.url)
|
||||||
if (context.isOrphanageEnabled) {
|
contentRootTag.setAttribute(DUMB_ATTRIBUTE, true.toString())
|
||||||
contentRootTag.setAttribute(DUMB_ATTRIBUTE, true.toString())
|
|
||||||
}
|
|
||||||
saveExcludeUrls(contentRootTag, exclude)
|
saveExcludeUrls(contentRootTag, exclude)
|
||||||
rootElement.addContent(contentRootTag)
|
rootElement.addContent(contentRootTag)
|
||||||
writer.saveComponent(fileUrl.url, targetComponent, rootElement)
|
writer.saveComponent(fileUrl.url, targetComponent, rootElement)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context.isOrphanageEnabled) {
|
// Component to save additional roots before introducing AdditionalModuleElements.
|
||||||
// Component to save additional roots before introducing AdditionalModuleElements.
|
// It's not used for this function anymore and should be cleared
|
||||||
// It's not used for this function anymore and should be cleared
|
writer.saveComponent(fileUrl.url, MODULE_ROOT_MANAGER_COMPONENT_NAME, null)
|
||||||
writer.saveComponent(fileUrl.url, MODULE_ROOT_MANAGER_COMPONENT_NAME, null)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
writer.saveComponent(fileUrl.url, MODULE_ROOT_MANAGER_COMPONENT_NAME, null)
|
writer.saveComponent(fileUrl.url, MODULE_ROOT_MANAGER_COMPONENT_NAME, null)
|
||||||
writer.saveComponent(fileUrl.url, DEPRECATED_MODULE_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