mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-754076 diff: do not unnecessarily create DiffRequestProcessorEditor
Fix 'SplitAction.FORBID_TAB_SPLIT' violations. GitOrigin-RevId: 0c16f4d3ec80458552f1fa57e802955307be5cbc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ff2fb768ed
commit
59c073a02a
@@ -5,9 +5,11 @@ import com.intellij.diff.tools.combined.CombinedDiffComponentFactoryProvider
|
||||
import com.intellij.diff.tools.combined.CombinedDiffEditor
|
||||
import com.intellij.diff.tools.combined.CombinedDiffModelRepository
|
||||
import com.intellij.diff.tools.combined.CombinedDiffVirtualFile
|
||||
import com.intellij.ide.structureView.StructureViewBuilder
|
||||
import com.intellij.openapi.components.service
|
||||
import com.intellij.openapi.fileEditor.FileEditor
|
||||
import com.intellij.openapi.fileEditor.FileEditorPolicy
|
||||
import com.intellij.openapi.fileEditor.ex.StructureViewFileEditorProvider
|
||||
import com.intellij.openapi.fileEditor.impl.DefaultPlatformFileEditorProvider
|
||||
import com.intellij.openapi.project.DumbAware
|
||||
import com.intellij.openapi.project.Project
|
||||
@@ -15,7 +17,7 @@ import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import org.jetbrains.annotations.NonNls
|
||||
|
||||
class DiffEditorProvider : DefaultPlatformFileEditorProvider, DumbAware {
|
||||
class DiffEditorProvider : DefaultPlatformFileEditorProvider, StructureViewFileEditorProvider, DumbAware {
|
||||
companion object {
|
||||
@NonNls
|
||||
const val DIFF_EDITOR_PROVIDER_ID = "DiffEditor"
|
||||
@@ -43,4 +45,5 @@ class DiffEditorProvider : DefaultPlatformFileEditorProvider, DumbAware {
|
||||
|
||||
override fun getEditorTypeId(): String = DIFF_EDITOR_PROVIDER_ID
|
||||
override fun getPolicy(): FileEditorPolicy = FileEditorPolicy.NONE
|
||||
override fun getStructureViewBuilder(project: Project, file: VirtualFile): StructureViewBuilder? = null
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ package com.intellij.vcs.log.ui.editor
|
||||
import com.intellij.diff.util.FileEditorBase
|
||||
import com.intellij.icons.AllIcons
|
||||
import com.intellij.ide.FileIconProvider
|
||||
import com.intellij.ide.structureView.StructureViewBuilder
|
||||
import com.intellij.openapi.fileEditor.FileEditor
|
||||
import com.intellij.openapi.fileEditor.FileEditorPolicy
|
||||
import com.intellij.openapi.fileEditor.FileEditorProvider
|
||||
import com.intellij.openapi.fileEditor.ex.StructureViewFileEditorProvider
|
||||
import com.intellij.openapi.fileTypes.FileType
|
||||
import com.intellij.openapi.project.DumbAware
|
||||
import com.intellij.openapi.project.Project
|
||||
@@ -56,7 +58,7 @@ class VcsLogEditor(private val project: Project, private val vcsLogFile: VcsLogF
|
||||
override fun getFile() = vcsLogFile
|
||||
}
|
||||
|
||||
class VcsLogEditorProvider : FileEditorProvider, DumbAware {
|
||||
class VcsLogEditorProvider : FileEditorProvider, StructureViewFileEditorProvider, DumbAware {
|
||||
override fun accept(project: Project, file: VirtualFile): Boolean = file is VcsLogFile
|
||||
|
||||
override fun createEditor(project: Project, file: VirtualFile): FileEditor {
|
||||
@@ -65,6 +67,7 @@ class VcsLogEditorProvider : FileEditorProvider, DumbAware {
|
||||
|
||||
override fun getEditorTypeId(): String = "VcsLogEditor"
|
||||
override fun getPolicy(): FileEditorPolicy = FileEditorPolicy.HIDE_DEFAULT_EDITOR
|
||||
override fun getStructureViewBuilder(project: Project, file: VirtualFile): StructureViewBuilder? = null
|
||||
|
||||
override fun disposeEditor(editor: FileEditor) {
|
||||
editor.disposeLogUis()
|
||||
|
||||
Reference in New Issue
Block a user