mirror of
https://github.com/JetBrains/intellij-platform-plugin-template.git
synced 2024-10-27 20:44:05 +00:00
Migrate from the deprecated FrameStateListener.onFrameActivated()
to ApplicationActivationListener.applicationActivated(IdeFrame)
This commit is contained in:
parent
a73b073f2e
commit
d22a737277
@ -16,6 +16,10 @@
|
||||
- Upgrade Gradle Wrapper to `8.1.1`
|
||||
- GitHub Actions — switch to Java 17
|
||||
|
||||
### Fixed
|
||||
- Example code - Fixed deprecated usage of `ContentFactory` in `MyToolWindowFactory` Jakub Chrzanowski A minute ago d454bc09
|
||||
- Example code - Migrate from the deprecated `FrameStateListener.onFrameActivated()` to `ApplicationActivationListener.applicationActivated(IdeFrame)`
|
||||
|
||||
## [1.6.0] - 2023-04-13
|
||||
|
||||
### Added
|
||||
|
@ -218,13 +218,13 @@ Therefore, the template contains only the following files:
|
||||
|
||||
```
|
||||
.
|
||||
├── MyBundle.kt Bundle class providing access to the resources messages
|
||||
├── MyBundle.kt Bundle class providing access to the resources messages
|
||||
├── listeners
|
||||
│ └── MyFrameStateListener.kt Frame state listener — detects when IDE frame is opened/closed
|
||||
│ └── MyApplicationActivationListener.kt Application activation listener — detects when IDE frame is activated
|
||||
├── services
|
||||
│ └── MyProjectService.kt Project level service
|
||||
│ └── MyProjectService.kt Project level service
|
||||
├── toolWindow
|
||||
│ └── MyToolWindowFactory.kt Tool window factory — creates tool window content
|
||||
│ └── MyToolWindowFactory.kt Tool window factory — creates tool window content
|
||||
└
|
||||
```
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
package org.jetbrains.plugins.template.listeners
|
||||
|
||||
import com.intellij.ide.FrameStateListener
|
||||
import com.intellij.openapi.application.ApplicationActivationListener
|
||||
import com.intellij.openapi.diagnostic.thisLogger
|
||||
import com.intellij.openapi.wm.IdeFrame
|
||||
|
||||
internal class MyFrameStateListener : FrameStateListener {
|
||||
internal class MyApplicationActivationListener : ApplicationActivationListener {
|
||||
|
||||
override fun onFrameActivated() {
|
||||
override fun applicationActivated(ideFrame: IdeFrame) {
|
||||
thisLogger().warn("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.")
|
||||
}
|
||||
}
|
@ -13,6 +13,6 @@
|
||||
</extensions>
|
||||
|
||||
<applicationListeners>
|
||||
<listener class="org.jetbrains.plugins.template.listeners.MyFrameStateListener" topic="com.intellij.ide.FrameStateListener"/>
|
||||
<listener class="org.jetbrains.plugins.template.listeners.MyApplicationActivationListener" topic="com.intellij.openapi.application.ApplicationActivationListener"/>
|
||||
</applicationListeners>
|
||||
</idea-plugin>
|
||||
|
Loading…
Reference in New Issue
Block a user