Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
95f55954
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
95f55954
编写于
5月 03, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: context menu actions for threads
fixes #5643
上级
d9b918a8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
68 addition
and
15 deletion
+68
-15
src/vs/workbench/parts/debug/browser/debugViewer.ts
src/vs/workbench/parts/debug/browser/debugViewer.ts
+40
-4
src/vs/workbench/parts/debug/browser/debugViews.ts
src/vs/workbench/parts/debug/browser/debugViews.ts
+3
-1
src/vs/workbench/parts/debug/electron-browser/debugActions.ts
...vs/workbench/parts/debug/electron-browser/debugActions.ts
+25
-10
未找到文件。
src/vs/workbench/parts/debug/browser/debugViewer.ts
浏览文件 @
95f55954
...
...
@@ -193,6 +193,44 @@ export class BaseDebugController extends treedefaults.DefaultController {
// call stack
export
class
CallStackActionProvider
implements
renderer
.
IActionProvider
{
constructor
(@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
// noop
}
public
hasActions
(
tree
:
tree
.
ITree
,
element
:
any
):
boolean
{
return
false
;
}
public
getActions
(
tree
:
tree
.
ITree
,
element
:
any
):
TPromise
<
actions
.
IAction
[]
>
{
return
TPromise
.
as
([]);
}
public
hasSecondaryActions
(
tree
:
tree
.
ITree
,
element
:
any
):
boolean
{
return
element
instanceof
model
.
Thread
;
}
public
getSecondaryActions
(
tree
:
tree
.
ITree
,
element
:
any
):
TPromise
<
actions
.
IAction
[]
>
{
const
actions
:
actions
.
Action
[]
=
[];
const
thread
=
<
model
.
Thread
>
element
;
if
(
thread
.
stopped
)
{
actions
.
push
(
this
.
instantiationService
.
createInstance
(
debugactions
.
ContinueAction
,
debugactions
.
ContinueAction
.
ID
,
debugactions
.
ContinueAction
.
LABEL
));
actions
.
push
(
this
.
instantiationService
.
createInstance
(
debugactions
.
StepOverDebugAction
,
debugactions
.
StepOverDebugAction
.
ID
,
debugactions
.
StepOverDebugAction
.
LABEL
));
actions
.
push
(
this
.
instantiationService
.
createInstance
(
debugactions
.
StepIntoDebugAction
,
debugactions
.
StepIntoDebugAction
.
ID
,
debugactions
.
StepIntoDebugAction
.
LABEL
));
actions
.
push
(
this
.
instantiationService
.
createInstance
(
debugactions
.
StepOutDebugAction
,
debugactions
.
StepOutDebugAction
.
ID
,
debugactions
.
StepOutDebugAction
.
LABEL
));
}
else
{
actions
.
push
(
this
.
instantiationService
.
createInstance
(
debugactions
.
PauseAction
,
debugactions
.
PauseAction
.
ID
,
debugactions
.
PauseAction
.
LABEL
));
}
return
TPromise
.
as
(
actions
);
}
public
getActionItem
(
tree
:
tree
.
ITree
,
element
:
any
,
action
:
actions
.
IAction
):
actionbar
.
IActionItem
{
return
null
;
}
}
export
class
CallStackDataSource
implements
tree
.
IDataSource
{
constructor
(@
debug
.
IDebugService
private
debugService
:
debug
.
IDebugService
)
{
...
...
@@ -366,10 +404,8 @@ export class CallstackAccessibilityProvider implements tree.IAccessibilityProvid
export
class
VariablesActionProvider
implements
renderer
.
IActionProvider
{
private
instantiationService
:
IInstantiationService
;
constructor
(
instantiationService
:
IInstantiationService
)
{
this
.
instantiationService
=
instantiationService
;
constructor
(
private
instantiationService
:
IInstantiationService
)
{
// noop
}
public
hasActions
(
tree
:
tree
.
ITree
,
element
:
any
):
boolean
{
...
...
src/vs/workbench/parts/debug/browser/debugViews.ts
浏览文件 @
95f55954
...
...
@@ -218,11 +218,13 @@ export class CallStackView extends viewlet.CollapsibleViewletView {
public
renderBody
(
container
:
HTMLElement
):
void
{
dom
.
addClass
(
container
,
'
debug-call-stack
'
);
this
.
treeContainer
=
renderViewTree
(
container
);
const
actionProvider
=
this
.
instantiationService
.
createInstance
(
viewer
.
CallStackActionProvider
);
this
.
tree
=
new
treeimpl
.
Tree
(
this
.
treeContainer
,
{
dataSource
:
this
.
instantiationService
.
createInstance
(
viewer
.
CallStackDataSource
),
renderer
:
this
.
instantiationService
.
createInstance
(
viewer
.
CallStackRenderer
),
accessibilityProvider
:
this
.
instantiationService
.
createInstance
(
viewer
.
CallstackAccessibilityProvider
)
accessibilityProvider
:
this
.
instantiationService
.
createInstance
(
viewer
.
CallstackAccessibilityProvider
),
controller
:
new
viewer
.
BaseDebugController
(
this
.
debugService
,
this
.
contextMenuService
,
actionProvider
)
},
debugTreeOptions
(
nls
.
localize
(
'
callStackAriaLabel
'
,
"
Debug Call Stack
"
)));
this
.
toDispose
.
push
(
this
.
tree
.
addListener2
(
'
selection
'
,
(
e
:
tree
.
ISelectionEvent
)
=>
{
...
...
src/vs/workbench/parts/debug/electron-browser/debugActions.ts
浏览文件 @
95f55954
...
...
@@ -159,8 +159,11 @@ export class StepOverDebugAction extends AbstractDebugAction {
super
(
id
,
label
,
'
debug-action step-over
'
,
debugService
,
keybindingService
);
}
public
run
():
TPromise
<
any
>
{
return
this
.
debugService
.
next
(
this
.
debugService
.
getViewModel
().
getFocusedThreadId
());
public
run
(
thread
:
debug
.
IThread
):
TPromise
<
any
>
{
const
threadId
=
thread
&&
thread
instanceof
model
.
Thread
?
thread
.
threadId
:
this
.
debugService
.
getViewModel
().
getFocusedThreadId
();
return
this
.
debugService
.
next
(
threadId
);
}
protected
isEnabled
(
state
:
debug
.
State
):
boolean
{
...
...
@@ -176,8 +179,11 @@ export class StepIntoDebugAction extends AbstractDebugAction {
super
(
id
,
label
,
'
debug-action step-into
'
,
debugService
,
keybindingService
);
}
public
run
():
TPromise
<
any
>
{
return
this
.
debugService
.
stepIn
(
this
.
debugService
.
getViewModel
().
getFocusedThreadId
());
public
run
(
thread
:
debug
.
IThread
):
TPromise
<
any
>
{
const
threadId
=
thread
&&
thread
instanceof
model
.
Thread
?
thread
.
threadId
:
this
.
debugService
.
getViewModel
().
getFocusedThreadId
();
return
this
.
debugService
.
stepIn
(
threadId
);
}
protected
isEnabled
(
state
:
debug
.
State
):
boolean
{
...
...
@@ -193,8 +199,11 @@ export class StepOutDebugAction extends AbstractDebugAction {
super
(
id
,
label
,
'
debug-action step-out
'
,
debugService
,
keybindingService
);
}
public
run
():
TPromise
<
any
>
{
return
this
.
debugService
.
stepOut
(
this
.
debugService
.
getViewModel
().
getFocusedThreadId
());
public
run
(
thread
:
debug
.
IThread
):
TPromise
<
any
>
{
const
threadId
=
thread
&&
thread
instanceof
model
.
Thread
?
thread
.
threadId
:
this
.
debugService
.
getViewModel
().
getFocusedThreadId
();
return
this
.
debugService
.
stepOut
(
threadId
);
}
protected
isEnabled
(
state
:
debug
.
State
):
boolean
{
...
...
@@ -235,8 +244,11 @@ export class ContinueAction extends AbstractDebugAction {
super
(
id
,
label
,
'
debug-action continue
'
,
debugService
,
keybindingService
);
}
public
run
():
TPromise
<
any
>
{
return
this
.
debugService
.
continue
(
this
.
debugService
.
getViewModel
().
getFocusedThreadId
());
public
run
(
thread
:
debug
.
IThread
):
TPromise
<
any
>
{
const
threadId
=
thread
&&
thread
instanceof
model
.
Thread
?
thread
.
threadId
:
this
.
debugService
.
getViewModel
().
getFocusedThreadId
();
return
this
.
debugService
.
continue
(
threadId
);
}
protected
isEnabled
(
state
:
debug
.
State
):
boolean
{
...
...
@@ -252,8 +264,11 @@ export class PauseAction extends AbstractDebugAction {
super
(
id
,
label
,
'
debug-action pause
'
,
debugService
,
keybindingService
);
}
public
run
():
TPromise
<
any
>
{
return
this
.
debugService
.
pause
(
this
.
debugService
.
getViewModel
().
getFocusedThreadId
());
public
run
(
thread
:
debug
.
IThread
):
TPromise
<
any
>
{
const
threadId
=
thread
&&
thread
instanceof
model
.
Thread
?
thread
.
threadId
:
this
.
debugService
.
getViewModel
().
getFocusedThreadId
();
return
this
.
debugService
.
pause
(
threadId
);
}
protected
isEnabled
(
state
:
debug
.
State
):
boolean
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录