Example code: added `FrameStateListener` application listener; removed deprecated `ProjectManagerListener` application listener

pull/361/head
Jakub Chrzanowski 1 year ago committed by Jakub Chrzanowski
parent 2be34f79b2
commit 59ec0d6096

@ -6,10 +6,11 @@
### Added
- Migrate to Gradle Provider API improving configuration cache compatibility
- Example code - `FrameStateListener` application listener
### Changed
- GitHub Actions: pass changelog release notes as a multi-line content
- GitHub Actions: provide `plugin.verifier.home.dir` variable as a system property instead of project property
- GitHub Actions - pass changelog release notes as a multi-line content
- GitHub Actions - provide `plugin.verifier.home.dir` variable as a system property instead of project property
- Template Cleanup: remove default `pluginIcon.svg` icon
- Upgrade Gradle Wrapper to `8.0.1`
- Dependencies - upgrade `org.jetbrains.kotlin.jvm` to `1.8.10`
@ -18,10 +19,11 @@
- Dependencies (GitHub Actions) - upgrade `gradle/wrapper-validation-action` to `v1.0.6`
### Fixed
- Resolving the content for the `patchPluginXML.changeNotes` proeprty
- Resolving the content for the `patchPluginXML.changeNotes` property
### Removed
- Example code - application service
- Example code - deprecated `ProjectManagerListener` application listener
## [1.4.0] - 2023-01-13

@ -0,0 +1,14 @@
package org.jetbrains.plugins.template.listeners
import com.intellij.ide.FrameStateListener
import com.intellij.openapi.diagnostic.thisLogger
internal class MyFrameStateListener : FrameStateListener {
override fun onFrameActivated() {
thisLogger().info("Frame activated")
System.getenv("CI")
?: TODO("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.")
}
}

@ -1,16 +0,0 @@
package org.jetbrains.plugins.template.listeners
import com.intellij.openapi.components.service
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.ProjectManagerListener
import org.jetbrains.plugins.template.services.MyProjectService
internal class MyProjectManagerListener : ProjectManagerListener {
override fun projectOpened(project: Project) {
project.service<MyProjectService>()
System.getenv("CI")
?: TODO("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.")
}
}

@ -13,7 +13,7 @@
</extensions>
<applicationListeners>
<listener class="org.jetbrains.plugins.template.listeners.MyProjectManagerListener"
topic="com.intellij.openapi.project.ProjectManagerListener"/>
<listener class="org.jetbrains.plugins.template.listeners.MyFrameStateListener"
topic="com.intellij.ide.FrameStateListener"/>
</applicationListeners>
</idea-plugin>

Loading…
Cancel
Save