Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
ff65a335
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ff65a335
编写于
6月 12, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
editors - reduce close exposure for now
上级
1927f9b6
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
5 addition
and
32 deletion
+5
-32
src/vs/workbench/common/editor.ts
src/vs/workbench/common/editor.ts
+3
-4
src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput.ts
...rib/extensions/electron-browser/runtimeExtensionsInput.ts
+1
-7
src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts
...workbench/contrib/files/common/editors/fileEditorInput.ts
+0
-6
src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts
...rkbench/contrib/searchEditor/browser/searchEditorInput.ts
+0
-4
src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts
...s/workbench/contrib/webview/browser/webviewEditorInput.ts
+0
-4
src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts
...bench/services/untitled/common/untitledTextEditorInput.ts
+1
-7
未找到文件。
src/vs/workbench/common/editor.ts
浏览文件 @
ff65a335
...
...
@@ -598,6 +598,9 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
close
(
group
:
GroupIdentifier
,
openedInOtherGroups
:
boolean
):
void
{
// TODO@ben revisit this behaviour, should just dispose by default after adoption
// However this requires that we never open the same input in multiple editor groups
// which today we cannot enforce (e.g. when opening the same editor in an empty
// group via quick open editor history)
if
(
!
openedInOtherGroups
)
{
this
.
dispose
();
}
...
...
@@ -798,10 +801,6 @@ export class SideBySideEditorInput extends EditorInput {
this
.
_register
(
this
.
master
.
onDidChangeLabel
(()
=>
this
.
_onDidChangeLabel
.
fire
()));
}
async
resolve
():
Promise
<
EditorModel
|
null
>
{
return
null
;
}
matches
(
otherInput
:
unknown
):
boolean
{
if
(
super
.
matches
(
otherInput
)
===
true
)
{
return
true
;
...
...
src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput.ts
浏览文件 @
ff65a335
...
...
@@ -5,7 +5,7 @@
import
*
as
nls
from
'
vs/nls
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
EditorInput
,
GroupIdentifier
}
from
'
vs/workbench/common/editor
'
;
import
{
EditorInput
}
from
'
vs/workbench/common/editor
'
;
export
class
RuntimeExtensionsInput
extends
EditorInput
{
...
...
@@ -37,12 +37,6 @@ export class RuntimeExtensionsInput extends EditorInput {
return
false
;
}
close
(
group
:
GroupIdentifier
,
openedInOtherGroups
:
boolean
):
void
{
if
(
!
openedInOtherGroups
)
{
this
.
dispose
();
// Only dispose if not opened anymore because all runtime extensions inputs are shared
}
}
matches
(
other
:
unknown
):
boolean
{
return
other
instanceof
RuntimeExtensionsInput
;
}
...
...
src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts
浏览文件 @
ff65a335
...
...
@@ -303,12 +303,6 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements
return
undefined
;
}
close
(
group
:
GroupIdentifier
,
openedInOtherGroups
:
boolean
):
void
{
if
(
!
openedInOtherGroups
)
{
this
.
dispose
();
// Only dispose if not opened anymore because all file inputs are shared
}
}
matches
(
otherInput
:
unknown
):
boolean
{
if
(
super
.
matches
(
otherInput
)
===
true
)
{
return
true
;
...
...
src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts
浏览文件 @
ff65a335
...
...
@@ -180,10 +180,6 @@ export class SearchEditorInput extends EditorInput {
return
localize
(
'
searchTitle
'
,
"
Search
"
);
}
async
resolve
()
{
return
null
;
}
setDirty
(
dirty
:
boolean
)
{
this
.
dirty
=
dirty
;
this
.
_onDidChangeDirty
.
fire
();
...
...
src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts
浏览文件 @
ff65a335
...
...
@@ -99,10 +99,6 @@ export class WebviewInput extends EditorInput {
this
.
_group
=
group
;
}
public
async
resolve
():
Promise
<
null
>
{
return
null
;
}
public
supportsSplitEditor
()
{
return
false
;
}
...
...
src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts
浏览文件 @
ff65a335
...
...
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
IEncodingSupport
,
EncodingMode
,
Verbosity
,
IModeSupport
,
GroupIdentifier
}
from
'
vs/workbench/common/editor
'
;
import
{
IEncodingSupport
,
EncodingMode
,
Verbosity
,
IModeSupport
}
from
'
vs/workbench/common/editor
'
;
import
{
AbstractTextResourceEditorInput
}
from
'
vs/workbench/common/editor/textResourceEditorInput
'
;
import
{
IUntitledTextEditorModel
}
from
'
vs/workbench/services/untitled/common/untitledTextEditorModel
'
;
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
...
...
@@ -121,12 +121,6 @@ export class UntitledTextEditorInput extends AbstractTextResourceEditorInput imp
return
this
.
modelResolve
;
}
close
(
group
:
GroupIdentifier
,
openedInOtherGroups
:
boolean
):
void
{
if
(
!
openedInOtherGroups
)
{
this
.
dispose
();
// Only dispose if not opened anymore because all untitled inputs are shared
}
}
matches
(
otherInput
:
unknown
):
boolean
{
if
(
super
.
matches
(
otherInput
)
===
true
)
{
return
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录