Which disposable to use for a component validator in a settings window? Follow
Answered
I am validating my JBTextFields in my plugin settings component using the component validation described here.
However, it does not seem right to use the project as parent disposable when reading the disposer documentation here. But I am unsure which parent disposable to use in this case. The validators are only required as long as the settings window is open, but I am not sure which disposable corresponds to the settings window.
I am grateful for any suggestions.
Please sign in to leave a comment.
If you inherit from
com.intellij.openapi.options.SettingsEditor
, you can passthis
instead.Thanks, I changed it!
What is the proper parentDisposable for a SettingsEditor? Currently, I did not register it, and a memory leak is detected during the build.
Sorry for delay. What exactly is the problem/stacktrace?
VisualDebuggerSettingsConfigurable should implement Disposable, then pass its instance (`this`) to VisualDebuggerSettingsComponent.addInputFieldValidator() into CTOR of ComponentValidator.
But when is the VisualDebuggerSettingsConfigurable registered for disposal?
I still get a similar stack trace after the changes:
Any news?
Sorry for delay, will try to check ASAP again