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

This commit is contained in:
Jakub Chrzanowski 2023-03-02 16:31:41 +01:00 committed by Jakub Chrzanowski
parent 2be34f79b2
commit 59ec0d6096
4 changed files with 21 additions and 21 deletions

View File

@ -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

View File

@ -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`.")
}
}

View File

@ -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`.")
}
}

View File

@ -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>