Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
f5e70c33
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,发现更多精彩内容 >>
提交
f5e70c33
编写于
2月 16, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: rename function breakpoints
上级
1937d52a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
42 addition
and
11 deletion
+42
-11
src/vs/workbench/parts/debug/browser/debugViewer.ts
src/vs/workbench/parts/debug/browser/debugViewer.ts
+12
-6
src/vs/workbench/parts/debug/browser/debugViewlet.ts
src/vs/workbench/parts/debug/browser/debugViewlet.ts
+16
-4
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+4
-1
src/vs/workbench/parts/debug/common/debugViewModel.ts
src/vs/workbench/parts/debug/common/debugViewModel.ts
+10
-0
未找到文件。
src/vs/workbench/parts/debug/browser/debugViewer.ts
浏览文件 @
f5e70c33
...
...
@@ -660,7 +660,7 @@ export class WatchExpressionsController extends BaseDebugController {
}
}
/* protected */
public
onLeftClick
(
tree
:
tree
.
ITree
,
element
:
any
,
event
:
mouse
.
StandardMouseEvent
):
boolean
{
protected
onLeftClick
(
tree
:
tree
.
ITree
,
element
:
any
,
event
:
mouse
.
StandardMouseEvent
):
boolean
{
// double click on primitive value: open input box to be able to select and copy value.
if
(
element
instanceof
model
.
Expression
&&
event
.
detail
===
2
)
{
const
expression
=
<
debug
.
IExpression
>
element
;
...
...
@@ -879,7 +879,8 @@ export class BreakpointsRenderer implements tree.IRenderer {
}
private
renderFunctionBreakpoint
(
tree
:
tree
.
ITree
,
functionBreakpoint
:
debug
.
IFunctionBreakpoint
,
data
:
IFunctionBreakpointTemplateData
):
void
{
if
(
!
functionBreakpoint
.
name
)
{
const
selected
=
this
.
debugService
.
getViewModel
().
getSelectedFunctionBreakpoint
();
if
(
!
functionBreakpoint
.
name
||
(
selected
&&
selected
.
getId
()
===
functionBreakpoint
.
getId
()))
{
renderRenameBox
(
this
.
debugService
,
this
.
contextViewService
,
tree
,
functionBreakpoint
,
data
.
breakpoint
,
nls
.
localize
(
'
functionBreakpointPlaceholder
'
,
"
Function to break on
"
),
nls
.
localize
(
'
functionBreakPointInputAriaLabel
'
,
"
Type function breakpoint
"
));
}
else
{
this
.
debugService
.
getModel
().
areBreakpointsActivated
()
?
tree
.
removeTraits
(
'
disabled
'
,
[
functionBreakpoint
])
:
tree
.
addTraits
(
'
disabled
'
,
[
functionBreakpoint
]);
...
...
@@ -932,19 +933,24 @@ export class BreakpointsAccessibilityProvider implements tree.IAccessibilityProv
export
class
BreakpointsController
extends
BaseDebugController
{
/* protected */
public
onLeftClick
(
tree
:
tree
.
ITree
,
element
:
any
,
eventish
:
treedefaults
.
ICancelableEvent
,
origin
:
string
=
'
mouse
'
):
boolean
{
protected
onLeftClick
(
tree
:
tree
.
ITree
,
element
:
any
,
event
:
mouse
.
StandardMouseEvent
):
boolean
{
if
(
element
instanceof
model
.
ExceptionBreakpoint
)
{
return
false
;
}
return
super
.
onLeftClick
(
tree
,
element
,
eventish
,
origin
);
if
(
element
instanceof
model
.
FunctionBreakpoint
&&
event
.
detail
===
2
)
{
this
.
debugService
.
getViewModel
().
setSelectedFunctionBreakpoint
(
element
);
return
true
;
}
return
super
.
onLeftClick
(
tree
,
element
,
event
);
}
/* protected */
public
onUp
(
tree
:
tree
.
ITree
,
event
:
keyboard
.
StandardKeyboardEvent
):
boolean
{
protected
onUp
(
tree
:
tree
.
ITree
,
event
:
keyboard
.
StandardKeyboardEvent
):
boolean
{
return
this
.
doNotFocusExceptionBreakpoint
(
tree
,
super
.
onUp
(
tree
,
event
));
}
/* protected */
public
onPageUp
(
tree
:
tree
.
ITree
,
event
:
keyboard
.
StandardKeyboardEvent
):
boolean
{
protected
onPageUp
(
tree
:
tree
.
ITree
,
event
:
keyboard
.
StandardKeyboardEvent
):
boolean
{
return
this
.
doNotFocusExceptionBreakpoint
(
tree
,
super
.
onPageUp
(
tree
,
event
));
}
...
...
src/vs/workbench/parts/debug/browser/debugViewlet.ts
浏览文件 @
f5e70c33
...
...
@@ -165,12 +165,9 @@ class WatchExpressionsView extends viewlet.CollapsibleViewletView {
this
.
tree
.
refresh
(
expression
,
false
).
then
(()
=>
{
this
.
tree
.
setHighlight
(
expression
);
const
unbind
=
this
.
tree
.
addListener
(
events
.
EventType
.
HIGHLIGHT
,
(
e
:
tree
.
IHighlightEvent
)
=>
{
this
.
tree
.
addOneTimeListener
(
events
.
EventType
.
HIGHLIGHT
,
(
e
:
tree
.
IHighlightEvent
)
=>
{
if
(
!
e
.
highlight
)
{
this
.
debugService
.
getViewModel
().
setSelectedExpression
(
null
);
this
.
tree
.
refresh
(
expression
).
done
(
null
,
errors
.
onUnexpectedError
);
unbind
();
}
});
}).
done
(
null
,
errors
.
onUnexpectedError
);
...
...
@@ -374,6 +371,21 @@ class BreakpointsView extends viewlet.AdaptiveCollapsibleViewletView {
this
.
debugService
.
openOrRevealEditor
(
breakpoint
.
source
,
breakpoint
.
lineNumber
,
preserveFocus
,
sideBySide
).
done
(
null
,
errors
.
onUnexpectedError
);
}
}));
this
.
toDispose
.
push
(
this
.
debugService
.
getViewModel
().
addListener2
(
debug
.
ViewModelEvents
.
SELECTED_FUNCTION_BREAKPOINT_UPDATED
,
(
fbp
:
debug
.
IFunctionBreakpoint
)
=>
{
if
(
!
fbp
||
!
(
fbp
instanceof
model
.
FunctionBreakpoint
))
{
return
;
}
this
.
tree
.
refresh
(
fbp
,
false
).
then
(()
=>
{
this
.
tree
.
setHighlight
(
fbp
);
this
.
tree
.
addOneTimeListener
(
events
.
EventType
.
HIGHLIGHT
,
(
e
:
tree
.
IHighlightEvent
)
=>
{
if
(
!
e
.
highlight
)
{
this
.
debugService
.
getViewModel
().
setSelectedFunctionBreakpoint
(
null
);
}
});
}).
done
(
null
,
errors
.
onUnexpectedError
);
}));
}
public
getActions
():
actions
.
IAction
[]
{
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
f5e70c33
...
...
@@ -106,7 +106,8 @@ export var ModelEvents = {
export
var
ViewModelEvents
=
{
FOCUSED_STACK_FRAME_UPDATED
:
'
FocusedStackFrameUpdated
'
,
SELECTED_EXPRESSION_UPDATED
:
'
SelectedExpressionUpdated
'
SELECTED_EXPRESSION_UPDATED
:
'
SelectedExpressionUpdated
'
,
SELECTED_FUNCTION_BREAKPOINT_UPDATED
:
'
SelectedFunctionBreakpointUpdated
'
};
export
var
ServiceEvents
=
{
...
...
@@ -132,6 +133,8 @@ export interface IViewModel extends ee.EventEmitter {
getSelectedExpression
():
IExpression
;
getFocusedThreadId
():
number
;
setSelectedExpression
(
expression
:
IExpression
);
getSelectedFunctionBreakpoint
():
IFunctionBreakpoint
;
setSelectedFunctionBreakpoint
(
functionBreakpoint
:
IFunctionBreakpoint
):
void
;
}
export
interface
IModel
extends
ee
.
IEventEmitter
,
ITreeElement
{
...
...
src/vs/workbench/parts/debug/common/debugViewModel.ts
浏览文件 @
f5e70c33
...
...
@@ -9,6 +9,7 @@ export class ViewModel extends ee.EventEmitter implements debug.IViewModel, debu
private
focusedStackFrame
:
debug
.
IStackFrame
;
private
selectedExpression
:
debug
.
IExpression
;
private
selectedFunctionBreakpoint
:
debug
.
IFunctionBreakpoint
;
public
getId
():
string
{
return
'
root
'
;
...
...
@@ -35,4 +36,13 @@ export class ViewModel extends ee.EventEmitter implements debug.IViewModel, debu
this
.
selectedExpression
=
expression
;
this
.
emit
(
debug
.
ViewModelEvents
.
SELECTED_EXPRESSION_UPDATED
,
expression
);
}
public
getSelectedFunctionBreakpoint
():
debug
.
IFunctionBreakpoint
{
return
this
.
selectedFunctionBreakpoint
;
}
public
setSelectedFunctionBreakpoint
(
functionBreakpoint
:
debug
.
IFunctionBreakpoint
):
void
{
this
.
selectedFunctionBreakpoint
=
functionBreakpoint
;
this
.
emit
(
debug
.
ViewModelEvents
.
SELECTED_FUNCTION_BREAKPOINT_UPDATED
,
functionBreakpoint
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录