mirror of
https://github.com/JetBrains/intellij-platform-plugin-template.git
synced 2024-10-27 20:44:05 +00:00
Example code - registered project service changed into a lightweight one
This commit is contained in:
parent
59ec0d6096
commit
b8ad6a9a5e
@ -9,6 +9,7 @@
|
||||
- Example code - `FrameStateListener` application listener
|
||||
|
||||
### Changed
|
||||
- Example code - registered project service changed into a lightweight one
|
||||
- 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
|
||||
|
@ -1,12 +1,15 @@
|
||||
package org.jetbrains.plugins.template.services
|
||||
|
||||
import com.intellij.openapi.components.Service
|
||||
import com.intellij.openapi.diagnostic.thisLogger
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.plugins.template.MyBundle
|
||||
|
||||
@Service(Service.Level.PROJECT)
|
||||
class MyProjectService(project: Project) {
|
||||
|
||||
init {
|
||||
println(MyBundle.message("projectService", project.name))
|
||||
thisLogger().info(MyBundle.message("projectService", project.name))
|
||||
|
||||
System.getenv("CI")
|
||||
?: TODO("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.")
|
||||
|
@ -7,10 +7,6 @@
|
||||
<depends>com.intellij.modules.platform</depends>
|
||||
|
||||
<resource-bundle>messages.MyBundle</resource-bundle>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<projectService serviceImplementation="org.jetbrains.plugins.template.services.MyProjectService"/>
|
||||
</extensions>
|
||||
|
||||
<applicationListeners>
|
||||
<listener class="org.jetbrains.plugins.template.listeners.MyFrameStateListener"
|
||||
|
Loading…
Reference in New Issue
Block a user