How to save plugin project settings
已回答
Hello,
I'm trying to save the settings of a project but nothing happen.
The following project does nothing. It only have the configurable, the persistentState for the settings and a tab window.
Code is pretty straight forward.
Upload id: 2023_02_07_9QxVhWwN7JSuxu8UtaPt89 (file: plugin.zip)
Can someone have a look ?
thanks
请先登录再写评论。
Hi,
Since you are configurable at a project level, so every opened project will create an object RobotProjectSettings , so that your code
will make no sense. This class should be created by the IDEA project module itself.
Please try to change your code RobotProjectSettings a bit:
and fix the corresponding errors which call this method, and pass a project parameter to it, like this:
. I've tried the fixed code and it works well.
Also, this document might be helpful: https://plugins.jetbrains.com/docs/intellij/plugin-services.html
Thank you. It works.
The key is point I haven't found was: