Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
befd0680
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
befd0680
编写于
11月 04, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: process dropdown in actions widget
上级
c4193ca5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
60 addition
and
6 deletion
+60
-6
src/vs/workbench/parts/debug/browser/debugActionItems.ts
src/vs/workbench/parts/debug/browser/debugActionItems.ts
+16
-1
src/vs/workbench/parts/debug/browser/debugActions.ts
src/vs/workbench/parts/debug/browser/debugActions.ts
+14
-0
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
+19
-2
src/vs/workbench/parts/debug/browser/debugViewlet.ts
src/vs/workbench/parts/debug/browser/debugViewlet.ts
+1
-1
src/vs/workbench/parts/debug/browser/media/debug.contribution.css
...orkbench/parts/debug/browser/media/debug.contribution.css
+9
-1
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+1
-1
未找到文件。
src/vs/workbench/parts/debug/browser/debugActionItems.ts
浏览文件 @
befd0680
...
...
@@ -10,7 +10,7 @@ import { SelectActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IDebugService
,
IGlobalConfig
}
from
'
vs/workbench/parts/debug/common/debug
'
;
export
class
DebugSelect
ActionItem
extends
SelectActionItem
{
export
class
SelectConfiguration
ActionItem
extends
SelectActionItem
{
constructor
(
action
:
IAction
,
...
...
@@ -47,3 +47,18 @@ export class DebugSelectActionItem extends SelectActionItem {
}
}
}
export
class
FocusProcessActionItem
extends
SelectActionItem
{
constructor
(
action
:
IAction
,
@
IDebugService
private
debugService
:
IDebugService
)
{
super
(
null
,
action
,
[],
-
1
);
this
.
debugService
.
getModel
().
onDidChangeCallStack
(()
=>
{
const
names
=
this
.
debugService
.
getModel
().
getProcesses
().
map
(
p
=>
p
.
name
);
const
focusedProcess
=
this
.
debugService
.
getViewModel
().
focusedProcess
;
this
.
setOptions
(
names
,
focusedProcess
?
names
.
indexOf
(
focusedProcess
.
name
)
:
0
);
});
}
}
src/vs/workbench/parts/debug/browser/debugActions.ts
浏览文件 @
befd0680
...
...
@@ -909,3 +909,17 @@ export class RunAction extends AbstractDebugAction {
return
super
.
isEnabled
(
state
)
&&
state
===
debug
.
State
.
Inactive
;
}
}
export
class
FocusProcessAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.focusProcess
'
;
static
LABEL
=
nls
.
localize
(
'
focusProcess
'
,
"
Focus Process
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
super
(
id
,
label
,
null
,
debugService
,
keybindingService
,
100
);
}
public
run
(
processName
:
string
):
TPromise
<
any
>
{
const
process
=
this
.
debugService
.
getModel
().
getProcesses
().
filter
(
p
=>
p
.
name
===
processName
).
pop
();
return
this
.
debugService
.
setFocusedStackFrameAndEvaluate
(
null
,
process
);
}
}
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
浏览文件 @
befd0680
...
...
@@ -16,7 +16,8 @@ import { ActionBar, ActionsOrientation } from 'vs/base/browser/ui/actionbar/acti
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
*
as
debug
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
AbstractDebugAction
,
PauseAction
,
ContinueAction
,
StepBackAction
,
StopAction
,
DisconnectAction
,
StepOverAction
,
StepIntoAction
,
StepOutAction
,
RestartAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
import
{
AbstractDebugAction
,
PauseAction
,
ContinueAction
,
StepBackAction
,
StopAction
,
DisconnectAction
,
StepOverAction
,
StepIntoAction
,
StepOutAction
,
RestartAction
,
FocusProcessAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
import
{
FocusProcessActionItem
}
from
'
vs/workbench/parts/debug/browser/debugActionItems
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
...
...
@@ -37,6 +38,7 @@ export class DebugActionsWidget implements IWorkbenchContribution {
private
actions
:
AbstractDebugAction
[];
private
isVisible
:
boolean
;
private
isBuilt
:
boolean
;
private
focusProcessActionItem
:
FocusProcessActionItem
;
constructor
(
@
IMessageService
private
messageService
:
IMessageService
,
...
...
@@ -55,7 +57,14 @@ export class DebugActionsWidget implements IWorkbenchContribution {
this
.
toDispose
=
[];
this
.
actionBar
=
new
ActionBar
(
actionBarContainter
,
{
orientation
:
ActionsOrientation
.
HORIZONTAL
orientation
:
ActionsOrientation
.
HORIZONTAL
,
actionItemProvider
:
(
action
:
IAction
)
=>
{
if
(
action
.
id
===
FocusProcessAction
.
ID
)
{
return
this
.
focusProcessActionItem
;
}
return
null
;
}
});
this
.
toDispose
.
push
(
this
.
actionBar
);
...
...
@@ -169,6 +178,11 @@ export class DebugActionsWidget implements IWorkbenchContribution {
this
.
actions
.
push
(
this
.
instantiationService
.
createInstance
(
StepOutAction
,
StepOutAction
.
ID
,
StepOutAction
.
LABEL
));
this
.
actions
.
push
(
this
.
instantiationService
.
createInstance
(
RestartAction
,
RestartAction
.
ID
,
RestartAction
.
LABEL
));
this
.
actions
.
push
(
this
.
instantiationService
.
createInstance
(
StepBackAction
,
StepBackAction
.
ID
,
StepBackAction
.
LABEL
));
const
focusProcesAction
=
this
.
instantiationService
.
createInstance
(
FocusProcessAction
,
FocusProcessAction
.
ID
,
FocusProcessAction
.
LABEL
);
this
.
actions
.
push
(
focusProcesAction
);
this
.
focusProcessActionItem
=
this
.
instantiationService
.
createInstance
(
FocusProcessActionItem
,
focusProcesAction
);
this
.
toDispose
.
push
(
this
.
focusProcessActionItem
);
this
.
actions
.
forEach
(
a
=>
{
this
.
toDispose
.
push
(
a
);
});
...
...
@@ -194,6 +208,9 @@ export class DebugActionsWidget implements IWorkbenchContribution {
if
(
a
.
id
===
StopAction
.
ID
)
{
return
!
attached
;
}
if
(
a
.
id
===
FocusProcessAction
.
ID
)
{
return
this
.
debugService
.
getModel
().
getProcesses
().
length
>
1
;
}
return
true
;
}).
sort
((
first
,
second
)
=>
first
.
weight
-
second
.
weight
);
...
...
src/vs/workbench/parts/debug/browser/debugViewlet.ts
浏览文件 @
befd0680
...
...
@@ -140,7 +140,7 @@ export class DebugViewlet extends Viewlet {
public
getActionItem
(
action
:
actions
.
IAction
):
actionbar
.
IActionItem
{
if
(
action
.
id
===
debugactions
.
SelectConfigAction
.
ID
)
{
return
this
.
instantiationService
.
createInstance
(
dbgactionitems
.
DebugSelect
ActionItem
,
action
);
return
this
.
instantiationService
.
createInstance
(
dbgactionitems
.
SelectConfiguration
ActionItem
,
action
);
}
return
null
;
...
...
src/vs/workbench/parts/debug/browser/media/debug.contribution.css
浏览文件 @
befd0680
...
...
@@ -133,13 +133,21 @@
position
:
absolute
;
z-index
:
200
;
height
:
32px
;
padding-top
:
3px
;
left
:
50%
;
margin-left
:
-96px
;
display
:
flex
;
padding-left
:
7px
;
}
.monaco-workbench
.debug-actions-widget
.monaco-action-bar
.action-item.select-container
{
margin-right
:
7px
;
}
.monaco-workbench
.debug-actions-widget
.monaco-action-bar
.action-item
.select-box
{
background-color
:
initial
;
margin-top
:
6px
;
}
.monaco-workbench
.debug-actions-widget
.drag-area
{
cursor
:
-webkit-grab
;
height
:
32px
;
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
befd0680
...
...
@@ -371,7 +371,7 @@ export interface IDebugService {
/**
* Sets the focused stack frame and evaluates all expresions against the newly focused stack frame,
*/
setFocusedStackFrameAndEvaluate
(
focusedStackFrame
:
IStackFrame
):
TPromise
<
void
>
;
setFocusedStackFrameAndEvaluate
(
focusedStackFrame
:
IStackFrame
,
process
?:
IProcess
):
TPromise
<
void
>
;
/**
* Adds new breakpoints to the model for the file specified with the uri. Notifies debug adapter of breakpoint changes.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录