mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 13:31:28 +07:00
[RDCT] GTW-2902: Allow Diff editor to be opened in a new window
Before this commit, openMode was not passed for remote clients because it was not supported for them. (cherry picked from commit 6d788461cbecfbb9990dabe6a7c7fc19e7599f60) IJ-CR-148304 GitOrigin-RevId: 233aee8c17a77ee24d7df0cadeed8cf512efe0a0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e99203c8e2
commit
39f1b98537
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.diff.editor
|
||||
|
||||
import com.intellij.codeWithMe.ClientId
|
||||
import com.intellij.diff.editor.DiffEditorTabFilesManager.Companion.isDiffInEditor
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
@@ -24,11 +23,6 @@ import com.intellij.util.containers.headTail
|
||||
internal class DiffEditorTabFilesManagerImpl(val project: Project) : DiffEditorTabFilesManager {
|
||||
override fun showDiffFile(diffFile: VirtualFile, focusEditor: Boolean): Array<out FileEditor> {
|
||||
val editorManager = FileEditorManager.getInstance(project) as FileEditorManagerImpl
|
||||
if (!ClientId.isCurrentlyUnderLocalId) {
|
||||
// do not use FileEditorManagerImpl.getWindows - these are not implemented for clients
|
||||
return editorManager.openFile(file = diffFile, focusEditor = focusEditor, searchForOpen = true)
|
||||
}
|
||||
|
||||
val openMode = if (isDiffInEditor) FileEditorManagerImpl.OpenMode.DEFAULT else FileEditorManagerImpl.OpenMode.NEW_WINDOW
|
||||
val newTab = editorManager.openFile(
|
||||
file = diffFile,
|
||||
|
||||
Reference in New Issue
Block a user