Plugin Uninstall Listener
已回答
I need a way to execute code when user decide to disable or uninstall my plugin.
I tried
package listener;
import com.intellij.ide.plugins.IdeaPluginDescriptor;
import com.intellij.ide.plugins.PluginStateListener;
import org.jetbrains.annotations.NotNull;
public class Uninstall implements PluginStateListener {
@Override
public void install(@NotNull IdeaPluginDescriptor ideaPluginDescriptor) {
System.out.println("install");
}
@Override
public void uninstall(@NotNull IdeaPluginDescriptor ideaPluginDescriptor) {
System.out.println("uninstall");
}
}
but nothing happens.
请先登录再写评论。
Please see
DynamicPluginListener
https://plugins.jetbrains.com/docs/intellij/dynamic-plugins.html#plugin-loadunload-events