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?
0
5 comments
Avatar
Permanently deleted user

Hi..please help as i am in an urgent phase.

0
Avatar
Permanently deleted user

Hi..is there any way to locate example.xml and remove its contents...please advise.

0
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

Hello All,

Please help. Please consider it as urgent .

 

Thanks in advance

Manoj

0
Avatar
Permanently deleted user

Did anyone find a solution to this?

 

0

Please sign in to leave a comment.