[spellchecker] explicit getters for default DictionaryLayers

GitOrigin-RevId: e0f561fa26732abb7aad7f960bd656ccc6e28f0d
This commit is contained in:
Denis Mukhametianov
2024-02-08 10:54:01 +01:00
committed by intellij-monorepo-bot
parent 5ce9a661b3
commit 57374918ff

View File

@@ -46,11 +46,15 @@ class ProjectDictionaryLayer(val project: Project) : DictionaryLayer {
val name = SpellCheckerBundle.messagePointer("dictionary.name.project.level")
}
override val name = Companion.name.get()
override val dictionary: ProjectDictionary = project.service<ProjectDictionaryState>().projectDictionary
override val name: String
get() = Companion.name.get()
override val dictionary: ProjectDictionary
get() = project.service<ProjectDictionaryState>().projectDictionary
}
object ApplicationDictionaryLayer : DictionaryLayer {
override val name = SpellCheckerBundle.message("dictionary.name.application.level")
override val dictionary: EditableDictionary by lazy { AppDictionaryState.getInstance().dictionary }
override val name: String
get() = SpellCheckerBundle.message("dictionary.name.application.level")
override val dictionary: EditableDictionary
get() = AppDictionaryState.getInstance().dictionary
}