Changing and saving configuration during plugin initialization
I've got a following usecase - I check if some plugin services are enabled I would like to change plugin configuration accordingly.
To propagate these changes to configuration gui I must persist mutated changes.
Right now I'm invoking:
Application.saveSettings() in components initComponent() method
However this leads to deadlock when some other plugin is present.
My question is - is this correct way to approach such usecase or is there some other way of doing things ?
I was thinking of offloading save to invokeLater however I'm not sure if this is viable approach.
请先登录再写评论。
Hello,
You shouldn't call Application.saveSettings() from initComponent() because DI container is not fully initialized at that moment.
I suggest you to do the following instead:
Denis