Migrate plugin to be dynamic
JetBrains has deprecated components to make IDE startup more performant. The commit migrates the DarkModeSync component into a service and post startup activity. Here are some links from JetBrains docs about dynamic plugin migrations.
- https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/dynamic_plugins.html
- https://jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_components.html
Hi Jonathan
I'm glad that you found this PR useful 😄 . JetBrains does make a lot of changes to their platform APIs and it is really difficult to figure out what they are and how that will impact things 😦 .
I've made the changes you requested. I totally missed that a new service instance would be created for every project opened! Great catch 👏 . Please let me know what you think on this commit that should address these changes: https://github.com/nazmulidris/dark-mode-sync-plugin/commit/47323eb5c35c934e702e1e3180e96b9b38377491
Thanks Nazmul
FWIW, I would love to see this PR land! The UX of dynamically loading / unloading plugins is really nice as a user! :)
Thanks for making those changes! I tested it out tonight and it's not working as expected. I ran ./gradlew runIde to test manually as I normally do, and the themes didn't update as expected.
I'll dig in and see if I can figure out why