From a73b073f2ee62bf1f7c1f11ced5465c73e4dc3f8 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Fri, 2 Jun 2023 12:34:13 +0200 Subject: [PATCH] Fixed deprecated usage of `ContentFactory` in `MyToolWindowFactory` --- .../plugins/template/toolWindow/MyToolWindowFactory.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/kotlin/org/jetbrains/plugins/template/toolWindow/MyToolWindowFactory.kt b/src/main/kotlin/org/jetbrains/plugins/template/toolWindow/MyToolWindowFactory.kt index d5076b5..0e61940 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/toolWindow/MyToolWindowFactory.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/toolWindow/MyToolWindowFactory.kt @@ -19,11 +19,9 @@ class MyToolWindowFactory : ToolWindowFactory { thisLogger().warn("Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.") } - private val contentFactory = ContentFactory.SERVICE.getInstance() - override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) { val myToolWindow = MyToolWindow(toolWindow) - val content = contentFactory.createContent(myToolWindow.getContent(), null, false) + val content = ContentFactory.getInstance().createContent(myToolWindow.getContent(), null, false) toolWindow.contentManager.addContent(content) }