How to clear data in Preference Store when uninsta

2019-08-06 10:26发布

I'm developing an Eclipse-Plugin which has it's own preference page. I'm storing some data using IPersistentPreferenceStore, but would like to remove / clear this data upon uninstall of my plugin. Otherwise, whenever I re-install the plugin, I get the old data loaded again from previous installations.

So far I was not successful in finding any hooks / events for eclipse plugin uninstall to notify my plugin. Does anyone have an idea?

1条回答
我欲成王,谁敢阻挡
2楼-- · 2019-08-06 11:29

A way is that your plug-in explicitly registers a listener to IProvisioningEventBus that is an internal API of P2.

Then your listener would be notified if something are about to be removed, clean your preference store if the to be removed plug-in is what you want.

查看更多
登录 后发表回答