| 1 |
package org.jetbrains.plugins.template.services |
| 2 |
|
| 3 |
import com.intellij.openapi.components.Service |
| 4 |
import com.intellij.openapi.diagnostic.thisLogger |
| 5 |
import com.intellij.openapi.project.Project |
| 6 |
import org.jetbrains.plugins.template.MyBundle |
| 7 |
|
| 8 |
@Service(Service.Level.PROJECT) |
| 9 |
class MyProjectService(project: Project) { |
| 10 |
|
| 11 |
init { |
| 12 |
thisLogger().info(MyBundle["projectService", project.name]) |
| 13 |
thisLogger().warn("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.") |
| 14 |
} |
| 15 |
|
| 16 |
fun getRandomNumber() = (1..100).random() |
| 17 |
} |