mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Revert External project storage — append postfix @maven to store maven module data
This reverts commit 2e4f94e68a
because no easy way to fix JPS for now
This commit is contained in:
+2
-8
@@ -22,7 +22,6 @@ import com.intellij.configurationStore.XmlElementStorage
|
||||
import com.intellij.openapi.components.RoamingType
|
||||
import com.intellij.openapi.components.StateSplitterEx
|
||||
import com.intellij.openapi.components.StoragePathMacros
|
||||
import com.intellij.openapi.externalSystem.ExternalSystemModulePropertyManager
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.JDOMUtil
|
||||
@@ -36,16 +35,11 @@ internal class ExternalModuleStorage(private val module: Module, storageManager:
|
||||
override fun createSaveSession(states: StateMap) = object : XmlElementStorageSaveSession<ExternalModuleStorage>(states, this) {
|
||||
override fun saveLocally(element: Element?) {
|
||||
// our customizeStorageSpecs on write will not return our storage for not applicable module, so, we don't need to check it here
|
||||
var name = module.name
|
||||
if (ExternalSystemModulePropertyManager.getInstance(module).isMavenized()) {
|
||||
// to distinguish because one project can contain modules from different external systems
|
||||
name += "@maven"
|
||||
}
|
||||
if (element == null) {
|
||||
manager.moduleStorage.remove(name)
|
||||
manager.moduleStorage.remove(module.name)
|
||||
}
|
||||
else {
|
||||
manager.moduleStorage.write(name, element)
|
||||
manager.moduleStorage.write(module.name, element)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ class ExternalSystemStorageTest {
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4" />""")
|
||||
|
||||
assertThat(cacheDir.resolve("test@maven.xml")).isEqualTo("""
|
||||
assertThat(cacheDir.resolve("test.xml")).isEqualTo("""
|
||||
<module>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
|
||||
Reference in New Issue
Block a user