Skip to content

Commit

Permalink
Fix new pannel not opening in IJ 242+
Browse files Browse the repository at this point in the history
  • Loading branch information
pkukielka committed Oct 10, 2024
1 parent 8a3c1c9 commit d18c221
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ package com.sourcegraph.cody.ui.web
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.fileEditor.FileEditor
import com.intellij.openapi.fileEditor.FileEditorLocation
import com.intellij.openapi.fileEditor.FileEditorManager
import com.intellij.openapi.fileEditor.FileEditorPolicy
import com.intellij.openapi.fileEditor.FileEditorProvider
import com.intellij.openapi.fileEditor.FileEditorState
import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Key
Expand Down Expand Up @@ -77,8 +75,6 @@ class WebPanelProvider : FileEditorProvider, DumbAware {

override fun createEditor(project: Project, file: VirtualFile): FileEditor {
ApplicationManager.getApplication().assertIsDispatchThread()
// If this file is already open elsewhere, close it.
(FileEditorManager.getInstance(project) as? FileEditorManagerEx)?.closeFile(file)

// If file was reopened we don't want to dispose WebView, as it means panel was just moved
// between editors
Expand Down

0 comments on commit d18c221

Please sign in to comment.