Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
616882b8
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,发现更多精彩内容 >>
提交
616882b8
编写于
4月 27, 2020
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CallStack: We need the MenuEntryActionViewItem so the icon would get rendere
fixes #95887
上级
99aae3f1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
26 addition
and
10 deletion
+26
-10
src/vs/workbench/contrib/debug/browser/callStackView.ts
src/vs/workbench/contrib/debug/browser/callStackView.ts
+23
-9
src/vs/workbench/contrib/debug/browser/media/debugViewlet.css
...vs/workbench/contrib/debug/browser/media/debugViewlet.css
+3
-1
未找到文件。
src/vs/workbench/contrib/debug/browser/callStackView.ts
浏览文件 @
616882b8
...
...
@@ -11,7 +11,7 @@ import { IDebugService, State, IStackFrame, IDebugSession, IThread, CONTEXT_CALL
import
{
Thread
,
StackFrame
,
ThreadAndSessionIds
}
from
'
vs/workbench/contrib/debug/common/debugModel
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
MenuId
,
IMenu
,
IMenuService
}
from
'
vs/platform/actions/common/actions
'
;
import
{
MenuId
,
IMenu
,
IMenuService
,
MenuItemAction
}
from
'
vs/platform/actions/common/actions
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
renderViewTree
}
from
'
vs/workbench/contrib/debug/browser/baseDebugView
'
;
import
{
IAction
,
Action
}
from
'
vs/base/common/actions
'
;
...
...
@@ -21,7 +21,7 @@ import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/c
import
{
ViewPane
}
from
'
vs/workbench/browser/parts/views/viewPaneContainer
'
;
import
{
ILabelService
}
from
'
vs/platform/label/common/label
'
;
import
{
IListAccessibilityProvider
}
from
'
vs/base/browser/ui/list/listWidget
'
;
import
{
createAndFillInContextMenuActions
,
createAndFillInActionBarActions
}
from
'
vs/platform/actions/browser/menuEntryActionViewItem
'
;
import
{
createAndFillInContextMenuActions
,
createAndFillInActionBarActions
,
MenuEntryActionViewItem
}
from
'
vs/platform/actions/browser/menuEntryActionViewItem
'
;
import
{
IListVirtualDelegate
}
from
'
vs/base/browser/ui/list/list
'
;
import
{
ITreeRenderer
,
ITreeNode
,
ITreeContextMenuEvent
,
IAsyncDataSource
}
from
'
vs/base/browser/ui/tree/tree
'
;
import
{
TreeResourceNavigator
,
WorkbenchAsyncDataTree
}
from
'
vs/platform/list/browser/listService
'
;
...
...
@@ -40,6 +40,7 @@ import { IThemeService } from 'vs/platform/theme/common/themeService';
import
{
IOpenerService
}
from
'
vs/platform/opener/common/opener
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
attachStylerCallback
}
from
'
vs/platform/theme/common/styler
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
const
$
=
dom
.
$
;
...
...
@@ -171,8 +172,9 @@ export class CallStackView extends ViewPane {
const
treeContainer
=
renderViewTree
(
container
);
this
.
dataSource
=
new
CallStackDataSource
(
this
.
debugService
);
const
sessionsRenderer
=
this
.
instantiationService
.
createInstance
(
SessionsRenderer
,
this
.
menu
);
this
.
tree
=
<
WorkbenchAsyncDataTree
<
CallStackItem
|
IDebugModel
,
CallStackItem
,
FuzzyScore
>>
this
.
instantiationService
.
createInstance
(
WorkbenchAsyncDataTree
,
'
CallStackView
'
,
treeContainer
,
new
CallStackDelegate
(),
[
new
SessionsRenderer
(
this
.
menu
,
this
.
instantiationService
,
this
.
debugService
)
,
sessionsRenderer
,
new
ThreadsRenderer
(
this
.
instantiationService
),
this
.
instantiationService
.
createInstance
(
StackFramesRenderer
),
new
ErrorsRenderer
(),
...
...
@@ -382,7 +384,7 @@ export class CallStackView extends ViewPane {
const
primary
:
IAction
[]
=
[];
const
secondary
:
IAction
[]
=
[];
const
result
=
{
primary
,
secondary
};
const
actionsDisposable
=
createAndFillInContextMenuActions
(
this
.
menu
,
{
arg
:
getContextForContributedActions
(
element
),
shouldForwardArgs
:
true
},
result
,
this
.
contextMenuService
,
g
=>
g
===
'
inline
'
);
const
actionsDisposable
=
createAndFillInContextMenuActions
(
this
.
menu
,
{
arg
:
getContextForContributedActions
(
element
),
shouldForwardArgs
:
true
},
result
,
this
.
contextMenuService
,
g
=>
/^inline/
.
test
(
g
)
);
this
.
contextMenuService
.
showContextMenu
({
getAnchor
:
()
=>
e
.
anchor
,
...
...
@@ -435,8 +437,11 @@ class SessionsRenderer implements ITreeRenderer<IDebugSession, FuzzyScore, ISess
constructor
(
private
menu
:
IMenu
,
private
readonly
instantiationService
:
IInstantiationService
,
private
readonly
debugService
:
IDebugService
@
IInstantiationService
private
readonly
instantiationService
:
IInstantiationService
,
@
IDebugService
private
readonly
debugService
:
IDebugService
,
@
IKeybindingService
private
readonly
keybindingService
:
IKeybindingService
,
@
INotificationService
private
readonly
notificationService
:
INotificationService
,
@
IContextMenuService
private
readonly
contextMenuService
:
IContextMenuService
)
{
}
get
templateId
():
string
{
...
...
@@ -450,7 +455,16 @@ class SessionsRenderer implements ITreeRenderer<IDebugSession, FuzzyScore, ISess
const
state
=
dom
.
append
(
session
,
$
(
'
.state
'
));
const
stateLabel
=
dom
.
append
(
state
,
$
(
'
span.label
'
));
const
label
=
new
HighlightedLabel
(
name
,
false
);
const
actionBar
=
new
ActionBar
(
session
);
const
actionBar
=
new
ActionBar
(
session
,
{
actionViewItemProvider
:
action
=>
{
if
(
action
instanceof
MenuItemAction
)
{
// We need the MenuEntryActionViewItem so the icon would get rendered
return
new
MenuEntryActionViewItem
(
action
,
this
.
keybindingService
,
this
.
notificationService
,
this
.
contextMenuService
);
}
return
undefined
;
}
});
return
{
session
,
name
,
state
,
stateLabel
,
label
,
actionBar
,
elementDisposable
:
[]
};
}
...
...
@@ -462,14 +476,14 @@ class SessionsRenderer implements ITreeRenderer<IDebugSession, FuzzyScore, ISess
const
thread
=
session
.
getAllThreads
().
filter
(
t
=>
t
.
stopped
).
pop
();
const
setActionBar
=
()
=>
{
data
.
actionBar
.
clear
();
const
actions
=
getActions
(
this
.
instantiationService
,
element
.
element
);
const
primary
:
IAction
[]
=
actions
;
const
secondary
:
IAction
[]
=
[];
const
result
=
{
primary
,
secondary
};
data
.
elementDisposable
.
push
(
createAndFillInActionBarActions
(
this
.
menu
,
{
arg
:
getContextForContributedActions
(
session
),
shouldForwardArgs
:
true
},
result
,
g
=>
g
===
'
inline
'
));
data
.
elementDisposable
.
push
(
createAndFillInActionBarActions
(
this
.
menu
,
{
arg
:
getContextForContributedActions
(
session
),
shouldForwardArgs
:
true
},
result
,
g
=>
/^inline/
.
test
(
g
)
));
data
.
actionBar
.
clear
();
data
.
actionBar
.
push
(
primary
,
{
icon
:
true
,
label
:
false
});
};
setActionBar
();
...
...
src/vs/workbench/contrib/debug/browser/media/debugViewlet.css
浏览文件 @
616882b8
...
...
@@ -159,7 +159,9 @@
height
:
100%
;
line-height
:
22px
;
margin-right
:
8px
;
vertical-align
:
text-top
;
background-size
:
16px
;
background-position
:
center
center
;
background-repeat
:
no-repeat
;
}
.debug-pane
.debug-call-stack
.thread
>
.state
>
.label
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录