From be06c8856dc6b28596e1ca930bf2b48372bbb837 Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Tue, 11 Apr 2023 13:07:53 +0200 Subject: [PATCH] tool_window code sample: Fix deprecated API usage --- .../org/intellij/sdk/toolWindow/MyToolWindowFactory.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tool_window/src/main/java/org/intellij/sdk/toolWindow/MyToolWindowFactory.java b/tool_window/src/main/java/org/intellij/sdk/toolWindow/MyToolWindowFactory.java index c103feed8..677e8b939 100644 --- a/tool_window/src/main/java/org/intellij/sdk/toolWindow/MyToolWindowFactory.java +++ b/tool_window/src/main/java/org/intellij/sdk/toolWindow/MyToolWindowFactory.java @@ -1,5 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package org.intellij.sdk.toolWindow; import com.intellij.openapi.project.Project; @@ -19,8 +18,7 @@ public class MyToolWindowFactory implements ToolWindowFactory { */ public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) { MyToolWindow myToolWindow = new MyToolWindow(toolWindow); - ContentFactory contentFactory = ContentFactory.SERVICE.getInstance(); - Content content = contentFactory.createContent(myToolWindow.getContent(), "", false); + Content content = ContentFactory.getInstance().createContent(myToolWindow.getContent(), "", false); toolWindow.getContentManager().addContent(content); }