Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ddf6ed32
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,体验更适合开发者的 AI 搜索 >>
提交
ddf6ed32
编写于
2月 12, 2020
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more strictFunctions #81574
上级
48e5c5b6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
15 deletion
+21
-15
src/vs/workbench/api/common/extHost.api.impl.ts
src/vs/workbench/api/common/extHost.api.impl.ts
+13
-8
src/vs/workbench/api/common/extHostMessageService.ts
src/vs/workbench/api/common/extHostMessageService.ts
+5
-4
src/vs/workbench/contrib/quickopen/browser/gotoSymbolHandler.ts
.../workbench/contrib/quickopen/browser/gotoSymbolHandler.ts
+2
-2
src/vs/workbench/contrib/themes/browser/themes.contribution.ts
...s/workbench/contrib/themes/browser/themes.contribution.ts
+1
-1
未找到文件。
src/vs/workbench/api/common/extHost.api.impl.ts
浏览文件 @
ddf6ed32
...
...
@@ -475,14 +475,14 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
onDidChangeWindowState
(
listener
,
thisArg
?,
disposables
?)
{
return
extHostWindow
.
onDidChangeWindowState
(
listener
,
thisArg
,
disposables
);
},
showInformationMessage
(
message
:
string
,
first
:
vscode
.
MessageOptions
|
string
|
vscode
.
MessageItem
,
...
rest
:
Array
<
string
|
vscode
.
MessageItem
>
)
{
return
extHostMessageService
.
showMessage
(
extension
,
Severity
.
Info
,
message
,
first
,
rest
);
showInformationMessage
(
message
:
string
,
...
rest
:
Array
<
vscode
.
MessageOptions
|
string
|
vscode
.
MessageItem
>
)
{
return
<
Thenable
<
any
>>
extHostMessageService
.
showMessage
(
extension
,
Severity
.
Info
,
message
,
rest
[
0
],
<
Array
<
string
|
vscode
.
MessageItem
>>
rest
.
slice
(
1
)
);
},
showWarningMessage
(
message
:
string
,
first
:
vscode
.
MessageOptions
|
string
|
vscode
.
MessageItem
,
...
rest
:
Array
<
string
|
vscode
.
MessageItem
>
)
{
return
extHostMessageService
.
showMessage
(
extension
,
Severity
.
Warning
,
message
,
first
,
rest
);
showWarningMessage
(
message
:
string
,
...
rest
:
Array
<
vscode
.
MessageOptions
|
string
|
vscode
.
MessageItem
>
)
{
return
<
Thenable
<
any
>>
extHostMessageService
.
showMessage
(
extension
,
Severity
.
Warning
,
message
,
rest
[
0
],
<
Array
<
string
|
vscode
.
MessageItem
>>
rest
.
slice
(
1
)
);
},
showErrorMessage
(
message
:
string
,
first
:
vscode
.
MessageOptions
|
string
|
vscode
.
MessageItem
,
...
rest
:
Array
<
string
|
vscode
.
MessageItem
>
)
{
return
extHostMessageService
.
showMessage
(
extension
,
Severity
.
Error
,
message
,
first
,
rest
);
showErrorMessage
(
message
:
string
,
...
rest
:
Array
<
vscode
.
MessageOptions
|
string
|
vscode
.
MessageItem
>
)
{
return
<
Thenable
<
any
>>
extHostMessageService
.
showMessage
(
extension
,
Severity
.
Error
,
message
,
rest
[
0
],
<
Array
<
string
|
vscode
.
MessageItem
>>
rest
.
slice
(
1
)
);
},
showQuickPick
(
items
:
any
,
options
?:
vscode
.
QuickPickOptions
,
token
?:
vscode
.
CancellationToken
):
any
{
return
extHostQuickOpen
.
showQuickPick
(
items
,
!!
extension
.
enableProposedApi
,
options
,
token
);
...
...
@@ -533,7 +533,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
createOutputChannel
(
name
:
string
):
vscode
.
OutputChannel
{
return
extHostOutputService
.
createOutputChannel
(
name
);
},
createWebviewPanel
(
viewType
:
string
,
title
:
string
,
showOptions
:
vscode
.
ViewColumn
|
{
viewColumn
:
vscode
.
ViewColumn
,
preserveFocus
?:
boolean
},
options
:
vscode
.
WebviewPanelOptions
&
vscode
.
WebviewOptions
):
vscode
.
WebviewPanel
{
createWebviewPanel
(
viewType
:
string
,
title
:
string
,
showOptions
:
vscode
.
ViewColumn
|
{
viewColumn
:
vscode
.
ViewColumn
,
preserveFocus
?:
boolean
},
options
?
:
vscode
.
WebviewPanelOptions
&
vscode
.
WebviewOptions
):
vscode
.
WebviewPanel
{
return
extHostWebviews
.
createWebviewPanel
(
extension
,
viewType
,
title
,
showOptions
,
options
);
},
createWebviewTextEditorInset
(
editor
:
vscode
.
TextEditor
,
line
:
number
,
height
:
number
,
options
?:
vscode
.
WebviewOptions
):
vscode
.
WebviewEditorInset
{
...
...
@@ -751,7 +751,12 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
},
openTunnel
:
(
forward
:
vscode
.
TunnelOptions
)
=>
{
checkProposedApiEnabled
(
extension
);
return
extHostTunnelService
.
openTunnel
(
forward
);
return
extHostTunnelService
.
openTunnel
(
forward
).
then
(
value
=>
{
if
(
!
value
)
{
throw
new
Error
(
'
cannot open tunnel
'
);
}
return
value
;
});
},
get
tunnels
()
{
checkProposedApiEnabled
(
extension
);
...
...
src/vs/workbench/api/common/extHostMessageService.ts
浏览文件 @
ddf6ed32
...
...
@@ -24,10 +24,11 @@ export class ExtHostMessageService {
this
.
_proxy
=
mainContext
.
getProxy
(
MainContext
.
MainThreadMessageService
);
}
showMessage
(
extension
:
IExtensionDescription
,
severity
:
Severity
,
message
:
string
,
optionsOrFirstItem
:
vscode
.
MessageOptions
|
string
,
rest
:
string
[]):
Promise
<
string
|
undefined
>
;
showMessage
(
extension
:
IExtensionDescription
,
severity
:
Severity
,
message
:
string
,
optionsOrFirstItem
:
vscode
.
MessageOptions
|
vscode
.
MessageItem
,
rest
:
vscode
.
MessageItem
[]):
Promise
<
vscode
.
MessageItem
|
undefined
>
;
showMessage
(
extension
:
IExtensionDescription
,
severity
:
Severity
,
message
:
string
,
optionsOrFirstItem
:
vscode
.
MessageOptions
|
vscode
.
MessageItem
|
string
,
rest
:
Array
<
vscode
.
MessageItem
|
string
>
):
Promise
<
string
|
vscode
.
MessageItem
|
undefined
>
;
showMessage
(
extension
:
IExtensionDescription
,
severity
:
Severity
,
message
:
string
,
optionsOrFirstItem
:
vscode
.
MessageOptions
|
string
|
vscode
.
MessageItem
,
rest
:
Array
<
string
|
vscode
.
MessageItem
>
):
Promise
<
string
|
vscode
.
MessageItem
|
undefined
>
{
showMessage
(
extension
:
IExtensionDescription
,
severity
:
Severity
,
message
:
string
,
optionsOrFirstItem
:
vscode
.
MessageOptions
|
string
|
undefined
,
rest
:
string
[]):
Promise
<
string
|
undefined
>
;
showMessage
(
extension
:
IExtensionDescription
,
severity
:
Severity
,
message
:
string
,
optionsOrFirstItem
:
vscode
.
MessageOptions
|
vscode
.
MessageItem
|
undefined
,
rest
:
vscode
.
MessageItem
[]):
Promise
<
vscode
.
MessageItem
|
undefined
>
;
showMessage
(
extension
:
IExtensionDescription
,
severity
:
Severity
,
message
:
string
,
optionsOrFirstItem
:
vscode
.
MessageOptions
|
vscode
.
MessageItem
|
string
|
undefined
,
rest
:
Array
<
vscode
.
MessageItem
|
string
>
):
Promise
<
string
|
vscode
.
MessageItem
|
undefined
>
;
showMessage
(
extension
:
IExtensionDescription
,
severity
:
Severity
,
message
:
string
,
optionsOrFirstItem
:
vscode
.
MessageOptions
|
string
|
vscode
.
MessageItem
|
undefined
,
rest
:
Array
<
string
|
vscode
.
MessageItem
>
):
Promise
<
string
|
vscode
.
MessageItem
|
undefined
>
{
const
options
:
MainThreadMessageOptions
=
{
extension
};
let
items
:
(
string
|
vscode
.
MessageItem
)[];
...
...
src/vs/workbench/contrib/quickopen/browser/gotoSymbolHandler.ts
浏览文件 @
ddf6ed32
...
...
@@ -77,7 +77,7 @@ class OutlineModel extends QuickOpenModel {
const
searchValuePos
=
searchValue
.
indexOf
(
SCOPE_PREFIX
)
===
0
?
1
:
0
;
// Check for match and update visibility and group label
this
.
entries
.
forEach
((
entry
:
SymbolEntry
)
=>
{
(
<
Array
<
SymbolEntry
>>
this
.
entries
).
forEach
(
entry
=>
{
// Clear all state first
entry
.
setGroupLabel
(
undefined
);
...
...
@@ -98,7 +98,7 @@ class OutlineModel extends QuickOpenModel {
});
// select comparator based on the presence of the colon-prefix
this
.
entries
.
sort
(
searchValuePos
===
0
(
<
Array
<
SymbolEntry
>>
this
.
entries
)
.
sort
(
searchValuePos
===
0
?
SymbolEntry
.
compareByRank
:
SymbolEntry
.
compareByKindAndRank
);
...
...
src/vs/workbench/contrib/themes/browser/themes.contribution.ts
浏览文件 @
ddf6ed32
...
...
@@ -228,7 +228,7 @@ function isItem(i: QuickPickInput<ThemeItem>): i is ThemeItem {
}
function
toEntries
(
themes
:
Array
<
IColorTheme
|
IFileIconTheme
>
,
label
?:
string
):
QuickPickInput
<
ThemeItem
>
[]
{
const
toEntry
=
(
theme
:
IColorTheme
):
ThemeItem
=>
({
id
:
theme
.
id
,
label
:
theme
.
label
,
description
:
theme
.
description
});
const
toEntry
=
(
theme
:
IColorTheme
|
IFileIconTheme
):
ThemeItem
=>
({
id
:
theme
.
id
,
label
:
theme
.
label
,
description
:
theme
.
description
});
const
sorter
=
(
t1
:
ThemeItem
,
t2
:
ThemeItem
)
=>
t1
.
label
.
localeCompare
(
t2
.
label
);
let
entries
:
QuickPickInput
<
ThemeItem
>
[]
=
themes
.
map
(
toEntry
).
sort
(
sorter
);
if
(
entries
.
length
>
0
&&
label
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录