From a1e1caac6a171b5fc108fcaff02ad20abf94b2d0 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Thu, 27 Apr 2017 09:35:20 +0200 Subject: [PATCH] move class TestModuleStore to file level --- .../src/ModuleStoreImpl.kt | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/platform/configuration-store-impl/src/ModuleStoreImpl.kt b/platform/configuration-store-impl/src/ModuleStoreImpl.kt index 02248dcfca7e..80dd3dccf091 100644 --- a/platform/configuration-store-impl/src/ModuleStoreImpl.kt +++ b/platform/configuration-store-impl/src/ModuleStoreImpl.kt @@ -29,25 +29,25 @@ private open class ModuleStoreImpl(module: Module, private val pathMacroManager: override val storageManager = ModuleStateStorageManager(pathMacroManager.createTrackingSubstitutor(), module) override final fun getPathMacroManagerForDefaults() = pathMacroManager +} - private class TestModuleStore(module: Module, pathMacroManager: PathMacroManager) : ModuleStoreImpl(module, pathMacroManager) { - private var moduleComponentLoadPolicy: StateLoadPolicy? = null +private class TestModuleStore(module: Module, pathMacroManager: PathMacroManager) : ModuleStoreImpl(module, pathMacroManager) { + private var moduleComponentLoadPolicy: StateLoadPolicy? = null - override fun setPath(path: String) { - setPath(path, null) - } - - override fun setPath(path: String, file: VirtualFile?) { - super.setPath(path, file) - - if ((file != null && file.isValid) || Paths.get(path).exists()) { - moduleComponentLoadPolicy = StateLoadPolicy.LOAD - } - } - - override val loadPolicy: StateLoadPolicy - get() = moduleComponentLoadPolicy ?: (project.stateStore as ComponentStoreImpl).loadPolicy + override fun setPath(path: String) { + setPath(path, null) } + + override fun setPath(path: String, file: VirtualFile?) { + super.setPath(path, file) + + if ((file != null && file.isValid) || Paths.get(path).exists()) { + moduleComponentLoadPolicy = StateLoadPolicy.LOAD + } + } + + override val loadPolicy: StateLoadPolicy + get() = moduleComponentLoadPolicy ?: (project.stateStore as ComponentStoreImpl).loadPolicy } // used in upsource