diff --git a/platform/analysis-impl/src/com/intellij/profile/codeInspection/BaseInspectionProfileManager.kt b/platform/analysis-impl/src/com/intellij/profile/codeInspection/BaseInspectionProfileManager.kt index bd1c3edf31f16..0e9d218b28205 100644 --- a/platform/analysis-impl/src/com/intellij/profile/codeInspection/BaseInspectionProfileManager.kt +++ b/platform/analysis-impl/src/com/intellij/profile/codeInspection/BaseInspectionProfileManager.kt @@ -18,9 +18,9 @@ package com.intellij.profile.codeInspection import com.intellij.codeInsight.daemon.impl.SeverityRegistrar import com.intellij.codeInspection.InspectionProfile import com.intellij.codeInspection.ex.InspectionProfileImpl +import com.intellij.configurationStore.LazySchemeProcessor import com.intellij.openapi.Disposable import com.intellij.openapi.diagnostic.Logger -import com.intellij.openapi.options.LazySchemeProcessor import com.intellij.openapi.options.SchemeManager import com.intellij.openapi.options.SchemeState import com.intellij.openapi.project.Project diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleSchemesImpl.java b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleSchemesImpl.java index 1a465d9d86d81..6a0039d31ac19 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleSchemesImpl.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleSchemesImpl.java @@ -15,8 +15,8 @@ */ package com.intellij.psi.impl.source.codeStyle; +import com.intellij.configurationStore.LazySchemeProcessor; import com.intellij.configurationStore.SchemeDataHolder; -import com.intellij.openapi.options.LazySchemeProcessor; import com.intellij.openapi.options.SchemeManager; import com.intellij.openapi.options.SchemeManagerFactory; import com.intellij.openapi.options.SchemeState; diff --git a/platform/projectModel-impl/src/com/intellij/openapi/ExternalizableSchemeAdapter.kt b/platform/projectModel-impl/src/com/intellij/openapi/ExternalizableSchemeAdapter.kt index 59ec15a24fd09..9f1b21e2a548f 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/ExternalizableSchemeAdapter.kt +++ b/platform/projectModel-impl/src/com/intellij/openapi/ExternalizableSchemeAdapter.kt @@ -15,11 +15,8 @@ */ package com.intellij.openapi.options -import com.intellij.configurationStore.SchemeDataHolder import com.intellij.configurationStore.SchemeExtensionProvider -import com.intellij.configurationStore.SerializableScheme import org.jdom.Element -import java.util.function.Function import kotlin.properties.Delegates abstract class ExternalizableSchemeAdapter : ExternalizableScheme { @@ -28,18 +25,6 @@ abstract class ExternalizableSchemeAdapter : ExternalizableScheme { override fun toString() = name } -abstract class LazySchemeProcessor : SchemeProcessor() { - open fun getName(attributeProvider: Function): String { - return attributeProvider.apply("name") ?: throw IllegalStateException("name is missed in the scheme data") - } - - abstract fun createScheme(dataHolder: SchemeDataHolder, name: String, attributeProvider: Function, duringLoad: Boolean): MUTABLE_SCHEME - - override final fun writeScheme(scheme: MUTABLE_SCHEME) = (scheme as SerializableScheme).writeScheme() - - open fun isSchemeFile(name: CharSequence) = true -} - abstract class BaseSchemeProcessor : NonLazySchemeProcessor(), SchemeExtensionProvider { override val isUpgradeNeeded = false diff --git a/platform/projectModel-impl/src/com/intellij/openapi/scheme-impl.kt b/platform/projectModel-impl/src/com/intellij/openapi/scheme-impl.kt index 226a357f15c62..7fee19968eeb9 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/scheme-impl.kt +++ b/platform/projectModel-impl/src/com/intellij/openapi/scheme-impl.kt @@ -16,9 +16,11 @@ package com.intellij.configurationStore import com.intellij.openapi.options.Scheme +import com.intellij.openapi.options.SchemeProcessor import org.jdom.Element +import java.util.function.Function -interface SchemeDataHolder { +interface SchemeDataHolder { /** * You should call updateDigest() after read on init. */ @@ -45,4 +47,16 @@ interface SchemeExtensionProvider { * @return True if the upgrade from the old default .xml extension is needed. */ val isUpgradeNeeded: Boolean +} + +abstract class LazySchemeProcessor : SchemeProcessor() { + open fun getName(attributeProvider: Function): String { + return attributeProvider.apply("name") ?: throw IllegalStateException("name is missed in the scheme data") + } + + abstract fun createScheme(dataHolder: SchemeDataHolder, name: String, attributeProvider: Function, duringLoad: Boolean): MUTABLE_SCHEME + + override final fun writeScheme(scheme: MUTABLE_SCHEME) = (scheme as SerializableScheme).writeScheme() + + open fun isSchemeFile(name: CharSequence) = true } \ No newline at end of file