Skip to content

Commit 11f7c28

Browse files
committed
feat: try to add unload listener
1 parent 501fccc commit 11f7c28

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package cc.unitmesh.devti
2+
3+
import com.intellij.ide.plugins.DynamicPluginListener
4+
import com.intellij.ide.plugins.IdeaPluginDescriptor
5+
6+
class AutoDevUnloadListener: DynamicPluginListener {
7+
override fun beforePluginUnload(pluginDescriptor: IdeaPluginDescriptor, isUpdate: Boolean) {
8+
9+
}
10+
}

src/main/resources/META-INF/autodev-core.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@
139139
dynamic="true"/>
140140
</extensionPoints>
141141

142+
<applicationListeners>
143+
<listener topic="com.intellij.ide.plugins.DynamicPluginListener"
144+
class="cc.unitmesh.devti.AutoDevUnloadListener"/>
145+
</applicationListeners>
146+
142147
<extensions defaultExtensionNs="cc.unitmesh">
143148
<autoDevIntention>
144149
<className>cc.unitmesh.devti.intentions.action.NewChatWithCodeIntention</className>

0 commit comments

Comments
 (0)