Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
fc47f07c
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,发现更多精彩内容 >>
提交
fc47f07c
编写于
3月 19, 2019
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug actions: final polish
上级
0c203ce8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
52 deletion
+23
-52
src/vs/workbench/contrib/debug/browser/debugActions.ts
src/vs/workbench/contrib/debug/browser/debugActions.ts
+2
-48
src/vs/workbench/contrib/debug/browser/debugViewlet.ts
src/vs/workbench/contrib/debug/browser/debugViewlet.ts
+16
-2
src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts
...s/workbench/contrib/debug/browser/watchExpressionsView.ts
+5
-2
未找到文件。
src/vs/workbench/contrib/debug/browser/debugActions.ts
浏览文件 @
fc47f07c
...
...
@@ -8,12 +8,9 @@ import { Action } from 'vs/base/common/actions';
import
*
as
lifecycle
from
'
vs/base/common/lifecycle
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IWorkspaceContextService
,
WorkbenchState
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IDebugService
,
State
,
IEnablement
,
IBreakpoint
,
REPL_ID
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
Variable
,
Expression
,
Breakpoint
}
from
'
vs/workbench/contrib/debug/common/debugModel
'
;
import
{
IWorkbenchLayoutService
}
from
'
vs/workbench/services/layout/browser/layoutService
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
IDebugService
,
State
,
IEnablement
,
IBreakpoint
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
Variable
,
Breakpoint
}
from
'
vs/workbench/contrib/debug/common/debugModel
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
TogglePanelAction
}
from
'
vs/workbench/browser/panel
'
;
import
{
IQuickOpenService
}
from
'
vs/platform/quickOpen/common/quickOpen
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IHistoryService
}
from
'
vs/workbench/services/history/common/history
'
;
...
...
@@ -338,20 +335,6 @@ export class AddWatchExpressionAction extends AbstractDebugAction {
}
}
export
class
EditWatchExpressionAction
extends
AbstractDebugAction
{
static
readonly
ID
=
'
workbench.debug.viewlet.action.editWatchExpression
'
;
static
LABEL
=
nls
.
localize
(
'
editWatchExpression
'
,
"
Edit Expression
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
super
(
id
,
label
,
''
,
debugService
,
keybindingService
);
}
public
run
(
expression
:
Expression
):
Promise
<
any
>
{
this
.
debugService
.
getViewModel
().
setSelectedExpression
(
expression
);
return
Promise
.
resolve
();
}
}
export
class
RemoveAllWatchExpressionsAction
extends
AbstractDebugAction
{
static
readonly
ID
=
'
workbench.debug.viewlet.action.removeAllWatchExpressions
'
;
static
LABEL
=
nls
.
localize
(
'
removeAllWatchExpressions
'
,
"
Remove All Expressions
"
);
...
...
@@ -371,35 +354,6 @@ export class RemoveAllWatchExpressionsAction extends AbstractDebugAction {
}
}
export
class
ToggleReplAction
extends
TogglePanelAction
{
static
readonly
ID
=
'
workbench.debug.action.toggleRepl
'
;
static
LABEL
=
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
debugConsoleAction
'
},
'
Debug Console
'
);
private
toDispose
:
lifecycle
.
IDisposable
[];
constructor
(
id
:
string
,
label
:
string
,
@
IWorkbenchLayoutService
layoutService
:
IWorkbenchLayoutService
,
@
IPanelService
panelService
:
IPanelService
)
{
super
(
id
,
label
,
REPL_ID
,
panelService
,
layoutService
,
'
debug-action toggle-repl
'
);
this
.
toDispose
=
[];
this
.
registerListeners
();
}
private
registerListeners
():
void
{
this
.
toDispose
.
push
(
this
.
panelService
.
onDidPanelOpen
(({
panel
})
=>
{
if
(
panel
.
getId
()
===
REPL_ID
)
{
this
.
class
=
'
debug-action toggle-repl
'
;
this
.
tooltip
=
ToggleReplAction
.
LABEL
;
}
}));
}
public
dispose
():
void
{
super
.
dispose
();
this
.
toDispose
=
lifecycle
.
dispose
(
this
.
toDispose
);
}
}
export
class
FocusSessionAction
extends
AbstractDebugAction
{
static
readonly
ID
=
'
workbench.action.debug.focusProcess
'
;
static
LABEL
=
nls
.
localize
(
'
focusSession
'
,
"
Focus Session
"
);
...
...
src/vs/workbench/contrib/debug/browser/debugViewlet.ts
浏览文件 @
fc47f07c
...
...
@@ -9,8 +9,8 @@ import { IAction } from 'vs/base/common/actions';
import
*
as
DOM
from
'
vs/base/browser/dom
'
;
import
{
IActionItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
ViewContainerViewlet
}
from
'
vs/workbench/browser/parts/views/viewsViewlet
'
;
import
{
IDebugService
,
VIEWLET_ID
,
State
,
BREAKPOINTS_VIEW_ID
,
IDebugConfiguration
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
StartAction
,
ToggleReplAction
,
ConfigureAction
,
SelectAndStartAction
,
FocusSessionAction
}
from
'
vs/workbench/contrib/debug/browser/debugActions
'
;
import
{
IDebugService
,
VIEWLET_ID
,
State
,
BREAKPOINTS_VIEW_ID
,
IDebugConfiguration
,
REPL_ID
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
StartAction
,
ConfigureAction
,
SelectAndStartAction
,
FocusSessionAction
}
from
'
vs/workbench/contrib/debug/browser/debugActions
'
;
import
{
StartDebugActionItem
,
FocusSessionActionItem
}
from
'
vs/workbench/contrib/debug/browser/debugActionItems
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
...
...
@@ -31,6 +31,8 @@ import { IMenu, MenuId, IMenuService, MenuItemAction } from 'vs/platform/actions
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
MenuItemActionItem
}
from
'
vs/platform/actions/browser/menuItemActionItem
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
TogglePanelAction
}
from
'
vs/workbench/browser/panel
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
export
class
DebugViewlet
extends
ViewContainerViewlet
{
...
...
@@ -193,3 +195,15 @@ export class DebugViewlet extends ViewContainerViewlet {
}
}
}
class
ToggleReplAction
extends
TogglePanelAction
{
static
readonly
ID
=
'
debug.toggleRepl
'
;
static
LABEL
=
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
debugConsoleAction
'
},
'
Debug Console
'
);
constructor
(
id
:
string
,
label
:
string
,
@
IWorkbenchLayoutService
layoutService
:
IWorkbenchLayoutService
,
@
IPanelService
panelService
:
IPanelService
)
{
super
(
id
,
label
,
REPL_ID
,
panelService
,
layoutService
,
'
debug-action toggle-repl
'
);
}
}
src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts
浏览文件 @
fc47f07c
...
...
@@ -10,7 +10,7 @@ import { CollapseAction } from 'vs/workbench/browser/viewlet';
import
{
IViewletViewOptions
}
from
'
vs/workbench/browser/parts/views/viewsViewlet
'
;
import
{
IDebugService
,
IExpression
,
CONTEXT_WATCH_EXPRESSIONS_FOCUSED
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
Expression
,
Variable
}
from
'
vs/workbench/contrib/debug/common/debugModel
'
;
import
{
AddWatchExpressionAction
,
RemoveAllWatchExpressionsAction
,
EditWatchExpressionAction
,
CopyValueAction
}
from
'
vs/workbench/contrib/debug/browser/debugActions
'
;
import
{
AddWatchExpressionAction
,
RemoveAllWatchExpressionsAction
,
CopyValueAction
}
from
'
vs/workbench/contrib/debug/browser/debugActions
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
...
...
@@ -144,7 +144,10 @@ export class WatchExpressionsView extends ViewletPanel {
if
(
element
instanceof
Expression
)
{
const
expression
=
<
Expression
>
element
;
actions
.
push
(
new
AddWatchExpressionAction
(
AddWatchExpressionAction
.
ID
,
AddWatchExpressionAction
.
LABEL
,
this
.
debugService
,
this
.
keybindingService
));
actions
.
push
(
new
EditWatchExpressionAction
(
EditWatchExpressionAction
.
ID
,
EditWatchExpressionAction
.
LABEL
,
this
.
debugService
,
this
.
keybindingService
));
actions
.
push
(
new
Action
(
'
debug.editWatchExpression
'
,
nls
.
localize
(
'
editWatchExpression
'
,
"
Edit Expression
"
),
undefined
,
true
,
()
=>
{
this
.
debugService
.
getViewModel
().
setSelectedExpression
(
expression
);
return
Promise
.
resolve
();
}));
if
(
!
expression
.
hasChildren
)
{
actions
.
push
(
this
.
instantiationService
.
createInstance
(
CopyValueAction
,
CopyValueAction
.
ID
,
CopyValueAction
.
LABEL
,
expression
.
value
,
'
watch
'
,
this
.
debugService
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录