Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
3124d498
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3124d498
编写于
3月 04, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Editors: revisit IEditorPane extends IPanel (fix #91945)
上级
03e8f121
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
6 deletion
+17
-6
src/vs/workbench/browser/parts/editor/baseEditor.ts
src/vs/workbench/browser/parts/editor/baseEditor.ts
+2
-2
src/vs/workbench/browser/parts/editor/editor.ts
src/vs/workbench/browser/parts/editor/editor.ts
+4
-0
src/vs/workbench/common/editor.ts
src/vs/workbench/common/editor.ts
+11
-4
未找到文件。
src/vs/workbench/browser/parts/editor/baseEditor.ts
浏览文件 @
3124d498
...
...
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
Panel
}
from
'
vs/workbench/browser/panel
'
;
import
{
Composite
}
from
'
vs/workbench/browser/composite
'
;
import
{
EditorInput
,
EditorOptions
,
IEditorPane
,
GroupIdentifier
,
IEditorMemento
}
from
'
vs/workbench/common/editor
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
...
...
@@ -33,7 +33,7 @@ import { indexOfPath } from 'vs/base/common/extpath';
*
* This class is only intended to be subclassed and not instantiated.
*/
export
abstract
class
BaseEditor
extends
Panel
implements
IEditorPane
{
export
abstract
class
BaseEditor
extends
Composite
implements
IEditorPane
{
private
static
readonly
EDITOR_MEMENTOS
=
new
Map
<
string
,
EditorMemento
<
any
>>
();
...
...
src/vs/workbench/browser/parts/editor/editor.ts
浏览文件 @
3124d498
...
...
@@ -64,6 +64,10 @@ export function getEditorPartOptions(config: IWorkbenchEditorConfiguration): IEd
}
export
interface
IEditorOpeningEvent
extends
IEditorIdentifier
{
/**
* The options used when opening the editor.
*/
options
?:
IEditorOptions
;
/**
...
...
src/vs/workbench/common/editor.ts
浏览文件 @
3124d498
...
...
@@ -16,7 +16,7 @@ import { RawContextKey } from 'vs/platform/contextkey/common/contextkey';
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
ITextModel
}
from
'
vs/editor/common/model
'
;
import
{
IEditorGroup
,
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
ICompositeControl
}
from
'
vs/workbench/common/composite
'
;
import
{
ICompositeControl
,
IComposite
}
from
'
vs/workbench/common/composite
'
;
import
{
ActionRunner
,
IAction
}
from
'
vs/base/common/actions
'
;
import
{
IFileService
,
FileSystemProviderCapabilities
}
from
'
vs/platform/files/common/files
'
;
import
{
IPathData
}
from
'
vs/platform/windows/common/windows
'
;
...
...
@@ -24,7 +24,6 @@ import { coalesce, firstOrDefault } from 'vs/base/common/arrays';
import
{
ITextFileSaveOptions
,
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
IEditorService
,
IResourceEditorInputType
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
isEqual
,
dirname
}
from
'
vs/base/common/resources
'
;
import
{
IPanel
}
from
'
vs/workbench/common/panel
'
;
import
{
IRange
}
from
'
vs/editor/common/core/range
'
;
import
{
createMemoizer
}
from
'
vs/base/common/decorators
'
;
import
{
ILabelService
}
from
'
vs/platform/label/common/label
'
;
...
...
@@ -64,7 +63,7 @@ export const BINARY_DIFF_EDITOR_ID = 'workbench.editors.binaryResourceDiffEditor
/**
* The editor pane is the container for workbench editors.
*/
export
interface
IEditorPane
extends
I
Panel
{
export
interface
IEditorPane
extends
I
Composite
{
/**
* The assigned input of this editor.
...
...
@@ -102,7 +101,9 @@ export interface IEditorPane extends IPanel {
readonly
onDidSizeConstraintsChange
:
Event
<
{
width
:
number
;
height
:
number
;
}
|
undefined
>
;
/**
* Returns the underlying control of this editor.
* Returns the underlying control of this editor. Callers need to cast
* the control to a specific instance as needed, e.g. by using the
* `isCodeEditor` helper method to access the text code editor.
*/
getControl
():
IEditorControl
|
undefined
;
...
...
@@ -120,6 +121,9 @@ export interface IVisibleEditorPane extends IEditorPane {
readonly
group
:
IEditorGroup
;
}
/**
* The text editor pane is the container for workbench text editors.
*/
export
interface
ITextEditorPane
extends
IEditorPane
{
/**
...
...
@@ -139,6 +143,9 @@ export function isTextEditorPane(thing: IEditorPane | undefined): thing is IText
return
typeof
candidate
?.
getViewState
===
'
function
'
;
}
/**
* The text editor pane is the container for workbench text diff editors.
*/
export
interface
ITextDiffEditorPane
extends
IEditorPane
{
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录