mirror of
https://github.com/JetBrains/intellij-platform-plugin-template.git
synced 2024-10-27 20:44:05 +00:00
Remove MyDynamicPluginListener
This commit is contained in:
parent
062cb65722
commit
3e1244f12c
@ -146,7 +146,6 @@ general scaffold. Having that in mind, it contains few following files:
|
|||||||
.
|
.
|
||||||
├── MyBundle.kt Bundle class providing access to the resources messages
|
├── MyBundle.kt Bundle class providing access to the resources messages
|
||||||
├── listeners
|
├── listeners
|
||||||
│ ├── MyDynamicPluginListener.kt Dynamic Plugin listener - handles plugin lifecycle events
|
|
||||||
│ └── MyProjectManagerListener.kt Project Manager listener - handles project lifecycle
|
│ └── MyProjectManagerListener.kt Project Manager listener - handles project lifecycle
|
||||||
└── services
|
└── services
|
||||||
├── MyApplicationService.kt Application-level service available for all projects
|
├── MyApplicationService.kt Application-level service available for all projects
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
package org.jetbrains.plugins.template.listeners
|
|
||||||
|
|
||||||
import com.intellij.ide.plugins.DynamicPluginListener
|
|
||||||
import com.intellij.ide.plugins.IdeaPluginDescriptor
|
|
||||||
import com.intellij.openapi.components.ServiceManager
|
|
||||||
import org.jetbrains.plugins.template.services.MyApplicationService
|
|
||||||
|
|
||||||
internal class MyDynamicPluginListener : DynamicPluginListener {
|
|
||||||
|
|
||||||
override fun beforePluginLoaded(pluginDescriptor: IdeaPluginDescriptor) {
|
|
||||||
ServiceManager.getService(MyApplicationService::class.java)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun pluginLoaded(pluginDescriptor: IdeaPluginDescriptor) = Unit
|
|
||||||
|
|
||||||
override fun beforePluginUnload(pluginDescriptor: IdeaPluginDescriptor, isUpdate: Boolean) = Unit
|
|
||||||
|
|
||||||
override fun checkUnloadPlugin(pluginDescriptor: IdeaPluginDescriptor) = Unit
|
|
||||||
|
|
||||||
override fun pluginUnloaded(pluginDescriptor: IdeaPluginDescriptor, isUpdate: Boolean) = Unit
|
|
||||||
}
|
|
@ -15,7 +15,5 @@
|
|||||||
<projectListeners>
|
<projectListeners>
|
||||||
<listener class="org.jetbrains.plugins.template.listeners.MyProjectManagerListener"
|
<listener class="org.jetbrains.plugins.template.listeners.MyProjectManagerListener"
|
||||||
topic="com.intellij.openapi.project.ProjectManagerListener"/>
|
topic="com.intellij.openapi.project.ProjectManagerListener"/>
|
||||||
<listener class="org.jetbrains.plugins.template.listeners.MyDynamicPluginListener"
|
|
||||||
topic="com.intellij.ide.plugins.DynamicPluginListener"/>
|
|
||||||
</projectListeners>
|
</projectListeners>
|
||||||
</idea-plugin>
|
</idea-plugin>
|
||||||
|
Loading…
Reference in New Issue
Block a user