Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
7e18b801
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,发现更多精彩内容 >>
未验证
提交
7e18b801
编写于
9月 28, 2019
作者:
F
Fuchen Shi
提交者:
GitHub
9月 28, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into typo
上级
3160940d
f2d41726
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
17 addition
and
14 deletion
+17
-14
src/vs/editor/browser/editorExtensions.ts
src/vs/editor/browser/editorExtensions.ts
+1
-1
src/vs/platform/instantiation/common/instantiation.ts
src/vs/platform/instantiation/common/instantiation.ts
+11
-9
src/vs/workbench/contrib/files/browser/views/openEditorsView.ts
.../workbench/contrib/files/browser/views/openEditorsView.ts
+3
-2
src/vs/workbench/services/textfile/common/textFileEditorModel.ts
...workbench/services/textfile/common/textFileEditorModel.ts
+2
-2
未找到文件。
src/vs/editor/browser/editorExtensions.ts
浏览文件 @
7e18b801
...
...
@@ -241,7 +241,7 @@ export abstract class EditorAction extends EditorCommand {
// --- Registration of commands and actions
export
function
registerLanguageCommand
(
id
:
string
,
handler
:
(
accessor
:
ServicesAccessor
,
args
:
{
[
n
:
string
]:
any
}
)
=>
any
)
{
export
function
registerLanguageCommand
<
Args
extends
{
[
n
:
string
]:
any
}
>
(
id
:
string
,
handler
:
(
accessor
:
ServicesAccessor
,
args
:
Args
)
=>
any
)
{
CommandsRegistry
.
registerCommand
(
id
,
(
accessor
,
args
)
=>
handler
(
accessor
,
args
||
{}));
}
...
...
src/vs/platform/instantiation/common/instantiation.ts
浏览文件 @
7e18b801
...
...
@@ -22,40 +22,42 @@ export namespace _util {
// --- interfaces ------
type
BrandedService
=
{
_serviceBrand
:
undefined
};
export
interface
IConstructorSignature0
<
T
>
{
new
(...
services
:
{
_serviceBrand
:
undefined
;
}
[]):
T
;
new
(...
services
:
BrandedService
[]):
T
;
}
export
interface
IConstructorSignature1
<
A1
,
T
>
{
new
(
first
:
A1
,
...
services
:
{
_serviceBrand
:
undefined
;
}
[]):
T
;
new
(
first
:
A1
,
...
services
:
BrandedService
[]):
T
;
}
export
interface
IConstructorSignature2
<
A1
,
A2
,
T
>
{
new
(
first
:
A1
,
second
:
A2
,
...
services
:
{
_serviceBrand
:
undefined
;
}
[]):
T
;
new
(
first
:
A1
,
second
:
A2
,
...
services
:
BrandedService
[]):
T
;
}
export
interface
IConstructorSignature3
<
A1
,
A2
,
A3
,
T
>
{
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
...
services
:
{
_serviceBrand
:
undefined
;
}
[]):
T
;
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
...
services
:
BrandedService
[]):
T
;
}
export
interface
IConstructorSignature4
<
A1
,
A2
,
A3
,
A4
,
T
>
{
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
fourth
:
A4
,
...
services
:
{
_serviceBrand
:
undefined
;
}
[]):
T
;
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
fourth
:
A4
,
...
services
:
BrandedService
[]):
T
;
}
export
interface
IConstructorSignature5
<
A1
,
A2
,
A3
,
A4
,
A5
,
T
>
{
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
fourth
:
A4
,
fifth
:
A5
,
...
services
:
{
_serviceBrand
:
undefined
;
}
[]):
T
;
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
fourth
:
A4
,
fifth
:
A5
,
...
services
:
BrandedService
[]):
T
;
}
export
interface
IConstructorSignature6
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
T
>
{
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
fourth
:
A4
,
fifth
:
A5
,
sixth
:
A6
,
...
services
:
{
_serviceBrand
:
undefined
;
}
[]):
T
;
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
fourth
:
A4
,
fifth
:
A5
,
sixth
:
A6
,
...
services
:
BrandedService
[]):
T
;
}
export
interface
IConstructorSignature7
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
{
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
fourth
:
A4
,
fifth
:
A5
,
sixth
:
A6
,
seventh
:
A7
,
...
services
:
{
_serviceBrand
:
undefined
;
}
[]):
T
;
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
fourth
:
A4
,
fifth
:
A5
,
sixth
:
A6
,
seventh
:
A7
,
...
services
:
BrandedService
[]):
T
;
}
export
interface
IConstructorSignature8
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
{
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
fourth
:
A4
,
fifth
:
A5
,
sixth
:
A6
,
seventh
:
A7
,
eigth
:
A8
,
...
services
:
{
_serviceBrand
:
undefined
;
}
[]):
T
;
new
(
first
:
A1
,
second
:
A2
,
third
:
A3
,
fourth
:
A4
,
fifth
:
A5
,
sixth
:
A6
,
seventh
:
A7
,
eigth
:
A8
,
...
services
:
BrandedService
[]):
T
;
}
export
interface
ServicesAccessor
{
...
...
src/vs/workbench/contrib/files/browser/views/openEditorsView.ts
浏览文件 @
7e18b801
...
...
@@ -244,8 +244,9 @@ export class OpenEditorsView extends ViewletPanel {
this
.
dirtyEditorFocusedContext
.
reset
();
const
element
=
e
.
elements
.
length
?
e
.
elements
[
0
]
:
undefined
;
if
(
element
instanceof
OpenEditor
)
{
this
.
dirtyEditorFocusedContext
.
set
(
this
.
textFileService
.
isDirty
(
withNullAsUndefined
(
element
.
getResource
())));
this
.
resourceContext
.
set
(
withUndefinedAsNull
(
element
.
getResource
()));
const
resource
=
element
.
getResource
();
this
.
dirtyEditorFocusedContext
.
set
(
this
.
textFileService
.
isDirty
(
resource
));
this
.
resourceContext
.
set
(
withUndefinedAsNull
(
resource
));
}
else
if
(
!!
element
)
{
this
.
groupFocusedContext
.
set
(
true
);
}
...
...
src/vs/workbench/services/textfile/common/textFileEditorModel.ts
浏览文件 @
7e18b801
...
...
@@ -80,7 +80,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
private
contentEncoding
:
string
;
// encoding as reported from disk
private
preferredEncoding
:
string
;
// encoding as chosen by the user
private
preferredMode
:
string
;
// mode as chosen by the user
private
preferredMode
:
string
|
undefined
;
// mode as chosen by the user
private
versionId
:
number
;
private
bufferSavedVersionId
:
number
;
...
...
@@ -108,7 +108,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
constructor
(
resource
:
URI
,
preferredEncoding
:
string
,
preferredMode
:
string
,
preferredMode
:
string
|
undefined
,
@
INotificationService
private
readonly
notificationService
:
INotificationService
,
@
IModeService
modeService
:
IModeService
,
@
IModelService
modelService
:
IModelService
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录