Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ae218e1f
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,发现更多精彩内容 >>
提交
ae218e1f
编写于
11月 30, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debugViewlet - destructure imports
上级
9b0f6931
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
28 deletion
+25
-28
src/vs/workbench/parts/debug/browser/debugViewlet.ts
src/vs/workbench/parts/debug/browser/debugViewlet.ts
+25
-28
未找到文件。
src/vs/workbench/parts/debug/browser/debugViewlet.ts
浏览文件 @
ae218e1f
...
...
@@ -4,36 +4,33 @@
*--------------------------------------------------------------------------------------------*/
import
'
vs/css!./media/debugViewlet
'
;
import
nls
=
require
(
'
vs/nls
'
)
;
import
builder
=
require
(
'
vs/base/browser/builder
'
)
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
$
,
Builder
,
Dimension
}
from
'
vs/base/browser/builder
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
lifecycle
=
require
(
'
vs/base/common/lifecycle
'
)
;
import
actions
=
require
(
'
vs/base/common/actions
'
)
;
import
actionbar
=
require
(
'
vs/base/browser/ui/actionbar/actionbar
'
)
;
import
*
as
lifecycle
from
'
vs/base/common/lifecycle
'
;
import
{
IAction
}
from
'
vs/base/common/actions
'
;
import
{
IActionItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
SplitView
}
from
'
vs/base/browser/ui/splitview/splitview
'
;
import
memento
=
require
(
'
vs/workbench/common/memento
'
)
;
import
{
Scope
}
from
'
vs/workbench/common/memento
'
;
import
{
IViewletView
,
Viewlet
}
from
'
vs/workbench/browser/viewlet
'
;
import
debug
=
require
(
'
vs/workbench/parts/debug/common/debug
'
)
;
import
{
IDebugService
,
VIEWLET_ID
,
State
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
DebugViewRegistry
}
from
'
vs/workbench/parts/debug/browser/debugViewRegistry
'
;
import
debugactions
=
require
(
'
vs/workbench/parts/debug/browser/debugActions
'
)
;
import
dbgactionitems
=
require
(
'
vs/workbench/parts/debug/browser/debugActionItems
'
)
;
import
{
StartAction
,
ToggleReplAction
,
ConfigureAction
,
SelectConfigAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
import
{
SelectConfigurationActionItem
}
from
'
vs/workbench/parts/debug/browser/debugActionItems
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IProgressService
,
IProgressRunner
}
from
'
vs/platform/progress/common/progress
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IStorageService
}
from
'
vs/platform/storage/common/storage
'
;
import
IDebugService
=
debug
.
IDebugService
;
const
$
=
builder
.
$
;
export
class
DebugViewlet
extends
Viewlet
{
private
toDispose
:
lifecycle
.
IDisposable
[];
private
actions
:
actions
.
IAction
[];
private
actions
:
IAction
[];
private
progressRunner
:
IProgressRunner
;
private
viewletSettings
:
any
;
private
$el
:
builder
.
Builder
;
private
$el
:
Builder
;
private
splitView
:
SplitView
;
private
views
:
IViewletView
[];
...
...
@@ -47,10 +44,10 @@ export class DebugViewlet extends Viewlet {
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
IStorageService
storageService
:
IStorageService
)
{
super
(
debug
.
VIEWLET_ID
,
telemetryService
);
super
(
VIEWLET_ID
,
telemetryService
);
this
.
progressRunner
=
null
;
this
.
viewletSettings
=
this
.
getMemento
(
storageService
,
memento
.
Scope
.
WORKSPACE
);
this
.
viewletSettings
=
this
.
getMemento
(
storageService
,
Scope
.
WORKSPACE
);
this
.
toDispose
=
[];
this
.
views
=
[];
this
.
toDispose
.
push
(
this
.
debugService
.
onDidChangeState
(()
=>
{
...
...
@@ -60,7 +57,7 @@ export class DebugViewlet extends Viewlet {
// viewlet
public
create
(
parent
:
builder
.
Builder
):
TPromise
<
void
>
{
public
create
(
parent
:
Builder
):
TPromise
<
void
>
{
super
.
create
(
parent
);
this
.
$el
=
parent
.
div
().
addClass
(
'
debug-viewlet
'
);
...
...
@@ -98,7 +95,7 @@ export class DebugViewlet extends Viewlet {
});
}
public
layout
(
dimension
:
builder
.
Dimension
):
void
{
public
layout
(
dimension
:
Dimension
):
void
{
if
(
this
.
splitView
)
{
this
.
splitView
.
layout
(
dimension
.
height
);
}
...
...
@@ -117,17 +114,17 @@ export class DebugViewlet extends Viewlet {
}
}
public
getActions
():
actions
.
IAction
[]
{
if
(
this
.
debugService
.
state
===
debug
.
State
.
Disabled
)
{
public
getActions
():
IAction
[]
{
if
(
this
.
debugService
.
state
===
State
.
Disabled
)
{
return
[];
}
if
(
!
this
.
actions
)
{
this
.
actions
=
[
this
.
instantiationService
.
createInstance
(
debugactions
.
StartAction
,
debugactions
.
StartAction
.
ID
,
debugactions
.
StartAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
debugactions
.
SelectConfigAction
,
debugactions
.
SelectConfigAction
.
ID
,
debugactions
.
SelectConfigAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
debugactions
.
ConfigureAction
,
debugactions
.
ConfigureAction
.
ID
,
debugactions
.
ConfigureAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
debugactions
.
ToggleReplAction
,
debugactions
.
ToggleReplAction
.
ID
,
debugactions
.
ToggleReplAction
.
LABEL
)
this
.
instantiationService
.
createInstance
(
StartAction
,
StartAction
.
ID
,
StartAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
SelectConfigAction
,
SelectConfigAction
.
ID
,
SelectConfigAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
ConfigureAction
,
ConfigureAction
.
ID
,
ConfigureAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
ToggleReplAction
,
ToggleReplAction
.
ID
,
ToggleReplAction
.
LABEL
)
];
this
.
actions
.
forEach
(
a
=>
{
...
...
@@ -138,9 +135,9 @@ export class DebugViewlet extends Viewlet {
return
this
.
actions
;
}
public
getActionItem
(
action
:
actions
.
IAction
):
actionbar
.
IActionItem
{
if
(
action
.
id
===
debugactions
.
SelectConfigAction
.
ID
)
{
return
this
.
instantiationService
.
createInstance
(
dbgactionitems
.
SelectConfigurationActionItem
,
action
);
public
getActionItem
(
action
:
IAction
):
IActionItem
{
if
(
action
.
id
===
SelectConfigAction
.
ID
)
{
return
this
.
instantiationService
.
createInstance
(
SelectConfigurationActionItem
,
action
);
}
return
null
;
...
...
@@ -151,7 +148,7 @@ export class DebugViewlet extends Viewlet {
this
.
progressRunner
.
done
();
}
if
(
this
.
debugService
.
state
===
debug
.
State
.
Initializing
)
{
if
(
this
.
debugService
.
state
===
State
.
Initializing
)
{
this
.
progressRunner
=
this
.
progressService
.
show
(
true
);
}
else
{
this
.
progressRunner
=
null
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录