Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cargo tool window initialization on 2023.3 #10719

Merged
merged 1 commit into from Jul 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -19,7 +19,7 @@ import com.intellij.openapi.wm.ToolWindow
import com.intellij.openapi.wm.ToolWindowEP
import com.intellij.openapi.wm.ToolWindowFactory
import com.intellij.openapi.wm.ToolWindowManager
import com.intellij.openapi.wm.ex.ToolWindowManagerEx
import com.intellij.openapi.wm.impl.ToolWindowManagerImpl
import com.intellij.ui.ColorUtil
import com.intellij.ui.ScrollPaneFactory
import com.intellij.ui.content.ContentFactory
Expand Down Expand Up @@ -138,7 +138,8 @@ class CargoToolWindow(

fun initializeToolWindow(project: Project) {
try {
val manager = ToolWindowManager.getInstance(project) as? ToolWindowManagerEx ?: return
@Suppress("UnstableApiUsage")
val manager = ToolWindowManager.getInstance(project) as? ToolWindowManagerImpl ?: return
val bean = ToolWindowEP.EP_NAME.extensionList.find { it.id == ID }
if (bean != null) {
@Suppress("DEPRECATION", "UnstableApiUsage")
Expand Down