mirror of
https://github.com/chylex/IntelliJ-Keyboard-Master.git
synced 2025-05-07 08:34:07 +02:00
Fix configuration not loading
This commit is contained in:
parent
2f3780bdfc
commit
798264316b
src/main/kotlin/com/chylex/intellij/keyboardmaster
@ -19,8 +19,8 @@ class PluginConfiguration : PersistentStateComponent<PluginConfiguration> {
|
||||
private val instance: PluginConfiguration
|
||||
get() = ApplicationManager.getApplication().getService(PluginConfiguration::class.java)
|
||||
|
||||
init {
|
||||
instance.apply(this::update)
|
||||
fun load() {
|
||||
instance
|
||||
}
|
||||
|
||||
fun read(callback: (PluginConfiguration) -> Unit) {
|
||||
@ -42,5 +42,6 @@ class PluginConfiguration : PersistentStateComponent<PluginConfiguration> {
|
||||
|
||||
override fun loadState(state: PluginConfiguration) {
|
||||
XmlSerializerUtil.copyBean(state, this)
|
||||
update(this)
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,10 @@ class ProjectLookupListener : LookupManagerListener {
|
||||
val itemShortcutCount
|
||||
get() = hintTexts.size
|
||||
|
||||
init {
|
||||
PluginConfiguration.load()
|
||||
}
|
||||
|
||||
fun updateShortcuts(configuration: PluginConfiguration) {
|
||||
hintTexts.clear()
|
||||
for (char in configuration.codeCompletionItemShortcuts) {
|
||||
|
Loading…
Reference in New Issue
Block a user