Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
c6456a0a
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,发现更多精彩内容 >>
提交
c6456a0a
编写于
7月 13, 2016
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bring back the isSupported method cos they are used for the F1 list
上级
0c861881
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
1 deletion
+22
-1
src/vs/editor/contrib/format/common/formatActions.ts
src/vs/editor/contrib/format/common/formatActions.ts
+10
-1
src/vs/editor/contrib/quickOpen/browser/quickOutline.ts
src/vs/editor/contrib/quickOpen/browser/quickOutline.ts
+3
-0
src/vs/editor/contrib/rename/browser/rename.ts
src/vs/editor/contrib/rename/browser/rename.ts
+9
-0
未找到文件。
src/vs/editor/contrib/format/common/formatActions.ts
浏览文件 @
c6456a0a
...
@@ -141,7 +141,7 @@ export class FormatAction extends EditorAction {
...
@@ -141,7 +141,7 @@ export class FormatAction extends EditorAction {
private
_disposables
:
IDisposable
[];
private
_disposables
:
IDisposable
[];
constructor
(
descriptor
:
editorCommon
.
IEditorActionDescriptorData
,
editor
:
editorCommon
.
ICommonCodeEditor
)
{
constructor
(
descriptor
:
editorCommon
.
IEditorActionDescriptorData
,
editor
:
editorCommon
.
ICommonCodeEditor
)
{
super
(
descriptor
,
editor
,
Behaviour
.
WidgetFocus
|
Behaviour
.
Writeable
);
super
(
descriptor
,
editor
,
Behaviour
.
WidgetFocus
|
Behaviour
.
Writeable
|
Behaviour
.
UpdateOnModelChange
);
this
.
_disposables
=
[
this
.
_disposables
=
[
DocumentFormattingEditProviderRegistry
.
onDidChange
(()
=>
this
.
resetEnablementState
()),
DocumentFormattingEditProviderRegistry
.
onDidChange
(()
=>
this
.
resetEnablementState
()),
DocumentRangeFormattingEditProviderRegistry
.
onDidChange
(()
=>
this
.
resetEnablementState
())
DocumentRangeFormattingEditProviderRegistry
.
onDidChange
(()
=>
this
.
resetEnablementState
())
...
@@ -152,6 +152,15 @@ export class FormatAction extends EditorAction {
...
@@ -152,6 +152,15 @@ export class FormatAction extends EditorAction {
super
.
dispose
();
super
.
dispose
();
this
.
_disposables
=
dispose
(
this
.
_disposables
);
this
.
_disposables
=
dispose
(
this
.
_disposables
);
}
}
public
isSupported
():
boolean
{
return
(
(
DocumentFormattingEditProviderRegistry
.
has
(
this
.
editor
.
getModel
())
||
DocumentRangeFormattingEditProviderRegistry
.
has
(
this
.
editor
.
getModel
())
)
&&
super
.
isSupported
()
);
}
public
run
():
TPromise
<
boolean
>
{
public
run
():
TPromise
<
boolean
>
{
...
...
src/vs/editor/contrib/quickOpen/browser/quickOutline.ts
浏览文件 @
c6456a0a
...
@@ -115,6 +115,9 @@ export class QuickOutlineAction extends BaseEditorQuickOpenAction {
...
@@ -115,6 +115,9 @@ export class QuickOutlineAction extends BaseEditorQuickOpenAction {
constructor
(
descriptor
:
IEditorActionDescriptorData
,
editor
:
ICommonCodeEditor
)
{
constructor
(
descriptor
:
IEditorActionDescriptorData
,
editor
:
ICommonCodeEditor
)
{
super
(
descriptor
,
editor
,
nls
.
localize
(
'
QuickOutlineAction.label
'
,
"
Go to Symbol...
"
));
super
(
descriptor
,
editor
,
nls
.
localize
(
'
QuickOutlineAction.label
'
,
"
Go to Symbol...
"
));
}
}
public
isSupported
():
boolean
{
return
DocumentSymbolProviderRegistry
.
has
(
this
.
editor
.
getModel
())
&&
super
.
isSupported
();
}
public
run
():
TPromise
<
boolean
>
{
public
run
():
TPromise
<
boolean
>
{
let
model
=
this
.
editor
.
getModel
();
let
model
=
this
.
editor
.
getModel
();
...
...
src/vs/editor/contrib/rename/browser/rename.ts
浏览文件 @
c6456a0a
...
@@ -20,6 +20,7 @@ import {IEditorActionDescriptorData, IRange} from 'vs/editor/common/editorCommon
...
@@ -20,6 +20,7 @@ import {IEditorActionDescriptorData, IRange} from 'vs/editor/common/editorCommon
import
{
CommonEditorRegistry
,
ContextKey
}
from
'
vs/editor/common/editorCommonExtensions
'
;
import
{
CommonEditorRegistry
,
ContextKey
}
from
'
vs/editor/common/editorCommonExtensions
'
;
import
{
KEYBINDING_CONTEXT_EDITOR_READONLY
,
ModeContextKeys
}
from
'
vs/editor/common/editorCommon
'
;
import
{
KEYBINDING_CONTEXT_EDITOR_READONLY
,
ModeContextKeys
}
from
'
vs/editor/common/editorCommon
'
;
import
{
BulkEdit
,
createBulkEdit
}
from
'
vs/editor/common/services/bulkEdit
'
;
import
{
BulkEdit
,
createBulkEdit
}
from
'
vs/editor/common/services/bulkEdit
'
;
import
{
RenameProviderRegistry
}
from
'
vs/editor/common/modes
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
rename
}
from
'
../common/rename
'
;
import
{
rename
}
from
'
../common/rename
'
;
import
RenameInputField
from
'
./renameInputField
'
;
import
RenameInputField
from
'
./renameInputField
'
;
...
@@ -52,6 +53,14 @@ export class RenameAction extends EditorAction {
...
@@ -52,6 +53,14 @@ export class RenameAction extends EditorAction {
this
.
_renameInputVisible
=
keybindingService
.
createKey
(
CONTEXT_RENAME_INPUT_VISIBLE
,
false
);
this
.
_renameInputVisible
=
keybindingService
.
createKey
(
CONTEXT_RENAME_INPUT_VISIBLE
,
false
);
}
}
public
isSupported
():
boolean
{
return
RenameProviderRegistry
.
has
(
this
.
editor
.
getModel
())
&&
!
this
.
editor
.
getModel
().
hasEditableRange
()
&&
super
.
isSupported
();
}
public
getEnablementState
():
boolean
{
return
RenameProviderRegistry
.
has
(
this
.
editor
.
getModel
());
}
public
run
(
event
?:
any
):
TPromise
<
any
>
{
public
run
(
event
?:
any
):
TPromise
<
any
>
{
const
selection
=
this
.
editor
.
getSelection
(),
const
selection
=
this
.
editor
.
getSelection
(),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录