diff --git a/platform/configuration-store-impl/src/schemeManager/SchemeManagerBase.kt b/platform/configuration-store-impl/src/schemeManager/SchemeManagerBase.kt index b220040207ed..4d44b4e0f7b4 100644 --- a/platform/configuration-store-impl/src/schemeManager/SchemeManagerBase.kt +++ b/platform/configuration-store-impl/src/schemeManager/SchemeManagerBase.kt @@ -12,10 +12,7 @@ abstract class SchemeManagerBase(internal val pr protected var currentPendingSchemeName: String? = null override var currentScheme: T? = null - set(value) { - field = value - currentSchemeName = value?.let { processor.getSchemeKey(it) } - } + internal set override var currentSchemeName: String? get() = currentScheme?.let { processor.getSchemeKey(it) } ?: currentPendingSchemeName diff --git a/platform/projectModel-impl/src/com/intellij/openapi/options/EmptySchemesManager.java b/platform/projectModel-impl/src/com/intellij/openapi/options/EmptySchemesManager.java index a02774e85a3f..70cf8ac0e755 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/options/EmptySchemesManager.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/options/EmptySchemesManager.java @@ -63,10 +63,6 @@ public class EmptySchemesManager extends SchemeManager { public void setCurrentSchemeName(@Nullable String schemeName, boolean notify) { } - @Override - public void setCurrent(@Nullable Scheme scheme, boolean notify) { - } - @Override public void setCurrentSchemeName(@Nullable String s) { } diff --git a/platform/projectModel-impl/src/com/intellij/openapi/options/SchemeManager.kt b/platform/projectModel-impl/src/com/intellij/openapi/options/SchemeManager.kt index ac2ba368fb69..7de7c67fe2f3 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/options/SchemeManager.kt +++ b/platform/projectModel-impl/src/com/intellij/openapi/options/SchemeManager.kt @@ -25,7 +25,7 @@ abstract class SchemeManager { open val isEmpty: Boolean get() = allSchemes.isEmpty() - abstract var currentScheme: T? + abstract val currentScheme: T? /** * If schemes are lazy loaded, you can use this method to postpone scheme selection (scheme will be found by name on first use) @@ -55,12 +55,10 @@ abstract class SchemeManager { abstract fun setCurrentSchemeName(schemeName: String?, notify: Boolean) - fun setCurrent(scheme: T?) { - setCurrent(scheme, true) + @JvmOverloads + open fun setCurrent(scheme: T?, notify: Boolean = true) { } - abstract fun setCurrent(scheme: T?, notify: Boolean) - abstract fun removeScheme(scheme: T): Boolean open fun removeScheme(name: String): T? { diff --git a/platform/projectModel-impl/src/com/intellij/openapi/options/SchemeManagerBase.kt b/platform/projectModel-impl/src/com/intellij/openapi/options/SchemeManagerBase.kt new file mode 100644 index 000000000000..d95f8308d0c2 --- /dev/null +++ b/platform/projectModel-impl/src/com/intellij/openapi/options/SchemeManagerBase.kt @@ -0,0 +1,5 @@ +// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +package com.intellij.openapi.options + +class SchemeManagerBase { +} \ No newline at end of file