Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
e54afc6c
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,发现更多精彩内容 >>
提交
e54afc6c
编写于
4月 18, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug debt: remove revealRepl from service interface
上级
ec34824b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
26 deletion
+28
-26
src/vs/workbench/parts/debug/browser/repl.ts
src/vs/workbench/parts/debug/browser/repl.ts
+12
-1
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+0
-5
src/vs/workbench/parts/debug/electron-browser/debugActions.ts
...vs/workbench/parts/debug/electron-browser/debugActions.ts
+15
-5
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+1
-11
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
+0
-4
未找到文件。
src/vs/workbench/parts/debug/browser/repl.ts
浏览文件 @
e54afc6c
...
...
@@ -14,6 +14,8 @@ import dom = require('vs/base/browser/dom');
import
platform
=
require
(
'
vs/base/common/platform
'
);
import
tree
=
require
(
'
vs/base/parts/tree/browser/tree
'
);
import
treeimpl
=
require
(
'
vs/base/parts/tree/browser/treeImpl
'
);
import
{
IEventService
}
from
'
vs/platform/event/common/event
'
;
import
{
EventType
,
CompositeEvent
}
from
'
vs/workbench/common/events
'
;
import
viewer
=
require
(
'
vs/workbench/parts/debug/browser/replViewer
'
);
import
debug
=
require
(
'
vs/workbench/parts/debug/common/debug
'
);
import
debugactions
=
require
(
'
vs/workbench/parts/debug/electron-browser/debugActions
'
);
...
...
@@ -61,7 +63,8 @@ export class Repl extends Panel {
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IContextViewService
private
contextViewService
:
IContextViewService
,
@
IStorageService
private
storageService
:
IStorageService
@
IStorageService
private
storageService
:
IStorageService
,
@
IEventService
private
eventService
:
IEventService
)
{
super
(
debug
.
REPL_ID
,
telemetryService
);
...
...
@@ -73,6 +76,14 @@ export class Repl extends Panel {
this
.
toDispose
.
push
(
this
.
debugService
.
getModel
().
addListener2
(
debug
.
ModelEvents
.
REPL_ELEMENTS_UPDATED
,
(
re
:
debug
.
ITreeElement
|
debug
.
ITreeElement
[])
=>
{
this
.
onReplElementsUpdated
(
re
);
}));
this
.
toDispose
.
push
(
this
.
eventService
.
addListener2
(
EventType
.
COMPOSITE_OPENED
,
(
e
:
CompositeEvent
)
=>
{
if
(
e
.
compositeId
===
debug
.
REPL_ID
)
{
const
elements
=
this
.
debugService
.
getModel
().
getReplElements
();
if
(
elements
.
length
>
0
)
{
return
this
.
reveal
(
elements
[
elements
.
length
-
1
]);
}
}
}));
}
private
onReplElementsUpdated
(
re
:
debug
.
ITreeElement
|
debug
.
ITreeElement
[]):
void
{
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
e54afc6c
...
...
@@ -338,11 +338,6 @@ export interface IDebugService extends ee.IEventEmitter {
* Opens a new or reveals an already visible editor showing the source.
*/
openOrRevealEditor
(
source
:
Source
,
lineNumber
:
number
,
preserveFocus
:
boolean
,
sideBySide
:
boolean
):
TPromise
<
any
>
;
/**
* Reveals the repl.
*/
revealRepl
(
focus
?:
boolean
):
TPromise
<
void
>
;
}
// Editor interfaces
...
...
src/vs/workbench/parts/debug/electron-browser/debugActions.ts
浏览文件 @
e54afc6c
...
...
@@ -591,13 +591,19 @@ export class SelectionToWatchExpressionsAction extends EditorAction {
export
class
SelectionToReplAction
extends
EditorAction
{
static
ID
=
'
editor.debug.action.selectionToRepl
'
;
constructor
(
descriptor
:
editorCommon
.
IEditorActionDescriptorData
,
editor
:
editorCommon
.
ICommonCodeEditor
,
@
IDebugService
private
debugService
:
IDebugService
)
{
constructor
(
descriptor
:
editorCommon
.
IEditorActionDescriptorData
,
editor
:
editorCommon
.
ICommonCodeEditor
,
@
IDebugService
private
debugService
:
IDebugService
,
@
IPanelService
private
panelService
:
IPanelService
)
{
super
(
descriptor
,
editor
,
Behaviour
.
TextFocus
);
}
public
run
():
TPromise
<
any
>
{
const
text
=
this
.
editor
.
getModel
().
getValueInRange
(
this
.
editor
.
getSelection
());
return
this
.
debugService
.
addReplExpression
(
text
).
then
(()
=>
this
.
debugService
.
revealRepl
());
return
this
.
debugService
.
addReplExpression
(
text
)
.
then
(()
=>
this
.
panelService
.
openPanel
(
debug
.
REPL_ID
,
true
));
}
public
getGroupId
():
string
{
...
...
@@ -693,7 +699,11 @@ export class ClearReplAction extends AbstractDebugAction {
static
ID
=
'
workbench.debug.panel.action.clearReplAction
'
;
static
LABEL
=
nls
.
localize
(
'
clearRepl
'
,
"
Clear Console
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
,
@
IPanelService
private
panelService
:
IPanelService
)
{
super
(
id
,
label
,
'
debug-action clear-repl
'
,
debugService
,
keybindingService
);
}
...
...
@@ -701,7 +711,7 @@ export class ClearReplAction extends AbstractDebugAction {
this
.
debugService
.
clearReplExpressions
();
// focus back to repl
return
this
.
debugService
.
revealRepl
(
);
return
this
.
panelService
.
openPanel
(
debug
.
REPL_ID
,
true
);
}
}
...
...
@@ -737,7 +747,7 @@ export class ToggleReplAction extends AbstractDebugAction {
return
TPromise
.
as
(
null
);
}
return
this
.
debugService
.
revealRepl
(
);
return
this
.
panelService
.
openPanel
(
debug
.
REPL_ID
,
true
);
}
private
registerListeners
():
void
{
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
e54afc6c
...
...
@@ -35,7 +35,6 @@ import model = require('vs/workbench/parts/debug/common/debugModel');
import
{
DebugStringEditorInput
}
from
'
vs/workbench/parts/debug/browser/debugEditorInputs
'
;
import
viewmodel
=
require
(
'
vs/workbench/parts/debug/common/debugViewModel
'
);
import
debugactions
=
require
(
'
vs/workbench/parts/debug/electron-browser/debugActions
'
);
import
{
Repl
}
from
'
vs/workbench/parts/debug/browser/repl
'
;
import
{
BreakpointWidget
}
from
'
vs/workbench/parts/debug/browser/breakpointWidget
'
;
import
{
ConfigurationManager
}
from
'
vs/workbench/parts/debug/node/debugConfigurationManager
'
;
import
{
Source
}
from
'
vs/workbench/parts/debug/common/debugSource
'
;
...
...
@@ -607,7 +606,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
}).
then
((
result
:
DebugProtocol
.
Response
)
=>
{
if
(
changeViewState
)
{
this
.
viewletService
.
openViewlet
(
debug
.
VIEWLET_ID
);
this
.
revealRepl
(
false
).
done
(
undefined
,
errors
.
onUnexpectedError
);
this
.
panelService
.
openPanel
(
debug
.
REPL_ID
,
false
).
done
(
undefined
,
errors
.
onUnexpectedError
);
}
// Do not change status bar to orange if we are just running without debug.
...
...
@@ -824,15 +823,6 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
return
this
.
editorService
.
openEditor
(
editorInput
,
wbeditorcommon
.
TextEditorOptions
.
create
({
preserveFocus
:
true
}),
sideBySide
);
}
public
revealRepl
(
focus
=
true
):
TPromise
<
void
>
{
return
this
.
panelService
.
openPanel
(
debug
.
REPL_ID
,
focus
).
then
((
repl
:
Repl
)
=>
{
const
elements
=
this
.
model
.
getReplElements
();
if
(
repl
&&
elements
.
length
>
0
)
{
return
repl
.
reveal
(
elements
[
elements
.
length
-
1
]);
}
});
}
public
canSetBreakpointsIn
(
model
:
editor
.
IModel
):
boolean
{
return
this
.
configurationManager
.
canSetBreakpointsIn
(
model
);
}
...
...
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
浏览文件 @
e54afc6c
...
...
@@ -134,10 +134,6 @@ export class MockDebugService extends ee.EventEmitter implements debug.IDebugSer
public
openOrRevealEditor
(
source
:
Source
,
lineNumber
:
number
,
preserveFocus
:
boolean
,
sideBySide
:
boolean
):
TPromise
<
any
>
{
return
TPromise
.
as
(
null
);
}
public
revealRepl
(
focus
?:
boolean
):
TPromise
<
void
>
{
return
TPromise
.
as
(
null
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录