mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
tool_window code sample: Fix deprecated API usage
This commit is contained in:
parent
ce89421f49
commit
be06c8856d
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user