Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
f2492144
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,发现更多精彩内容 >>
提交
f2492144
编写于
5月 11, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
repl: destructure imports
上级
2f0abee5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
15 deletion
+15
-15
src/vs/workbench/parts/debug/electron-browser/repl.ts
src/vs/workbench/parts/debug/electron-browser/repl.ts
+15
-15
未找到文件。
src/vs/workbench/parts/debug/electron-browser/repl.ts
浏览文件 @
f2492144
...
...
@@ -30,7 +30,6 @@ import { IInstantiationService, createDecorator } from 'vs/platform/instantiatio
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
ReplExpressionsRenderer
,
ReplExpressionsController
,
ReplExpressionsDataSource
,
ReplExpressionsActionProvider
,
ReplExpressionsAccessibilityProvider
}
from
'
vs/workbench/parts/debug/electron-browser/replViewer
'
;
import
{
SimpleDebugEditor
}
from
'
vs/workbench/parts/debug/electron-browser/simpleDebugEditor
'
;
import
*
as
debug
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
ClearReplAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
import
{
ReplHistory
}
from
'
vs/workbench/parts/debug/common/replHistory
'
;
import
{
Panel
}
from
'
vs/workbench/browser/panel
'
;
...
...
@@ -44,6 +43,7 @@ import { dispose } from 'vs/base/common/lifecycle';
import
{
OpenMode
,
ClickBehavior
}
from
'
vs/base/parts/tree/browser/treeDefaults
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
CodeEditorWidget
}
from
'
vs/editor/browser/widget/codeEditorWidget
'
;
import
{
IDebugService
,
REPL_ID
,
DEBUG_SCHEME
,
CONTEXT_ON_FIRST_DEBUG_REPL_LINE
,
CONTEXT_IN_DEBUG_REPL
,
CONTEXT_ON_LAST_DEBUG_REPL_LINE
}
from
'
vs/workbench/parts/debug/common/debug
'
;
const
$
=
dom
.
$
;
...
...
@@ -85,7 +85,7 @@ export class Repl extends Panel implements IPrivateReplService {
private
model
:
ITextModel
;
constructor
(
@
debug
.
IDebugService
private
debugService
:
debug
.
IDebugService
,
@
IDebugService
private
debugService
:
IDebugService
,
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IStorageService
private
storageService
:
IStorageService
,
...
...
@@ -94,7 +94,7 @@ export class Repl extends Panel implements IPrivateReplService {
@
IModelService
private
modelService
:
IModelService
,
@
IContextKeyService
private
contextKeyService
:
IContextKeyService
)
{
super
(
debug
.
REPL_ID
,
telemetryService
,
themeService
);
super
(
REPL_ID
,
telemetryService
,
themeService
);
this
.
replInputHeight
=
Repl
.
REPL_INPUT_INITIAL_HEIGHT
;
this
.
registerListeners
();
...
...
@@ -155,7 +155,7 @@ export class Repl extends Panel implements IPrivateReplService {
if
(
!
visible
)
{
dispose
(
this
.
model
);
}
else
{
this
.
model
=
this
.
modelService
.
createModel
(
''
,
null
,
uri
.
parse
(
`
${
debug
.
DEBUG_SCHEME
}
:input`
),
true
);
this
.
model
=
this
.
modelService
.
createModel
(
''
,
null
,
uri
.
parse
(
`
${
DEBUG_SCHEME
}
:input`
),
true
);
this
.
replInput
.
setModel
(
this
.
model
);
}
...
...
@@ -167,17 +167,17 @@ export class Repl extends Panel implements IPrivateReplService {
const
scopedContextKeyService
=
this
.
contextKeyService
.
createScoped
(
this
.
replInputContainer
);
this
.
toUnbind
.
push
(
scopedContextKeyService
);
debug
.
CONTEXT_IN_DEBUG_REPL
.
bindTo
(
scopedContextKeyService
).
set
(
true
);
const
onFirstReplLine
=
debug
.
CONTEXT_ON_FIRST_DEBUG_REPL_LINE
.
bindTo
(
scopedContextKeyService
);
CONTEXT_IN_DEBUG_REPL
.
bindTo
(
scopedContextKeyService
).
set
(
true
);
const
onFirstReplLine
=
CONTEXT_ON_FIRST_DEBUG_REPL_LINE
.
bindTo
(
scopedContextKeyService
);
onFirstReplLine
.
set
(
true
);
const
onLastReplLine
=
debug
.
CONTEXT_ON_LAST_DEBUG_REPL_LINE
.
bindTo
(
scopedContextKeyService
);
const
onLastReplLine
=
CONTEXT_ON_LAST_DEBUG_REPL_LINE
.
bindTo
(
scopedContextKeyService
);
onLastReplLine
.
set
(
true
);
const
scopedInstantiationService
=
this
.
instantiationService
.
createChild
(
new
ServiceCollection
(
[
IContextKeyService
,
scopedContextKeyService
],
[
IPrivateReplService
,
this
]));
this
.
replInput
=
scopedInstantiationService
.
createInstance
(
CodeEditorWidget
,
this
.
replInputContainer
,
SimpleDebugEditor
.
getEditorOptions
(),
SimpleDebugEditor
.
getCodeEditorWidgetOptions
());
modes
.
SuggestRegistry
.
register
({
scheme
:
debug
.
DEBUG_SCHEME
,
hasAccessToAllModels
:
true
},
{
modes
.
SuggestRegistry
.
register
({
scheme
:
DEBUG_SCHEME
,
hasAccessToAllModels
:
true
},
{
triggerCharacters
:
[
'
.
'
],
provideCompletionItems
:
(
model
:
ITextModel
,
position
:
Position
,
_context
:
modes
.
SuggestContext
,
token
:
CancellationToken
):
Thenable
<
modes
.
ISuggestResult
>
=>
{
const
word
=
this
.
replInput
.
getModel
().
getWordAtPosition
(
position
);
...
...
@@ -307,9 +307,9 @@ class ReplHistoryPreviousAction extends EditorAction {
id
:
'
repl.action.historyPrevious
'
,
label
:
nls
.
localize
(
'
actions.repl.historyPrevious
'
,
"
History Previous
"
),
alias
:
'
History Previous
'
,
precondition
:
debug
.
CONTEXT_IN_DEBUG_REPL
,
precondition
:
CONTEXT_IN_DEBUG_REPL
,
kbOpts
:
{
kbExpr
:
debug
.
CONTEXT_ON_FIRST_DEBUG_REPL_LINE
,
kbExpr
:
CONTEXT_ON_FIRST_DEBUG_REPL_LINE
,
primary
:
KeyCode
.
UpArrow
,
weight
:
50
},
...
...
@@ -331,9 +331,9 @@ class ReplHistoryNextAction extends EditorAction {
id
:
'
repl.action.historyNext
'
,
label
:
nls
.
localize
(
'
actions.repl.historyNext
'
,
"
History Next
"
),
alias
:
'
History Next
'
,
precondition
:
debug
.
CONTEXT_IN_DEBUG_REPL
,
precondition
:
CONTEXT_IN_DEBUG_REPL
,
kbOpts
:
{
kbExpr
:
debug
.
CONTEXT_ON_LAST_DEBUG_REPL_LINE
,
kbExpr
:
CONTEXT_ON_LAST_DEBUG_REPL_LINE
,
primary
:
KeyCode
.
DownArrow
,
weight
:
50
},
...
...
@@ -355,7 +355,7 @@ class AcceptReplInputAction extends EditorAction {
id
:
'
repl.action.acceptInput
'
,
label
:
nls
.
localize
({
key
:
'
actions.repl.acceptInput
'
,
comment
:
[
'
Apply input from the debug console input box
'
]
},
"
REPL Accept Input
"
),
alias
:
'
REPL Accept Input
'
,
precondition
:
debug
.
CONTEXT_IN_DEBUG_REPL
,
precondition
:
CONTEXT_IN_DEBUG_REPL
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
textInputFocus
,
primary
:
KeyCode
.
Enter
...
...
@@ -376,7 +376,7 @@ export class ReplCopyAllAction extends EditorAction {
id
:
'
repl.action.copyAll
'
,
label
:
nls
.
localize
(
'
actions.repl.copyAll
'
,
"
Debug: Console Copy All
"
),
alias
:
'
Debug Console Copy All
'
,
precondition
:
debug
.
CONTEXT_IN_DEBUG_REPL
,
precondition
:
CONTEXT_IN_DEBUG_REPL
,
});
}
...
...
@@ -393,7 +393,7 @@ registerEditorAction(ReplCopyAllAction);
const
SuggestCommand
=
EditorCommand
.
bindToContribution
<
SuggestController
>
(
SuggestController
.
get
);
registerEditorCommand
(
new
SuggestCommand
({
id
:
'
repl.action.acceptSuggestion
'
,
precondition
:
ContextKeyExpr
.
and
(
debug
.
CONTEXT_IN_DEBUG_REPL
,
SuggestContext
.
Visible
),
precondition
:
ContextKeyExpr
.
and
(
CONTEXT_IN_DEBUG_REPL
,
SuggestContext
.
Visible
),
handler
:
x
=>
x
.
acceptSelectedSuggestion
(),
kbOpts
:
{
weight
:
50
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录