mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Inlay hints: make settings searchable
GitOrigin-RevId: c23f76935f6a6f4d637cdf0e7a1980873c33e239
This commit is contained in:
committed by
intellij-monorepo-bot
parent
631af29abf
commit
13044f8b84
+6
-1
@@ -5,10 +5,11 @@ import com.intellij.codeInsight.hints.*
|
||||
import com.intellij.lang.Language
|
||||
import com.intellij.openapi.components.ServiceManager
|
||||
import com.intellij.openapi.options.Configurable
|
||||
import com.intellij.openapi.options.SearchableConfigurable
|
||||
import com.intellij.openapi.project.Project
|
||||
import javax.swing.JComponent
|
||||
|
||||
class SingleLanguageInlayHintsConfigurable(project: Project, val language: Language) : Configurable {
|
||||
class SingleLanguageInlayHintsConfigurable(project: Project, val language: Language) : Configurable, SearchableConfigurable {
|
||||
private val panel: SingleLanguageInlayHintsSettingsPanel by lazy {
|
||||
val settings = ServiceManager.getService(InlayHintsSettings::class.java)
|
||||
// All configurables operate with copy of settings, that is why we can do live preview
|
||||
@@ -22,6 +23,10 @@ class SingleLanguageInlayHintsConfigurable(project: Project, val language: Langu
|
||||
SingleLanguageInlayHintsSettingsPanel(project, language, keyToProvider, settingsWrappers, providers.first(), options)
|
||||
}
|
||||
|
||||
override fun getId(): String {
|
||||
return "inlay.hints." + language.id
|
||||
}
|
||||
|
||||
|
||||
override fun isModified(): Boolean {
|
||||
return panel.isModified()
|
||||
|
||||
Reference in New Issue
Block a user