Module Service Deprecated


I am upgrading my plugin's minimum IDEA version from 2019.1 to 2020.1, and I see that Module Service was deprecated. When reading the docs, it says to try not to use module services as it may increase memory in projects with lots of modules. I do not imagine people using my plugin with lots of modules but still want to know the right way to handle this.

If we do not use module level services, how do we store information needed by a module.

In my module service I store:
- language version
- list of ignored words
- last injector used

Those values are unique per module. Is there a better way to save this data than a module service?

Thank you

1 comment

Dan, thanks for asking!

You could use the project-level service to store such information in a hashmap with keys specific to each module.


Please sign in to leave a comment.