Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
3d0b9755
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,发现更多精彩内容 >>
提交
3d0b9755
编写于
3月 27, 2017
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
💥
scm state -> stateContextKey
上级
75576e3c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
10 addition
and
10 deletion
+10
-10
extensions/git/src/scmProvider.ts
extensions/git/src/scmProvider.ts
+1
-1
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+1
-1
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
+1
-1
src/vs/workbench/api/node/mainThreadSCM.ts
src/vs/workbench/api/node/mainThreadSCM.ts
+4
-4
src/vs/workbench/services/scm/common/scm.ts
src/vs/workbench/services/scm/common/scm.ts
+1
-1
src/vs/workbench/services/scm/common/scmService.ts
src/vs/workbench/services/scm/common/scmService.ts
+1
-1
未找到文件。
extensions/git/src/scmProvider.ts
浏览文件 @
3d0b9755
...
...
@@ -23,7 +23,7 @@ export class GitSCMProvider implements SCMProvider {
get
label
():
string
{
return
'
Git
'
;
}
get
state
():
string
{
get
state
ContextKey
():
string
{
switch
(
this
.
model
.
state
)
{
case
State
.
Uninitialized
:
return
'
uninitialized
'
;
case
State
.
Idle
:
return
'
idle
'
;
...
...
src/vs/vscode.proposed.d.ts
浏览文件 @
3d0b9755
...
...
@@ -704,7 +704,7 @@ declare module 'vscode' {
* A state identifier, which will be used to populate the value of the
* `scmProviderState` context key.
*/
readonly
state
?:
string
;
readonly
state
ContextKey
?:
string
;
/**
* An [event](#Event) which should fire when any of the following attributes
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
3d0b9755
...
...
@@ -274,7 +274,7 @@ export type SCMRawResourceGroup = [
export
abstract
class
MainThreadSCMShape
{
$register
(
handle
:
number
,
features
:
SCMProviderFeatures
):
void
{
throw
ni
();
}
$unregister
(
handle
:
number
):
void
{
throw
ni
();
}
$onChange
(
handle
:
number
,
resources
:
SCMRawResourceGroup
[],
count
:
number
|
undefined
,
state
:
string
|
undefined
):
void
{
throw
ni
();
}
$onChange
(
handle
:
number
,
resources
:
SCMRawResourceGroup
[],
count
:
number
|
undefined
,
state
ContextKey
:
string
|
undefined
):
void
{
throw
ni
();
}
$setInputBoxValue
(
value
:
string
):
void
{
throw
ni
();
}
}
...
...
src/vs/workbench/api/node/extHostSCM.ts
浏览文件 @
3d0b9755
...
...
@@ -135,7 +135,7 @@ export class ExtHostSCM {
return
[
g
.
uri
.
toString
(),
g
.
contextKey
,
g
.
label
,
rawResources
]
as
SCMRawResourceGroup
;
});
this
.
_proxy
.
$onChange
(
handle
,
rawResourceGroups
,
provider
.
count
,
provider
.
state
);
this
.
_proxy
.
$onChange
(
handle
,
rawResourceGroups
,
provider
.
count
,
provider
.
state
ContextKey
);
});
return
new
Disposable
(()
=>
{
...
...
src/vs/workbench/api/node/mainThreadSCM.ts
浏览文件 @
3d0b9755
...
...
@@ -31,8 +31,8 @@ class MainThreadSCMProvider implements ISCMProvider {
private
_count
:
number
|
undefined
=
undefined
;
get
count
():
number
|
undefined
{
return
this
.
_count
;
}
private
_state
:
string
|
undefined
=
undefined
;
get
state
():
string
|
undefined
{
return
this
.
_state
;
}
private
_state
ContextKey
:
string
|
undefined
=
undefined
;
get
state
ContextKey
():
string
|
undefined
{
return
this
.
_stateContextKey
;
}
constructor
(
private
_handle
:
number
,
...
...
@@ -67,7 +67,7 @@ class MainThreadSCMProvider implements ISCMProvider {
// }
}
$onChange
(
rawResourceGroups
:
SCMRawResourceGroup
[],
count
:
number
|
undefined
,
state
:
string
|
undefined
):
void
{
$onChange
(
rawResourceGroups
:
SCMRawResourceGroup
[],
count
:
number
|
undefined
,
state
ContextKey
:
string
|
undefined
):
void
{
this
.
_resources
=
rawResourceGroups
.
map
(
rawGroup
=>
{
const
[
uri
,
contextKey
,
label
,
rawResources
]
=
rawGroup
;
const
resources
:
ISCMResource
[]
=
[];
...
...
@@ -95,7 +95,7 @@ class MainThreadSCMProvider implements ISCMProvider {
});
this
.
_count
=
count
;
this
.
_state
=
state
;
this
.
_state
ContextKey
=
stateContextKey
;
this
.
_onDidChange
.
fire
(
this
.
resources
);
}
...
...
src/vs/workbench/services/scm/common/scm.ts
浏览文件 @
3d0b9755
...
...
@@ -43,7 +43,7 @@ export interface ISCMProvider extends IDisposable {
readonly
resources
:
ISCMResourceGroup
[];
readonly
onDidChange
:
Event
<
ISCMResourceGroup
[]
>
;
readonly
count
?:
number
;
readonly
state
?:
string
;
readonly
state
ContextKey
?:
string
;
open
(
uri
:
ISCMResource
):
TPromise
<
void
>
;
getOriginalResource
(
uri
:
URI
):
TPromise
<
URI
>
;
...
...
src/vs/workbench/services/scm/common/scmService.ts
浏览文件 @
3d0b9755
...
...
@@ -107,6 +107,6 @@ export class SCMService implements ISCMService {
}
private
onDidChangeProviderState
():
void
{
this
.
activeProviderStateContextKey
.
set
(
this
.
activeProvider
.
state
);
this
.
activeProviderStateContextKey
.
set
(
this
.
activeProvider
.
state
ContextKey
);
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录