Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
5b25934b
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,发现更多精彩内容 >>
提交
5b25934b
编写于
1月 20, 2017
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Disable some commands while in the walkthrough
上级
5db9993b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
6 deletion
+28
-6
src/vs/editor/common/editorCommon.ts
src/vs/editor/common/editorCommon.ts
+4
-0
src/vs/editor/common/modes/editorModeContext.ts
src/vs/editor/common/modes/editorModeContext.ts
+4
-0
src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts
...editor/contrib/goToDeclaration/browser/goToDeclaration.ts
+16
-5
src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts
...editor/contrib/referenceSearch/browser/referenceSearch.ts
+4
-1
未找到文件。
src/vs/editor/common/editorCommon.ts
浏览文件 @
5b25934b
...
@@ -3129,6 +3129,10 @@ export namespace ModeContextKeys {
...
@@ -3129,6 +3129,10 @@ export namespace ModeContextKeys {
* @internal
* @internal
*/
*/
export
const
hasSignatureHelpProvider
=
new
RawContextKey
<
boolean
>
(
'
editorHasSignatureHelpProvider
'
,
undefined
);
export
const
hasSignatureHelpProvider
=
new
RawContextKey
<
boolean
>
(
'
editorHasSignatureHelpProvider
'
,
undefined
);
/**
* @internal
*/
export
const
isInWalkThrough
=
new
RawContextKey
<
boolean
>
(
'
isInWalkThrough
'
,
undefined
);
}
}
...
...
src/vs/editor/common/modes/editorModeContext.ts
浏览文件 @
5b25934b
...
@@ -28,6 +28,7 @@ export class EditorModeContext {
...
@@ -28,6 +28,7 @@ export class EditorModeContext {
private
_hasDocumentFormattingProvider
:
IContextKey
<
boolean
>
;
private
_hasDocumentFormattingProvider
:
IContextKey
<
boolean
>
;
private
_hasDocumentSelectionFormattingProvider
:
IContextKey
<
boolean
>
;
private
_hasDocumentSelectionFormattingProvider
:
IContextKey
<
boolean
>
;
private
_hasSignatureHelpProvider
:
IContextKey
<
boolean
>
;
private
_hasSignatureHelpProvider
:
IContextKey
<
boolean
>
;
private
_isInWalkThrough
:
IContextKey
<
boolean
>
;
constructor
(
constructor
(
editor
:
ICommonCodeEditor
,
editor
:
ICommonCodeEditor
,
...
@@ -49,6 +50,7 @@ export class EditorModeContext {
...
@@ -49,6 +50,7 @@ export class EditorModeContext {
this
.
_hasDocumentFormattingProvider
=
ModeContextKeys
.
hasDocumentFormattingProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDocumentFormattingProvider
=
ModeContextKeys
.
hasDocumentFormattingProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDocumentSelectionFormattingProvider
=
ModeContextKeys
.
hasDocumentSelectionFormattingProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDocumentSelectionFormattingProvider
=
ModeContextKeys
.
hasDocumentSelectionFormattingProvider
.
bindTo
(
contextKeyService
);
this
.
_hasSignatureHelpProvider
=
ModeContextKeys
.
hasSignatureHelpProvider
.
bindTo
(
contextKeyService
);
this
.
_hasSignatureHelpProvider
=
ModeContextKeys
.
hasSignatureHelpProvider
.
bindTo
(
contextKeyService
);
this
.
_isInWalkThrough
=
ModeContextKeys
.
isInWalkThrough
.
bindTo
(
contextKeyService
);
// update when model/mode changes
// update when model/mode changes
this
.
_disposables
.
push
(
editor
.
onDidChangeModel
(()
=>
this
.
_update
()));
this
.
_disposables
.
push
(
editor
.
onDidChangeModel
(()
=>
this
.
_update
()));
...
@@ -91,6 +93,7 @@ export class EditorModeContext {
...
@@ -91,6 +93,7 @@ export class EditorModeContext {
this
.
_hasDocumentFormattingProvider
.
reset
();
this
.
_hasDocumentFormattingProvider
.
reset
();
this
.
_hasDocumentSelectionFormattingProvider
.
reset
();
this
.
_hasDocumentSelectionFormattingProvider
.
reset
();
this
.
_hasSignatureHelpProvider
.
reset
();
this
.
_hasSignatureHelpProvider
.
reset
();
this
.
_isInWalkThrough
.
reset
();
}
}
private
_update
()
{
private
_update
()
{
...
@@ -113,5 +116,6 @@ export class EditorModeContext {
...
@@ -113,5 +116,6 @@ export class EditorModeContext {
this
.
_hasSignatureHelpProvider
.
set
(
modes
.
SignatureHelpProviderRegistry
.
has
(
model
));
this
.
_hasSignatureHelpProvider
.
set
(
modes
.
SignatureHelpProviderRegistry
.
has
(
model
));
this
.
_hasDocumentFormattingProvider
.
set
(
modes
.
DocumentFormattingEditProviderRegistry
.
has
(
model
)
||
modes
.
DocumentRangeFormattingEditProviderRegistry
.
has
(
model
));
this
.
_hasDocumentFormattingProvider
.
set
(
modes
.
DocumentFormattingEditProviderRegistry
.
has
(
model
)
||
modes
.
DocumentRangeFormattingEditProviderRegistry
.
has
(
model
));
this
.
_hasDocumentSelectionFormattingProvider
.
set
(
modes
.
DocumentRangeFormattingEditProviderRegistry
.
has
(
model
));
this
.
_hasDocumentSelectionFormattingProvider
.
set
(
modes
.
DocumentRangeFormattingEditProviderRegistry
.
has
(
model
));
this
.
_isInWalkThrough
.
set
(
model
.
uri
.
scheme
===
'
walkThroughSnippet
'
);
}
}
}
}
src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts
浏览文件 @
5b25934b
...
@@ -169,7 +169,9 @@ export class GoToDefinitionAction extends DefinitionAction {
...
@@ -169,7 +169,9 @@ export class GoToDefinitionAction extends DefinitionAction {
id
:
GoToDefinitionAction
.
ID
,
id
:
GoToDefinitionAction
.
ID
,
label
:
nls
.
localize
(
'
actions.goToDecl.label
'
,
"
Go to Definition
"
),
label
:
nls
.
localize
(
'
actions.goToDecl.label
'
,
"
Go to Definition
"
),
alias
:
'
Go to Definition
'
,
alias
:
'
Go to Definition
'
,
precondition
:
ModeContextKeys
.
hasDefinitionProvider
,
precondition
:
ContextKeyExpr
.
and
(
ModeContextKeys
.
hasDefinitionProvider
,
ModeContextKeys
.
isInWalkThrough
.
toNegated
()),
kbOpts
:
{
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
TextFocus
,
kbExpr
:
EditorContextKeys
.
TextFocus
,
primary
:
goToDeclarationKb
primary
:
goToDeclarationKb
...
@@ -192,7 +194,9 @@ export class OpenDefinitionToSideAction extends DefinitionAction {
...
@@ -192,7 +194,9 @@ export class OpenDefinitionToSideAction extends DefinitionAction {
id
:
OpenDefinitionToSideAction
.
ID
,
id
:
OpenDefinitionToSideAction
.
ID
,
label
:
nls
.
localize
(
'
actions.goToDeclToSide.label
'
,
"
Open Definition to the Side
"
),
label
:
nls
.
localize
(
'
actions.goToDeclToSide.label
'
,
"
Open Definition to the Side
"
),
alias
:
'
Open Definition to the Side
'
,
alias
:
'
Open Definition to the Side
'
,
precondition
:
ModeContextKeys
.
hasDefinitionProvider
,
precondition
:
ContextKeyExpr
.
and
(
ModeContextKeys
.
hasDefinitionProvider
,
ModeContextKeys
.
isInWalkThrough
.
toNegated
()),
kbOpts
:
{
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
TextFocus
,
kbExpr
:
EditorContextKeys
.
TextFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
goToDeclarationKb
)
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
goToDeclarationKb
)
...
@@ -208,7 +212,10 @@ export class PeekDefinitionAction extends DefinitionAction {
...
@@ -208,7 +212,10 @@ export class PeekDefinitionAction extends DefinitionAction {
id
:
'
editor.action.previewDeclaration
'
,
id
:
'
editor.action.previewDeclaration
'
,
label
:
nls
.
localize
(
'
actions.previewDecl.label
'
,
"
Peek Definition
"
),
label
:
nls
.
localize
(
'
actions.previewDecl.label
'
,
"
Peek Definition
"
),
alias
:
'
Peek Definition
'
,
alias
:
'
Peek Definition
'
,
precondition
:
ContextKeyExpr
.
and
(
ModeContextKeys
.
hasDefinitionProvider
,
PeekContext
.
notInPeekEditor
),
precondition
:
ContextKeyExpr
.
and
(
ModeContextKeys
.
hasDefinitionProvider
,
PeekContext
.
notInPeekEditor
,
ModeContextKeys
.
isInWalkThrough
.
toNegated
()),
kbOpts
:
{
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
TextFocus
,
kbExpr
:
EditorContextKeys
.
TextFocus
,
primary
:
KeyMod
.
Alt
|
KeyCode
.
F12
,
primary
:
KeyMod
.
Alt
|
KeyCode
.
F12
,
...
@@ -233,7 +240,9 @@ export class GoToImplementationAction extends DefinitionAction {
...
@@ -233,7 +240,9 @@ export class GoToImplementationAction extends DefinitionAction {
id
:
GoToImplementationAction
.
ID
,
id
:
GoToImplementationAction
.
ID
,
label
:
nls
.
localize
(
'
actions.goToImplementation.label
'
,
"
Go to Implementation
"
),
label
:
nls
.
localize
(
'
actions.goToImplementation.label
'
,
"
Go to Implementation
"
),
alias
:
'
Go to Implementation
'
,
alias
:
'
Go to Implementation
'
,
precondition
:
ModeContextKeys
.
hasTypeDefinitionProvider
,
precondition
:
ContextKeyExpr
.
and
(
ModeContextKeys
.
hasTypeDefinitionProvider
,
ModeContextKeys
.
isInWalkThrough
.
toNegated
()),
kbOpts
:
{
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
TextFocus
,
kbExpr
:
EditorContextKeys
.
TextFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
F12
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
F12
...
@@ -260,7 +269,9 @@ export class PeekImplementationAction extends DefinitionAction {
...
@@ -260,7 +269,9 @@ export class PeekImplementationAction extends DefinitionAction {
id
:
PeekImplementationAction
.
ID
,
id
:
PeekImplementationAction
.
ID
,
label
:
nls
.
localize
(
'
actions.peekImplementation.label
'
,
"
Peek Implementation
"
),
label
:
nls
.
localize
(
'
actions.peekImplementation.label
'
,
"
Peek Implementation
"
),
alias
:
'
Peek Implementation
'
,
alias
:
'
Peek Implementation
'
,
precondition
:
ModeContextKeys
.
hasTypeDefinitionProvider
,
precondition
:
ContextKeyExpr
.
and
(
ModeContextKeys
.
hasTypeDefinitionProvider
,
ModeContextKeys
.
isInWalkThrough
.
toNegated
()),
kbOpts
:
{
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
TextFocus
,
kbExpr
:
EditorContextKeys
.
TextFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
F12
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
F12
...
...
src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts
浏览文件 @
5b25934b
...
@@ -63,7 +63,10 @@ export class ReferenceAction extends EditorAction {
...
@@ -63,7 +63,10 @@ export class ReferenceAction extends EditorAction {
id
:
'
editor.action.referenceSearch.trigger
'
,
id
:
'
editor.action.referenceSearch.trigger
'
,
label
:
nls
.
localize
(
'
references.action.label
'
,
"
Find All References
"
),
label
:
nls
.
localize
(
'
references.action.label
'
,
"
Find All References
"
),
alias
:
'
Find All References
'
,
alias
:
'
Find All References
'
,
precondition
:
ContextKeyExpr
.
and
(
ModeContextKeys
.
hasReferenceProvider
,
PeekContext
.
notInPeekEditor
),
precondition
:
ContextKeyExpr
.
and
(
ModeContextKeys
.
hasReferenceProvider
,
PeekContext
.
notInPeekEditor
,
ModeContextKeys
.
isInWalkThrough
.
toNegated
()),
kbOpts
:
{
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
TextFocus
,
kbExpr
:
EditorContextKeys
.
TextFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
F12
primary
:
KeyMod
.
Shift
|
KeyCode
.
F12
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录