diff --git a/platform/diff-impl/src/com/intellij/diff/editor/DiffEditorProvider.kt b/platform/diff-impl/src/com/intellij/diff/editor/DiffEditorProvider.kt index df3a1ad76e43..fc552b6bcadb 100644 --- a/platform/diff-impl/src/com/intellij/diff/editor/DiffEditorProvider.kt +++ b/platform/diff-impl/src/com/intellij/diff/editor/DiffEditorProvider.kt @@ -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 } diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/editor/VcsLogEditor.kt b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/editor/VcsLogEditor.kt index 776c14fe8357..ed07ded95ac5 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/editor/VcsLogEditor.kt +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/editor/VcsLogEditor.kt @@ -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()