Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
7e5a8b96
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,发现更多精彩内容 >>
提交
7e5a8b96
编写于
4月 19, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: move editBreakpoint from debugService to breakpointWidget
上级
f7b53ac8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
37 addition
and
24 deletion
+37
-24
src/vs/workbench/parts/debug/browser/breakpointWidget.ts
src/vs/workbench/parts/debug/browser/breakpointWidget.ts
+10
-0
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+0
-2
src/vs/workbench/parts/debug/electron-browser/debugActions.ts
...vs/workbench/parts/debug/electron-browser/debugActions.ts
+27
-6
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+0
-12
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
+0
-4
未找到文件。
src/vs/workbench/parts/debug/browser/breakpointWidget.ts
浏览文件 @
7e5a8b96
...
...
@@ -16,6 +16,7 @@ import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions';
import
editorcommon
=
require
(
'
vs/editor/common/editorCommon
'
);
import
editorbrowser
=
require
(
'
vs/editor/browser/editorBrowser
'
);
import
{
ZoneWidget
}
from
'
vs/editor/contrib/zoneWidget/browser/zoneWidget
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IContextViewService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IKeybindingService
,
IKeybindingContextKey
}
from
'
vs/platform/keybinding/common/keybindingService
'
;
import
debug
=
require
(
'
vs/workbench/parts/debug/common/debug
'
);
...
...
@@ -48,6 +49,15 @@ export class BreakpointWidget extends ZoneWidget {
this
.
toDispose
.
push
(
editor
.
addListener2
(
editorcommon
.
EventType
.
ModelChanged
,
()
=>
this
.
dispose
()));
}
public
static
createInstance
(
editor
:
editorbrowser
.
ICodeEditor
,
lineNumber
:
number
,
instantiationService
:
IInstantiationService
):
void
{
if
(
BreakpointWidget
.
INSTANCE
)
{
BreakpointWidget
.
INSTANCE
.
dispose
();
}
instantiationService
.
createInstance
(
BreakpointWidget
,
editor
,
lineNumber
);
BreakpointWidget
.
INSTANCE
.
show
({
lineNumber
,
column
:
1
},
2
);
}
public
fillContainer
(
container
:
HTMLElement
):
void
{
dom
.
addClass
(
container
,
'
breakpoint-widget
'
);
const
uri
=
this
.
editor
.
getModel
().
getAssociatedResource
();
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
7e5a8b96
...
...
@@ -12,7 +12,6 @@ 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
editorbrowser
=
require
(
'
vs/editor/browser/editorBrowser
'
);
import
{
Source
}
from
'
vs/workbench/parts/debug/common/debugSource
'
;
export
const
VIEWLET_ID
=
'
workbench.view.debug
'
;
...
...
@@ -312,7 +311,6 @@ export interface IDebugService {
toggleBreakpointsActivated
():
TPromise
<
void
>
;
removeAllBreakpoints
():
TPromise
<
any
>
;
sendAllBreakpoints
():
TPromise
<
any
>
;
editBreakpoint
(
editor
:
editorbrowser
.
ICodeEditor
,
lineNumber
:
number
):
TPromise
<
void
>
;
addFunctionBreakpoint
():
void
;
renameFunctionBreakpoint
(
id
:
string
,
newFunctionName
:
string
):
TPromise
<
void
>
;
...
...
src/vs/workbench/parts/debug/electron-browser/debugActions.ts
浏览文件 @
7e5a8b96
...
...
@@ -17,9 +17,11 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybindingServ
import
{
EventType
,
CompositeEvent
}
from
'
vs/workbench/common/events
'
;
import
debug
=
require
(
'
vs/workbench/parts/debug/common/debug
'
);
import
model
=
require
(
'
vs/workbench/parts/debug/common/debugModel
'
);
import
{
BreakpointWidget
}
from
'
vs/workbench/parts/debug/browser/breakpointWidget
'
;
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/common/viewletService
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
clipboard
}
from
'
electron
'
;
import
IDebugService
=
debug
.
IDebugService
;
...
...
@@ -419,12 +421,19 @@ export class AddConditionalBreakpointAction extends AbstractDebugAction {
static
ID
=
'
workbench.debug.viewlet.action.addConditionalBreakpointAction
'
;
static
LABEL
=
nls
.
localize
(
'
addConditionalBreakpoint
'
,
"
Add Conditional Breakpoint
"
);
constructor
(
id
:
string
,
label
:
string
,
private
editor
:
editorbrowser
.
ICodeEditor
,
private
lineNumber
:
number
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
constructor
(
id
:
string
,
label
:
string
,
private
editor
:
editorbrowser
.
ICodeEditor
,
private
lineNumber
:
number
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
super
(
id
,
label
,
null
,
debugService
,
keybindingService
);
}
public
run
():
TPromise
<
any
>
{
return
this
.
debugService
.
editBreakpoint
(
this
.
editor
,
this
.
lineNumber
);
BreakpointWidget
.
createInstance
(
this
.
editor
,
this
.
lineNumber
,
this
.
instantiationService
);
return
TPromise
.
as
(
null
);
}
}
...
...
@@ -432,12 +441,19 @@ export class EditConditionalBreakpointAction extends AbstractDebugAction {
static
ID
=
'
workbench.debug.viewlet.action.editConditionalBreakpointAction
'
;
static
LABEL
=
nls
.
localize
(
'
editConditionalBreakpoint
'
,
"
Edit Breakpoint
"
);
constructor
(
id
:
string
,
label
:
string
,
private
editor
:
editorbrowser
.
ICodeEditor
,
private
lineNumber
:
number
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
constructor
(
id
:
string
,
label
:
string
,
private
editor
:
editorbrowser
.
ICodeEditor
,
private
lineNumber
:
number
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
super
(
id
,
label
,
null
,
debugService
,
keybindingService
);
}
public
run
(
breakpoint
:
debug
.
IBreakpoint
):
TPromise
<
any
>
{
return
this
.
debugService
.
editBreakpoint
(
this
.
editor
,
this
.
lineNumber
);
BreakpointWidget
.
createInstance
(
this
.
editor
,
this
.
lineNumber
,
this
.
instantiationService
);
return
TPromise
.
as
(
null
);
}
}
...
...
@@ -464,7 +480,12 @@ export class ToggleBreakpointAction extends EditorAction {
export
class
EditorConditionalBreakpointAction
extends
EditorAction
{
static
ID
=
'
editor.debug.action.conditionalBreakpoint
'
;
constructor
(
descriptor
:
editorCommon
.
IEditorActionDescriptorData
,
editor
:
editorCommon
.
ICommonCodeEditor
,
@
IDebugService
private
debugService
:
IDebugService
)
{
constructor
(
descriptor
:
editorCommon
.
IEditorActionDescriptorData
,
editor
:
editorCommon
.
ICommonCodeEditor
,
@
IDebugService
private
debugService
:
IDebugService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
super
(
descriptor
,
editor
,
Behaviour
.
TextFocus
);
}
...
...
@@ -472,7 +493,7 @@ export class EditorConditionalBreakpointAction extends EditorAction {
if
(
this
.
debugService
.
state
!==
debug
.
State
.
Disabled
)
{
const
lineNumber
=
this
.
editor
.
getPosition
().
lineNumber
;
if
(
this
.
debugService
.
getConfigurationManager
().
canSetBreakpointsIn
(
this
.
editor
.
getModel
()))
{
return
this
.
debugService
.
editBreakpoint
(
<
editorbrowser
.
ICodeEditor
>
this
.
editor
,
lineNumber
);
BreakpointWidget
.
createInstance
(
<
editorbrowser
.
ICodeEditor
>
this
.
editor
,
lineNumber
,
this
.
instantiationService
);
}
}
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
7e5a8b96
...
...
@@ -34,7 +34,6 @@ import model = require('vs/workbench/parts/debug/common/debugModel');
import
{
DebugStringEditorInput
}
from
'
vs/workbench/parts/debug/browser/debugEditorInputs
'
;
import
viewmodel
=
require
(
'
vs/workbench/parts/debug/common/debugViewModel
'
);
import
debugactions
=
require
(
'
vs/workbench/parts/debug/electron-browser/debugActions
'
);
import
{
BreakpointWidget
}
from
'
vs/workbench/parts/debug/browser/breakpointWidget
'
;
import
{
ConfigurationManager
}
from
'
vs/workbench/parts/debug/node/debugConfigurationManager
'
;
import
{
Source
}
from
'
vs/workbench/parts/debug/common/debugSource
'
;
import
{
ITaskService
,
TaskEvent
,
TaskType
,
TaskServiceEvents
,
ITaskSummary
}
from
'
vs/workbench/parts/tasks/common/taskService
'
;
...
...
@@ -473,17 +472,6 @@ export class DebugService implements debug.IDebugService {
return
this
.
sendAllBreakpoints
();
}
public
editBreakpoint
(
editor
:
editorbrowser
.
ICodeEditor
,
lineNumber
:
number
):
TPromise
<
void
>
{
if
(
BreakpointWidget
.
INSTANCE
)
{
BreakpointWidget
.
INSTANCE
.
dispose
();
}
this
.
instantiationService
.
createInstance
(
BreakpointWidget
,
editor
,
lineNumber
);
BreakpointWidget
.
INSTANCE
.
show
({
lineNumber
,
column
:
1
},
2
);
return
TPromise
.
as
(
null
);
}
public
addFunctionBreakpoint
():
void
{
this
.
model
.
addFunctionBreakpoint
(
''
);
}
...
...
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
浏览文件 @
7e5a8b96
...
...
@@ -63,10 +63,6 @@ export class MockDebugService implements debug.IDebugService {
return
TPromise
.
as
(
null
);
}
public
editBreakpoint
(
editor
:
editorbrowser
.
ICodeEditor
,
lineNumber
:
number
):
TPromise
<
void
>
{
return
TPromise
.
as
(
null
);
}
public
addFunctionBreakpoint
():
void
{}
public
renameFunctionBreakpoint
(
id
:
string
,
newFunctionName
:
string
):
TPromise
<
void
>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录