How to remove the contents of persisted values on uninstall of intellij plugin?
Hi,
I am developing an intellij plugin and it persists some values in example.xml like this:-
@State(name = "CloudConfig", storages = @Storage("example.xml"))
I want to remove these values upon uninstall of the plugin.For that i have implemented
StartupActivity interface and wrote the code like this:-
@Override
public void runActivity(@NotNull com.intellij.openapi.project.Project project) {
com.intellij.ide.plugins.PluginInstaller.addStateListener(new PluginStateListener() {
@Override
public void install(@NotNull IdeaPluginDescriptor ideaPluginDescriptor) {
LOG.info("installing plugin");
}
@Override
public void uninstall(@NotNull IdeaPluginDescriptor ideaPluginDescriptor) {
LOG.info("Uninstalling plugin");
}
});
}
Could you suggest how to locate the example.xml and remove the contents?
Please sign in to leave a comment.
Hi..please help as i am in an urgent phase.
Hi..is there any way to locate example.xml and remove its contents...please advise.
Same issue is there for my plugin. It looks like the persistence xml is getting retained even though the plugin is uninstalled. Is there any option available in IntelliJ to remove it during uninstall ?
Thanks,
Manoj
Hello All,
Please help. Please consider it as urgent .
Thanks in advance
Manoj
Did anyone find a solution to this?