Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
f28c78ff
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f28c78ff
编写于
7月 07, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: move DebugViewRegistry to its own file
fixes #8803
上级
6ba2be5e
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
45 addition
and
37 deletion
+45
-37
src/vs/workbench/parts/debug/browser/debugViewRegistry.ts
src/vs/workbench/parts/debug/browser/debugViewRegistry.ts
+38
-0
src/vs/workbench/parts/debug/browser/debugViewlet.ts
src/vs/workbench/parts/debug/browser/debugViewlet.ts
+2
-1
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+0
-32
src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
...kbench/parts/debug/electron-browser/debug.contribution.ts
+5
-4
未找到文件。
src/vs/workbench/parts/debug/browser/debugViewRegistry.ts
0 → 100644
浏览文件 @
f28c78ff
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
IActionRunner
}
from
'
vs/base/common/actions
'
;
import
{
IViewletView
}
from
'
vs/workbench/browser/viewlet
'
;
import
{
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
// Debug view registration
export
interface
IDebugViewConstructorSignature
{
new
(
actionRunner
:
IActionRunner
,
viewletSetings
:
any
,
...
services
:
{
serviceId
:
ServiceIdentifier
<
any
>
;
}[]):
IViewletView
;
}
export
interface
IDebugViewRegistry
{
registerDebugView
(
view
:
IDebugViewConstructorSignature
,
order
:
number
):
void
;
getDebugViews
():
IDebugViewConstructorSignature
[];
}
class
DebugViewRegistryImpl
implements
IDebugViewRegistry
{
private
debugViews
:
{
view
:
IDebugViewConstructorSignature
,
order
:
number
}[];
constructor
()
{
this
.
debugViews
=
[];
}
public
registerDebugView
(
view
:
IDebugViewConstructorSignature
,
order
:
number
):
void
{
this
.
debugViews
.
push
({
view
,
order
});
}
public
getDebugViews
():
IDebugViewConstructorSignature
[]
{
return
this
.
debugViews
.
sort
((
first
,
second
)
=>
first
.
order
-
second
.
order
)
.
map
(
viewWithOrder
=>
viewWithOrder
.
view
);
}
}
export
var
DebugViewRegistry
=
<
IDebugViewRegistry
>
new
DebugViewRegistryImpl
();
src/vs/workbench/parts/debug/browser/debugViewlet.ts
浏览文件 @
f28c78ff
...
...
@@ -14,6 +14,7 @@ import { SplitView } from 'vs/base/browser/ui/splitview/splitview';
import
memento
=
require
(
'
vs/workbench/common/memento
'
);
import
{
IViewletView
,
Viewlet
}
from
'
vs/workbench/browser/viewlet
'
;
import
debug
=
require
(
'
vs/workbench/parts/debug/common/debug
'
);
import
{
DebugViewRegistry
}
from
'
vs/workbench/parts/debug/browser/debugViewRegistry
'
;
import
debugactions
=
require
(
'
vs/workbench/parts/debug/electron-browser/debugActions
'
);
import
dbgactionitems
=
require
(
'
vs/workbench/parts/debug/browser/debugActionItems
'
);
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -65,7 +66,7 @@ export class DebugViewlet extends Viewlet {
if
(
this
.
contextService
.
getWorkspace
())
{
const
actionRunner
=
this
.
getActionRunner
();
this
.
views
=
debug
.
DebugViewRegistry
.
getDebugViews
().
map
(
viewConstructor
=>
this
.
instantiationService
.
createInstance
(
this
.
views
=
DebugViewRegistry
.
getDebugViews
().
map
(
viewConstructor
=>
this
.
instantiationService
.
createInstance
(
viewConstructor
,
actionRunner
,
this
.
viewletSettings
)
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
f28c78ff
...
...
@@ -5,10 +5,8 @@
import
uri
from
'
vs/base/common/uri
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IActionRunner
}
from
'
vs/base/common/actions
'
;
import
Event
from
'
vs/base/common/event
'
;
import
severity
from
'
vs/base/common/severity
'
;
import
{
IViewletView
}
from
'
vs/workbench/browser/viewlet
'
;
import
{
createDecorator
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
editor
=
require
(
'
vs/editor/common/editorCommon
'
);
import
{
Source
}
from
'
vs/workbench/parts/debug/common/debugSource
'
;
...
...
@@ -415,36 +413,6 @@ export interface IDebugEditorContribution extends editor.IEditorContribution {
showHover
(
range
:
Range
,
hoveringOver
:
string
,
focus
:
boolean
):
TPromise
<
void
>
;
}
// Debug view registration
export
interface
IDebugViewConstructorSignature
{
new
(
actionRunner
:
IActionRunner
,
viewletSetings
:
any
,
...
services
:
{
serviceId
:
ServiceIdentifier
<
any
>
;
}[]):
IViewletView
;
}
export
interface
IDebugViewRegistry
{
registerDebugView
(
view
:
IDebugViewConstructorSignature
,
order
:
number
):
void
;
getDebugViews
():
IDebugViewConstructorSignature
[];
}
class
DebugViewRegistryImpl
implements
IDebugViewRegistry
{
private
debugViews
:
{
view
:
IDebugViewConstructorSignature
,
order
:
number
}[];
constructor
()
{
this
.
debugViews
=
[];
}
public
registerDebugView
(
view
:
IDebugViewConstructorSignature
,
order
:
number
):
void
{
this
.
debugViews
.
push
({
view
,
order
});
}
public
getDebugViews
():
IDebugViewConstructorSignature
[]
{
return
this
.
debugViews
.
sort
((
first
,
second
)
=>
first
.
order
-
second
.
order
)
.
map
(
viewWithOrder
=>
viewWithOrder
.
view
);
}
}
export
var
DebugViewRegistry
=
<
IDebugViewRegistry
>
new
DebugViewRegistryImpl
();
// utils
const
_formatPIIRegexp
=
/{
([^
}
]
+
)
}/g
;
...
...
src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
浏览文件 @
f28c78ff
...
...
@@ -20,6 +20,7 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation
import
wbaregistry
=
require
(
'
vs/workbench/common/actionRegistry
'
);
import
viewlet
=
require
(
'
vs/workbench/browser/viewlet
'
);
import
panel
=
require
(
'
vs/workbench/browser/panel
'
);
import
{
DebugViewRegistry
}
from
'
vs/workbench/parts/debug/browser/debugViewRegistry
'
;
import
{
VariablesView
,
WatchExpressionsView
,
CallStackView
,
BreakpointsView
}
from
'
vs/workbench/parts/debug/browser/debugViews
'
;
import
wbext
=
require
(
'
vs/workbench/common/contributions
'
);
import
*
as
debug
from
'
vs/workbench/parts/debug/common/debug
'
;
...
...
@@ -87,10 +88,10 @@ const openViewletKb: IKeybindings = {
(
<
panel
.
PanelRegistry
>
platform
.
Registry
.
as
(
panel
.
Extensions
.
Panels
)).
setDefaultPanelId
(
debug
.
REPL_ID
);
// Register default debug views
debug
.
DebugViewRegistry
.
registerDebugView
(
VariablesView
,
10
);
debug
.
DebugViewRegistry
.
registerDebugView
(
WatchExpressionsView
,
20
);
debug
.
DebugViewRegistry
.
registerDebugView
(
CallStackView
,
30
);
debug
.
DebugViewRegistry
.
registerDebugView
(
BreakpointsView
,
40
);
DebugViewRegistry
.
registerDebugView
(
VariablesView
,
10
);
DebugViewRegistry
.
registerDebugView
(
WatchExpressionsView
,
20
);
DebugViewRegistry
.
registerDebugView
(
CallStackView
,
30
);
DebugViewRegistry
.
registerDebugView
(
BreakpointsView
,
40
);
// register action to open viewlet
const
registry
=
(
<
wbaregistry
.
IWorkbenchActionRegistry
>
platform
.
Registry
.
as
(
wbaregistry
.
Extensions
.
WorkbenchActions
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录