Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
e6bc6699
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,发现更多精彩内容 >>
提交
e6bc6699
编写于
3月 06, 2019
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
strict null checks: extHostSCM
上级
764d2e94
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
15 deletion
+15
-15
src/tsconfig.strictNullChecks.json
src/tsconfig.strictNullChecks.json
+1
-0
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+1
-1
src/vs/workbench/api/node/extHostSCM.ts
src/vs/workbench/api/node/extHostSCM.ts
+13
-14
未找到文件。
src/tsconfig.strictNullChecks.json
浏览文件 @
e6bc6699
...
...
@@ -97,6 +97,7 @@
"./vs/workbench/api/node/extHostOutputService.ts"
,
"./vs/workbench/api/node/extHostProgress.ts"
,
"./vs/workbench/api/node/extHostQuickOpen.ts"
,
"./vs/workbench/api/node/extHostSCM.ts"
,
"./vs/workbench/api/node/extHostSearch.fileIndex.ts"
,
"./vs/workbench/api/node/extHostSearch.ts"
,
"./vs/workbench/api/node/extHostStorage.ts"
,
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
e6bc6699
...
...
@@ -582,7 +582,7 @@ export interface SCMProviderFeatures {
count
?:
number
;
commitTemplate
?:
string
;
acceptInputCommand
?:
modes
.
Command
;
statusBarCommands
?:
modes
.
Command
[];
statusBarCommands
?:
CommandDto
[];
}
export
interface
SCMGroupFeatures
{
...
...
src/vs/workbench/api/node/extHostSCM.ts
浏览文件 @
e6bc6699
...
...
@@ -10,7 +10,7 @@ import { dispose, IDisposable } from 'vs/base/common/lifecycle';
import
{
asPromise
}
from
'
vs/base/common/async
'
;
import
{
IExtensionDescription
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
ExtHostCommands
}
from
'
vs/workbench/api/node/extHostCommands
'
;
import
{
MainContext
,
MainThreadSCMShape
,
SCMRawResource
,
SCMRawResourceSplice
,
SCMRawResourceSplices
,
IMainContext
,
ExtHostSCMShape
}
from
'
./extHost.protocol
'
;
import
{
MainContext
,
MainThreadSCMShape
,
SCMRawResource
,
SCMRawResourceSplice
,
SCMRawResourceSplices
,
IMainContext
,
ExtHostSCMShape
,
CommandDto
}
from
'
./extHost.protocol
'
;
import
{
sortedDiff
}
from
'
vs/base/common/arrays
'
;
import
{
comparePaths
}
from
'
vs/base/common/comparers
'
;
import
*
as
vscode
from
'
vscode
'
;
...
...
@@ -23,7 +23,7 @@ type ProviderHandle = number;
type
GroupHandle
=
number
;
type
ResourceStateHandle
=
number
;
function
getIconPath
(
decorations
:
vscode
.
SourceControlResourceThemableDecorations
)
{
function
getIconPath
(
decorations
?:
vscode
.
SourceControlResourceThemableDecorations
):
string
|
undefined
{
if
(
!
decorations
)
{
return
undefined
;
}
else
if
(
typeof
decorations
.
iconPath
===
'
string
'
)
{
...
...
@@ -60,7 +60,7 @@ function compareResourceStatesDecorations(a: vscode.SourceControlResourceDecorat
}
if
(
a
.
tooltip
!==
b
.
tooltip
)
{
return
(
a
.
tooltip
||
''
).
localeCompare
(
b
.
tooltip
);
return
(
a
.
tooltip
||
''
).
localeCompare
(
b
.
tooltip
||
''
);
}
result
=
compareResourceThemableDecorations
(
a
,
b
);
...
...
@@ -205,7 +205,7 @@ export class ExtHostSCMInputBox implements vscode.SourceControlInputBox {
return
this
.
_visible
;
}
set
visible
(
visible
:
boolean
|
undefined
)
{
set
visible
(
visible
:
boolean
)
{
visible
=
!!
visible
;
this
.
_visible
=
visible
;
this
.
_proxy
.
$setInputBoxVisibility
(
this
.
_sourceControlHandle
,
visible
);
...
...
@@ -287,7 +287,7 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
return
Promise
.
resolve
(
undefined
);
}
return
asPromise
(()
=>
this
.
_commands
.
executeCommand
(
command
.
command
,
...
command
.
arguments
));
return
asPromise
(()
=>
this
.
_commands
.
executeCommand
(
command
.
command
,
...
(
command
.
arguments
||
[])
));
}
_takeResourceStateSnapshot
():
SCMRawResourceSplice
[]
{
...
...
@@ -309,11 +309,11 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
this
.
_resourceStatesCommandsMap
.
set
(
handle
,
r
.
command
);
}
if
(
lightIconPath
||
darkIconPath
)
{
if
(
lightIconPath
)
{
icons
.
push
(
lightIconPath
);
}
if
(
darkIconPath
!==
lightIconPath
)
{
if
(
darkIconPath
&&
(
darkIconPath
!==
lightIconPath
)
)
{
icons
.
push
(
darkIconPath
);
}
...
...
@@ -442,7 +442,7 @@ class ExtHostSourceControl implements vscode.SourceControl {
this
.
_statusBarCommands
=
statusBarCommands
;
const
internal
=
(
statusBarCommands
||
[]).
map
(
c
=>
this
.
_commands
.
converter
.
toInternal
(
c
));
const
internal
=
(
statusBarCommands
||
[]).
map
(
c
=>
this
.
_commands
.
converter
.
toInternal
(
c
))
as
CommandDto
[]
;
this
.
_proxy
.
$updateSourceControl
(
this
.
handle
,
{
statusBarCommands
:
internal
});
}
...
...
@@ -599,14 +599,12 @@ export class ExtHostSCM implements ExtHostSCMShape {
}
// Deprecated
getLastInputBox
(
extension
:
IExtensionDescription
):
ExtHostSCMInputBox
{
getLastInputBox
(
extension
:
IExtensionDescription
):
ExtHostSCMInputBox
|
undefined
{
this
.
logService
.
trace
(
'
ExtHostSCM#getLastInputBox
'
,
extension
.
identifier
.
value
);
const
sourceControls
=
this
.
_sourceControlsByExtension
.
get
(
ExtensionIdentifier
.
toKey
(
extension
.
identifier
));
const
sourceControl
=
sourceControls
&&
sourceControls
[
sourceControls
.
length
-
1
];
const
inputBox
=
sourceControl
&&
sourceControl
.
inputBox
;
return
inputBox
;
return
sourceControl
&&
sourceControl
.
inputBox
;
}
$provideOriginalResource
(
sourceControlHandle
:
number
,
uriComponents
:
UriComponents
,
token
:
CancellationToken
):
Promise
<
UriComponents
|
null
>
{
...
...
@@ -615,11 +613,12 @@ export class ExtHostSCM implements ExtHostSCMShape {
const
sourceControl
=
this
.
_sourceControls
.
get
(
sourceControlHandle
);
if
(
!
sourceControl
||
!
sourceControl
.
quickDiffProvider
)
{
if
(
!
sourceControl
||
!
sourceControl
.
quickDiffProvider
||
!
sourceControl
.
quickDiffProvider
.
provideOriginalResource
)
{
return
Promise
.
resolve
(
null
);
}
return
asPromise
(()
=>
sourceControl
.
quickDiffProvider
.
provideOriginalResource
(
uri
,
token
));
return
asPromise
(()
=>
sourceControl
.
quickDiffProvider
!
.
provideOriginalResource
!
(
uri
,
token
))
.
then
<
UriComponents
|
null
>
(
r
=>
r
||
null
);
}
$onInputBoxValueChange
(
sourceControlHandle
:
number
,
value
:
string
):
Promise
<
void
>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录