Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
5c250f3a
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,发现更多精彩内容 >>
提交
5c250f3a
编写于
11月 30, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debugHover: disable mouse support and fix focus
上级
e16c62b3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
19 deletion
+12
-19
src/vs/workbench/parts/debug/browser/media/debugHover.css
src/vs/workbench/parts/debug/browser/media/debugHover.css
+0
-2
src/vs/workbench/parts/debug/electron-browser/debugHover.ts
src/vs/workbench/parts/debug/electron-browser/debugHover.ts
+12
-17
未找到文件。
src/vs/workbench/parts/debug/browser/media/debugHover.css
浏览文件 @
5c250f3a
...
...
@@ -6,7 +6,6 @@
.monaco-editor
.debug-hover-widget
{
position
:
absolute
;
margin-top
:
-1px
;
cursor
:
default
;
z-index
:
50
;
animation-duration
:
0.15s
;
animation-name
:
fadeIn
;
...
...
@@ -32,7 +31,6 @@
.monaco-editor
.debug-hover-widget
.debug-hover-tree
{
line-height
:
18px
;
max-height
:
324px
;
}
.monaco-editor
.debug-hover-widget
.debug-hover-tree
.monaco-list-row
.monaco-tl-contents
{
...
...
src/vs/workbench/parts/debug/electron-browser/debugHover.ts
浏览文件 @
5c250f3a
...
...
@@ -48,7 +48,7 @@ export class DebugHoverWidget implements IContentWidget {
private
complexValueContainer
:
HTMLElement
;
private
complexValueTitle
:
HTMLElement
;
private
valueContainer
:
HTMLElement
;
private
stoleFocus
:
boolean
;
private
treeContainer
:
HTMLElement
;
private
toDispose
:
lifecycle
.
IDisposable
[];
private
scrollbar
:
DomScrollableElement
;
private
dataSource
:
DebugHoverDataSource
;
...
...
@@ -73,14 +73,15 @@ export class DebugHoverWidget implements IContentWidget {
this
.
domNode
=
$
(
'
.debug-hover-widget
'
);
this
.
complexValueContainer
=
dom
.
append
(
this
.
domNode
,
$
(
'
.complex-value
'
));
this
.
complexValueTitle
=
dom
.
append
(
this
.
complexValueContainer
,
$
(
'
.title
'
));
const
treeContainer
=
dom
.
append
(
this
.
complexValueContainer
,
$
(
'
.debug-hover-tree
'
));
treeContainer
.
setAttribute
(
'
role
'
,
'
tree
'
);
this
.
treeContainer
=
dom
.
append
(
this
.
complexValueContainer
,
$
(
'
.debug-hover-tree
'
));
t
his
.
t
reeContainer
.
setAttribute
(
'
role
'
,
'
tree
'
);
this
.
dataSource
=
new
DebugHoverDataSource
();
this
.
tree
=
new
WorkbenchAsyncDataTree
(
treeContainer
,
new
DebugHoverDelegate
(),
[
this
.
instantiationService
.
createInstance
(
VariablesRenderer
)],
this
.
tree
=
new
WorkbenchAsyncDataTree
(
t
his
.
t
reeContainer
,
new
DebugHoverDelegate
(),
[
this
.
instantiationService
.
createInstance
(
VariablesRenderer
)],
this
.
dataSource
,
{
ariaLabel
:
nls
.
localize
(
'
treeAriaLabel
'
,
"
Debug Hover
"
),
accessibilityProvider
:
new
DebugHoverAccessibilityProvider
(),
mouseSupport
:
false
},
this
.
contextKeyService
,
this
.
listService
,
this
.
themeService
,
this
.
configurationService
);
this
.
valueContainer
=
$
(
'
.value
'
);
...
...
@@ -104,14 +105,13 @@ export class DebugHoverWidget implements IContentWidget {
this
.
domNode
.
style
.
border
=
null
;
}
}));
this
.
toDispose
.
push
(
this
.
tree
.
onDidChangeContentHeight
(()
=>
this
.
layoutTreeAndContainer
()));
this
.
registerListeners
();
this
.
editor
.
addContentWidget
(
this
);
}
private
registerListeners
():
void
{
this
.
toDispose
.
push
(
this
.
tree
.
onMouseClick
(
event
=>
this
.
onMouseClick
(
event
.
element
)));
this
.
toDispose
.
push
(
dom
.
addStandardDisposableListener
(
this
.
domNode
,
'
keydown
'
,
(
e
:
IKeyboardEvent
)
=>
{
if
(
e
.
equals
(
KeyCode
.
Escape
))
{
this
.
hide
();
...
...
@@ -211,7 +211,6 @@ export class DebugHoverWidget implements IContentWidget {
this
.
showAtPosition
=
position
;
this
.
_isVisible
=
true
;
this
.
stoleFocus
=
focus
;
if
(
!
expression
.
hasChildren
||
forceValueHover
)
{
this
.
complexValueContainer
.
hidden
=
true
;
...
...
@@ -239,7 +238,7 @@ export class DebugHoverWidget implements IContentWidget {
return
this
.
tree
.
refresh
(
null
).
then
(()
=>
{
this
.
complexValueTitle
.
textContent
=
expression
.
value
;
this
.
complexValueTitle
.
title
=
expression
.
value
;
this
.
tree
.
layout
(
MAX_TREE_HEIGHT
);
this
.
layoutTreeAndContainer
(
);
this
.
editor
.
layoutContentWidget
(
this
);
this
.
scrollbar
.
scanDomNode
();
if
(
focus
)
{
...
...
@@ -249,12 +248,10 @@ export class DebugHoverWidget implements IContentWidget {
});
}
private
onMouseClick
(
element
:
IExpression
):
void
{
if
(
element
&&
element
.
hasChildren
)
{
this
.
tree
.
setFocus
([]);
this
.
tree
.
setSelection
([]);
this
.
editor
.
focus
();
}
private
layoutTreeAndContainer
():
void
{
const
treeHeight
=
Math
.
min
(
MAX_TREE_HEIGHT
,
this
.
tree
.
visibleNodeCount
*
18
);
this
.
treeContainer
.
style
.
height
=
`
${
treeHeight
}
px`
;
this
.
tree
.
layout
(
treeHeight
);
}
hide
():
void
{
...
...
@@ -266,9 +263,7 @@ export class DebugHoverWidget implements IContentWidget {
this
.
editor
.
deltaDecorations
(
this
.
highlightDecorations
,
[]);
this
.
highlightDecorations
=
[];
this
.
editor
.
layoutContentWidget
(
this
);
if
(
this
.
stoleFocus
)
{
this
.
editor
.
focus
();
}
this
.
editor
.
focus
();
}
getPosition
():
IContentWidgetPosition
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录