When upgrade an installed plugin in the market, the plugin disappears after IDEA restarts.
Answered
I added the following code to the plugin project, packaged the new version of the plugin and deployed it to the plugin market. When the user clicked the upgrade button in the IDEA plugin market to upgrade to the new version, IDEA prompted that the plugin was lost after restarting, just like the plugin was uninstalled. Testing found that this is a problem that must occur.
But if you use the plugin compressed package to manually overwrite and upgrade, there will be no problem.
Please help
The added code is as follows
public class ChatComponent implements ApplicationComponent {
private ChatSelectionListener chatSelectionListener;
@Override
public void initComponent() {
chatSelectionListener = new ChatSelectionListener();
EditorFactory editorFactory = EditorFactory.getInstance();
editorFactory.getEventMulticaster().addSelectionListener(chatSelectionListener);
}
@Override
public void disposeComponent() {
EditorFactory editorFactory = EditorFactory.getInstance();
editorFactory.getEventMulticaster().removeSelectionListener(chatSelectionListener);
}
}
The corresponding configuration in plugin.xml
<application-components>
<component>
<implementation-class>com.plugin.chatgpt.component.ChatComponent</implementation-class>
</component>
</application-components>
Please sign in to leave a comment.
Hi,
It sounds like a bug. I suggest reporting it to https://youtrack.jetbrains.com/issues/IJPL with exact steps to reproduce, versions, plugin distribution (if possible), etc.
BTW, do not use components in your plugin. See