breandan
07/17/2017, 7:03 AMPersistentStateComponent
. Nothing seems to be calling loadState()
. Any ideas what I'm doing wrong? https://github.com/johnlindquist/AceJump/blob/master/src/main/kotlin/com/johnlindquist/acejump/config/AceConfig.ktyole
07/17/2017, 9:16 AMbreandan
07/17/2017, 4:39 PMAceConfig
to be a service from the plugin manifest and ensured that the settings are non-default. It remembers settings between opening the settings page, but once the IDE is restarted, it forgets all settings. Also I'm not seeing any file called "AceJump.xml" as declared in the Storage annotationyole
07/17/2017, 4:47 PMbreandan
07/17/2017, 5:06 PMloadState()
is never called, I debugged it. Settings
also contains a collection of chars which is not persisted. I think it may have something to do with the way Kotlin instantiates objects. Also I'm mixing Configurable
and PersistentStateComponent
, could that be a problem?breandan
07/17/2017, 5:08 PMSettings
is implemented as a data class: https://github.com/johnlindquist/AceJump/blob/master/src/main/kotlin/com/johnlindquist/acejump/view/Model.kt#L65 (as suggested here: http://www.jetbrains.org/intellij/sdk/docs/basics/persisting_state_of_components.html?search=persis#implementing-the-state-class)yole
07/17/2017, 5:09 PMbreandan
07/17/2017, 5:14 PMPersistentStateComponent
be able to persist changes to allowedChars
? I can verify that those changes are being stored inside AceConfig.settings
as long as the IDE is open