Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
46543615
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,发现更多精彩内容 >>
提交
46543615
编写于
11月 29, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master' into scm-api
上级
0dc80d5e
1dbc2f89
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
114 addition
and
99 deletion
+114
-99
src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts
src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts
+26
-0
src/vs/workbench/parts/backup/common/backupRestorer.ts
src/vs/workbench/parts/backup/common/backupRestorer.ts
+54
-41
src/vs/workbench/parts/debug/electron-browser/debugViewer.ts
src/vs/workbench/parts/debug/electron-browser/debugViewer.ts
+23
-38
src/vs/workbench/parts/debug/electron-browser/debugViews.ts
src/vs/workbench/parts/debug/electron-browser/debugViews.ts
+4
-4
src/vs/workbench/parts/debug/electron-browser/repl.ts
src/vs/workbench/parts/debug/electron-browser/repl.ts
+1
-1
src/vs/workbench/parts/debug/electron-browser/replViewer.ts
src/vs/workbench/parts/debug/electron-browser/replViewer.ts
+6
-5
src/vs/workbench/parts/debug/node/debugAdapter.ts
src/vs/workbench/parts/debug/node/debugAdapter.ts
+0
-10
未找到文件。
src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts
浏览文件 @
46543615
...
...
@@ -30,6 +30,7 @@ export class ViewCursor {
private
_cursorStyle
:
TextEditorCursorStyle
;
private
_lastRenderedContent
:
string
;
private
_lineHeight
:
number
;
private
_characterWidth
:
number
;
constructor
(
context
:
ViewContext
,
isSecondary
:
boolean
)
{
this
.
_context
=
context
;
...
...
@@ -128,6 +129,19 @@ export class ViewCursor {
this
.
_positionTop
=
visibleRange
.
top
;
this
.
_positionLeft
=
visibleRange
.
left
;
this
.
_isInViewport
=
true
;
if
(
this
.
_cursorStyle
!==
TextEditorCursorStyle
.
Line
)
{
let
visibleRangeForCharacter
=
ctx
.
linesVisibleRangesForRange
({
startLineNumber
:
this
.
_position
.
lineNumber
,
startColumn
:
this
.
_position
.
column
,
endLineNumber
:
this
.
_position
.
lineNumber
,
endColumn
:
this
.
_position
.
column
+
1
},
false
);
if
(
visibleRangeForCharacter
.
length
>
0
&&
visibleRangeForCharacter
[
0
].
ranges
.
length
>
0
)
{
this
.
_characterWidth
=
visibleRangeForCharacter
[
0
].
ranges
[
0
].
width
;
}
}
}
else
{
this
.
_isInViewport
=
false
;
}
...
...
@@ -156,6 +170,18 @@ export class ViewCursor {
this
.
_domNode
.
setLineHeight
(
this
.
_lineHeight
);
this
.
_domNode
.
setHeight
(
this
.
_lineHeight
);
if
(
this
.
_cursorStyle
!==
TextEditorCursorStyle
.
Line
)
{
let
desiredWidth
=
'
1ch
'
;
if
(
this
.
_characterWidth
>
0
)
{
desiredWidth
=
`
${
this
.
_characterWidth
}
px`
;
}
if
(
this
.
_domNode
.
domNode
.
style
.
width
!==
desiredWidth
)
{
this
.
_domNode
.
domNode
.
style
.
width
=
desiredWidth
;
}
}
return
{
position
:
this
.
_position
,
contentTop
:
top
,
...
...
src/vs/workbench/parts/backup/common/backupRestorer.ts
浏览文件 @
46543615
...
...
@@ -30,53 +30,66 @@ export class BackupRestorer implements IWorkbenchContribution {
@
ITextModelResolverService
private
textModelResolverService
:
ITextModelResolverService
,
@
IEditorGroupService
private
groupService
:
IEditorGroupService
)
{
if
(
!
this
.
environmentService
.
isExtensionDevelopment
)
{
this
.
restoreBackups
();
}
}
private
restoreBackups
():
void
{
// Wait for all editors being restored before restoring backups
if
(
!
this
.
environmentService
.
isExtensionDevelopment
)
{
this
.
partService
.
joinCreation
().
then
(()
=>
{
const
stacks
=
this
.
groupService
.
getStacksModel
();
const
hasOpenedEditors
=
stacks
.
groups
.
length
>
0
;
this
.
doRestoreBackups
().
done
(
null
,
errors
.
onUnexpectedError
);
});
}
}
private
doRestoreBackups
():
TPromise
<
any
>
{
// Find all files and untitled with backups
this
.
backupFileService
.
getWorkspaceFileBackups
().
then
(
backups
=>
{
const
restorePromises
:
TPromise
<
any
>
[]
=
[];
const
editorsToOpen
:
URI
[]
=
[];
return
this
.
backupFileService
.
getWorkspaceFileBackups
().
then
(
backups
=>
{
// Restore any backup that is opened and remember those that are not yet
backups
.
forEach
(
backup
=>
{
if
(
stacks
.
isOpen
(
backup
))
{
if
(
backup
.
scheme
===
'
file
'
)
{
restorePromises
.
push
(
this
.
textModelResolverService
.
createModelReference
(
backup
));
}
else
if
(
backup
.
scheme
===
'
untitled
'
)
{
restorePromises
.
push
(
this
.
untitledEditorService
.
get
(
backup
).
resolve
());
}
}
else
{
editorsToOpen
.
push
(
backup
);
// Resolve backups that are opened in stacks model
return
this
.
doResolveOpenedBackups
(
backups
).
then
(
unresolved
=>
{
// Some failed to restore or were not opened at all so we open and resolve them manually
if
(
unresolved
.
length
>
0
)
{
return
this
.
doOpenEditors
(
unresolved
).
then
(()
=>
this
.
doResolveOpenedBackups
(
unresolved
));
}
});
});
}
// Restore all backups that are opened as editors
return
TPromise
.
join
(
restorePromises
).
then
(()
=>
{
if
(
editorsToOpen
.
length
>
0
)
{
const
resourceToInputs
=
TPromise
.
join
(
editorsToOpen
.
map
(
resource
=>
this
.
editorService
.
createInput
({
resource
})));
private
doOpenEditors
(
inputs
:
URI
[]):
TPromise
<
void
>
{
const
stacks
=
this
.
groupService
.
getStacksModel
();
const
hasOpenedEditors
=
stacks
.
groups
.
length
>
0
;
return
resourceToInputs
.
then
(
inputs
=>
{
return
TPromise
.
join
(
inputs
.
map
(
resource
=>
this
.
editorService
.
createInput
({
resource
})))
.
then
(
inputs
=>
{
const
openEditorsArgs
=
inputs
.
map
((
input
,
index
)
=>
{
return
{
input
,
options
:
{
pinned
:
true
,
preserveFocus
:
true
,
inactive
:
index
>
0
||
hasOpenedEditors
},
position
:
Position
.
ONE
};
});
// Open all remaining backups as editors and resolve them to load their backups
return
this
.
editorService
.
openEditors
(
openEditorsArgs
).
then
(()
=>
TPromise
.
join
(
inputs
.
map
(
input
=>
input
.
resolve
()))
);
return
this
.
editorService
.
openEditors
(
openEditorsArgs
).
then
(()
=>
void
0
);
});
}
private
doResolveOpenedBackups
(
backups
:
URI
[]):
TPromise
<
URI
[]
>
{
const
stacks
=
this
.
groupService
.
getStacksModel
();
const
restorePromises
:
TPromise
<
any
>
[]
=
[];
const
unresolved
:
URI
[]
=
[];
backups
.
forEach
(
backup
=>
{
if
(
stacks
.
isOpen
(
backup
))
{
if
(
backup
.
scheme
===
'
file
'
)
{
restorePromises
.
push
(
this
.
textModelResolverService
.
createModelReference
(
backup
).
then
(
null
,
()
=>
unresolved
.
push
(
backup
)));
}
else
if
(
backup
.
scheme
===
'
untitled
'
)
{
restorePromises
.
push
(
this
.
untitledEditorService
.
get
(
backup
).
resolve
().
then
(
null
,
()
=>
unresolved
.
push
(
backup
)));
}
}
else
{
unresolved
.
push
(
backup
);
}
});
}).
done
(
null
,
errors
.
onUnexpectedError
);
}
);
return
TPromise
.
join
(
restorePromises
).
then
(()
=>
unresolved
,
()
=>
unresolved
);
}
public
getId
():
string
{
...
...
src/vs/workbench/parts/debug/electron-browser/debugViewer.ts
浏览文件 @
46543615
...
...
@@ -10,6 +10,7 @@ import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import
*
as
paths
from
'
vs/base/common/paths
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
{
equalsIgnoreCase
}
from
'
vs/base/common/strings
'
;
import
{
IKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
isMacintosh
}
from
'
vs/base/common/platform
'
;
import
*
as
dom
from
'
vs/base/browser/dom
'
;
import
{
IMouseEvent
,
DragMouseEvent
}
from
'
vs/base/browser/mouseEvent
'
;
...
...
@@ -20,16 +21,16 @@ import { ITree, IAccessibilityProvider, ContextMenuEvent, IDataSource, IRenderer
import
{
InputBox
,
IInputValidationOptions
}
from
'
vs/base/browser/ui/inputbox/inputBox
'
;
import
{
DefaultController
,
DefaultDragAndDrop
}
from
'
vs/base/parts/tree/browser/treeDefaults
'
;
import
{
IActionProvider
}
from
'
vs/base/parts/tree/browser/actionsRenderer
'
;
import
{
IContextViewService
,
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
*
as
debug
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
Expression
,
Variable
,
FunctionBreakpoint
,
StackFrame
,
Thread
,
Process
,
Breakpoint
,
ExceptionBreakpoint
,
Model
,
Scope
}
from
'
vs/workbench/parts/debug/common/debugModel
'
;
import
{
ViewModel
}
from
'
vs/workbench/parts/debug/common/debugViewModel
'
;
import
{
ContinueAction
,
StepOverAction
,
PauseAction
,
AddFunctionBreakpointAction
,
ReapplyBreakpointsAction
,
DisableAllBreakpointsAction
,
RemoveBreakpointAction
,
ToggleEnablementAction
,
RenameFunctionBreakpointAction
,
RemoveWatchExpressionAction
,
AddWatchExpressionAction
,
EditWatchExpressionAction
,
RemoveAllBreakpointsAction
,
EnableAllBreakpointsAction
,
StepOutAction
,
StepIntoAction
,
SetValueAction
,
RemoveAllWatchExpressionsAction
,
ToggleBreakpointsActivatedAction
,
RestartFrameAction
,
AddToWatchExpressionsAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
import
{
CopyValueAction
}
from
'
vs/workbench/parts/debug/electron-browser/electronDebugActions
'
;
import
{
IContextViewService
,
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
Source
}
from
'
vs/workbench/parts/debug/common/debugSource
'
;
import
{
IKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
once
}
from
'
vs/base/common/functional
'
;
const
$
=
dom
.
$
;
...
...
@@ -130,8 +131,8 @@ function renderRenameBox(debugService: debug.IDebugService, contextViewService:
debugService
.
renameWatchExpression
(
element
.
getId
(),
inputBox
.
value
).
done
(
null
,
errors
.
onUnexpectedError
);
}
else
if
(
element
instanceof
Expression
&&
!
element
.
name
)
{
debugService
.
removeWatchExpressions
(
element
.
getId
());
}
else
if
(
element
instanceof
FunctionBreakpoint
&&
renamed
&&
inputBox
.
value
)
{
debugService
.
renameFunctionBreakpoint
(
element
.
getId
(),
inputBox
.
valu
e
).
done
(
null
,
errors
.
onUnexpectedError
);
}
else
if
(
element
instanceof
FunctionBreakpoint
&&
inputBox
.
value
)
{
debugService
.
renameFunctionBreakpoint
(
element
.
getId
(),
renamed
?
inputBox
.
value
:
element
.
nam
e
).
done
(
null
,
errors
.
onUnexpectedError
);
}
else
if
(
element
instanceof
FunctionBreakpoint
&&
!
element
.
name
)
{
debugService
.
removeFunctionBreakpoints
(
element
.
getId
()).
done
(
null
,
errors
.
onUnexpectedError
);
}
else
if
(
element
instanceof
Variable
)
{
...
...
@@ -176,10 +177,10 @@ function getSourceName(source: Source, contextService: IWorkspaceContextService)
export
class
BaseDebugController
extends
DefaultController
{
constructor
(
protected
debugService
:
debug
.
IDebugService
,
private
contextMenuService
:
IContextMenuService
,
private
actionProvider
:
IActionProvider
,
private
focusOnContextMenu
=
true
@
debug
.
IDebugService
protected
debugService
:
debug
.
IDebugService
,
@
IContextMenuService
private
contextMenuService
:
IContextMenuService
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
)
{
super
();
...
...
@@ -189,6 +190,11 @@ export class BaseDebugController extends DefaultController {
this
.
downKeyBindingDispatcher
.
set
(
KeyCode
.
Delete
,
this
.
onDelete
.
bind
(
this
));
this
.
downKeyBindingDispatcher
.
set
(
KeyMod
.
Shift
|
KeyCode
.
Delete
,
this
.
onDelete
.
bind
(
this
));
}
if
(
isMacintosh
)
{
this
.
downKeyBindingDispatcher
.
set
(
KeyCode
.
Enter
,
this
.
onRename
.
bind
(
this
));
}
else
{
this
.
downKeyBindingDispatcher
.
set
(
KeyCode
.
F2
,
this
.
onRename
.
bind
(
this
));
}
}
public
onContextMenu
(
tree
:
ITree
,
element
:
debug
.
IEnablement
,
event
:
ContextMenuEvent
):
boolean
{
...
...
@@ -199,9 +205,7 @@ export class BaseDebugController extends DefaultController {
event
.
preventDefault
();
event
.
stopPropagation
();
if
(
this
.
focusOnContextMenu
)
{
tree
.
setFocus
(
element
);
}
if
(
this
.
actionProvider
.
hasSecondaryActions
(
tree
,
element
))
{
const
anchor
=
{
x
:
event
.
posx
+
1
,
y
:
event
.
posy
};
...
...
@@ -225,6 +229,10 @@ export class BaseDebugController extends DefaultController {
protected
onDelete
(
tree
:
ITree
,
event
:
IKeyboardEvent
):
boolean
{
return
false
;
}
protected
onRename
(
tree
:
ITree
,
event
:
IKeyboardEvent
):
boolean
{
return
false
;
}
}
// call stack
...
...
@@ -759,11 +767,6 @@ export class VariablesAccessibilityProvider implements IAccessibilityProvider {
export
class
VariablesController
extends
BaseDebugController
{
constructor
(
debugService
:
debug
.
IDebugService
,
contextMenuService
:
IContextMenuService
,
actionProvider
:
IActionProvider
)
{
super
(
debugService
,
contextMenuService
,
actionProvider
);
this
.
downKeyBindingDispatcher
.
set
(
KeyCode
.
Enter
,
this
.
setSelectedExpression
.
bind
(
this
));
}
protected
onLeftClick
(
tree
:
ITree
,
element
:
any
,
event
:
IMouseEvent
):
boolean
{
// double click on primitive value: open input box to be able to set the value
if
(
element
instanceof
Variable
&&
event
.
detail
===
2
)
{
...
...
@@ -777,7 +780,7 @@ export class VariablesController extends BaseDebugController {
return
super
.
onLeftClick
(
tree
,
element
,
event
);
}
protected
setSelectedExpression
(
tree
:
ITree
,
event
:
KeyboardEvent
):
boolean
{
protected
onEnter
(
tree
:
ITree
,
event
:
I
KeyboardEvent
):
boolean
{
const
element
=
tree
.
getFocus
();
if
(
element
instanceof
Variable
&&
!
element
.
hasChildren
)
{
this
.
debugService
.
getViewModel
().
setSelectedExpression
(
element
);
...
...
@@ -995,16 +998,6 @@ export class WatchExpressionsAccessibilityProvider implements IAccessibilityProv
export
class
WatchExpressionsController
extends
BaseDebugController
{
constructor
(
debugService
:
debug
.
IDebugService
,
contextMenuService
:
IContextMenuService
,
actionProvider
:
IActionProvider
)
{
super
(
debugService
,
contextMenuService
,
actionProvider
);
if
(
isMacintosh
)
{
this
.
downKeyBindingDispatcher
.
set
(
KeyCode
.
Enter
,
this
.
onRename
.
bind
(
this
));
}
else
{
this
.
downKeyBindingDispatcher
.
set
(
KeyCode
.
F2
,
this
.
onRename
.
bind
(
this
));
}
}
protected
onLeftClick
(
tree
:
ITree
,
element
:
any
,
event
:
IMouseEvent
):
boolean
{
// double click on primitive value: open input box to be able to select and copy value.
if
(
element
instanceof
Expression
&&
event
.
detail
===
2
)
{
...
...
@@ -1018,7 +1011,7 @@ export class WatchExpressionsController extends BaseDebugController {
return
super
.
onLeftClick
(
tree
,
element
,
event
);
}
protected
onRename
(
tree
:
ITree
,
event
:
KeyboardEvent
):
boolean
{
protected
onRename
(
tree
:
ITree
,
event
:
I
KeyboardEvent
):
boolean
{
const
element
=
tree
.
getFocus
();
if
(
element
instanceof
Expression
)
{
const
watchExpression
=
<
Expression
>
element
;
...
...
@@ -1258,6 +1251,7 @@ export class BreakpointsRenderer implements IRenderer {
private
renderFunctionBreakpoint
(
tree
:
ITree
,
functionBreakpoint
:
debug
.
IFunctionBreakpoint
,
data
:
IBaseBreakpointTemplateData
):
void
{
const
selected
=
this
.
debugService
.
getViewModel
().
getSelectedFunctionBreakpoint
();
if
(
!
functionBreakpoint
.
name
||
(
selected
&&
selected
.
getId
()
===
functionBreakpoint
.
getId
()))
{
data
.
name
.
textContent
=
''
;
renderRenameBox
(
this
.
debugService
,
this
.
contextViewService
,
tree
,
functionBreakpoint
,
data
.
breakpoint
,
{
initialValue
:
functionBreakpoint
.
name
,
placeholder
:
nls
.
localize
(
'
functionBreakpointPlaceholder
'
,
"
Function to break on
"
),
...
...
@@ -1328,15 +1322,6 @@ export class BreakpointsAccessibilityProvider implements IAccessibilityProvider
export
class
BreakpointsController
extends
BaseDebugController
{
constructor
(
debugService
:
debug
.
IDebugService
,
contextMenuService
:
IContextMenuService
,
actionProvider
:
IActionProvider
)
{
super
(
debugService
,
contextMenuService
,
actionProvider
);
if
(
isMacintosh
)
{
this
.
downKeyBindingDispatcher
.
set
(
KeyCode
.
Enter
,
this
.
onRename
.
bind
(
this
));
}
else
{
this
.
downKeyBindingDispatcher
.
set
(
KeyCode
.
F2
,
this
.
onRename
.
bind
(
this
));
}
}
protected
onLeftClick
(
tree
:
ITree
,
element
:
any
,
event
:
IMouseEvent
):
boolean
{
if
(
element
instanceof
FunctionBreakpoint
&&
event
.
detail
===
2
)
{
this
.
debugService
.
getViewModel
().
setSelectedFunctionBreakpoint
(
element
);
...
...
src/vs/workbench/parts/debug/electron-browser/debugViews.ts
浏览文件 @
46543615
...
...
@@ -86,7 +86,7 @@ export class VariablesView extends CollapsibleViewletView {
dataSource
:
new
viewer
.
VariablesDataSource
(),
renderer
:
this
.
instantiationService
.
createInstance
(
viewer
.
VariablesRenderer
),
accessibilityProvider
:
new
viewer
.
VariablesAccessibilityProvider
(),
controller
:
new
viewer
.
VariablesController
(
this
.
debugService
,
this
.
contextMenuService
,
new
viewer
.
VariablesActionProvider
(
this
.
instantiationService
))
controller
:
this
.
instantiationService
.
createInstance
(
viewer
.
VariablesController
,
new
viewer
.
VariablesActionProvider
(
this
.
instantiationService
))
},
{
ariaLabel
:
nls
.
localize
(
'
variablesAriaTreeLabel
'
,
"
Debug Variables
"
),
twistiePixels
...
...
@@ -182,7 +182,7 @@ export class WatchExpressionsView extends CollapsibleViewletView {
dataSource
:
new
viewer
.
WatchExpressionsDataSource
(),
renderer
:
this
.
instantiationService
.
createInstance
(
viewer
.
WatchExpressionsRenderer
,
actionProvider
,
this
.
actionRunner
),
accessibilityProvider
:
new
viewer
.
WatchExpressionsAccessibilityProvider
(),
controller
:
new
viewer
.
WatchExpressionsController
(
this
.
debugService
,
this
.
contextMenuService
,
actionProvider
),
controller
:
this
.
instantiationService
.
createInstance
(
viewer
.
WatchExpressionsController
,
actionProvider
),
dnd
:
this
.
instantiationService
.
createInstance
(
viewer
.
WatchExpressionsDragAndDrop
)
},
{
ariaLabel
:
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
watchAriaTreeLabel
'
},
"
Debug Watch Expressions
"
),
...
...
@@ -301,7 +301,7 @@ export class CallStackView extends CollapsibleViewletView {
dataSource
:
this
.
instantiationService
.
createInstance
(
viewer
.
CallStackDataSource
),
renderer
:
this
.
instantiationService
.
createInstance
(
viewer
.
CallStackRenderer
),
accessibilityProvider
:
this
.
instantiationService
.
createInstance
(
viewer
.
CallstackAccessibilityProvider
),
controller
:
new
viewer
.
CallStackController
(
this
.
debugService
,
this
.
contextMenuService
,
actionProvider
)
controller
:
this
.
instantiationService
.
createInstance
(
viewer
.
CallStackController
,
actionProvider
)
},
{
ariaLabel
:
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
callStackAriaLabel
'
},
"
Debug Call Stack
"
),
twistiePixels
...
...
@@ -361,7 +361,7 @@ export class BreakpointsView extends AdaptiveCollapsibleViewletView {
dataSource
:
new
viewer
.
BreakpointsDataSource
(),
renderer
:
this
.
instantiationService
.
createInstance
(
viewer
.
BreakpointsRenderer
,
actionProvider
,
this
.
actionRunner
),
accessibilityProvider
:
this
.
instantiationService
.
createInstance
(
viewer
.
BreakpointsAccessibilityProvider
),
controller
:
new
viewer
.
BreakpointsController
(
this
.
debugService
,
this
.
contextMenuService
,
actionProvider
),
controller
:
this
.
instantiationService
.
createInstance
(
viewer
.
BreakpointsController
,
actionProvider
),
sorter
:
{
compare
(
tree
:
ITree
,
element
:
any
,
otherElement
:
any
):
number
{
const
first
=
<
IBreakpoint
>
element
;
...
...
src/vs/workbench/parts/debug/electron-browser/repl.ts
浏览文件 @
46543615
...
...
@@ -143,7 +143,7 @@ export class Repl extends Panel implements IPrivateReplService {
dataSource
:
new
ReplExpressionsDataSource
(),
renderer
:
this
.
renderer
,
accessibilityProvider
:
new
ReplExpressionsAccessibilityProvider
(),
controller
:
new
ReplExpressionsController
(
this
.
debugService
,
this
.
contextMenuService
,
new
ReplExpressionsActionProvider
(
this
.
instantiationService
),
this
.
replInput
,
false
)
controller
:
this
.
instantiationService
.
createInstance
(
ReplExpressionsController
,
this
.
replInput
,
new
ReplExpressionsActionProvider
(
this
.
instantiationService
)
)
},
replTreeOptions
);
if
(
!
Repl
.
HISTORY
)
{
...
...
src/vs/workbench/parts/debug/electron-browser/replViewer.ts
浏览文件 @
46543615
...
...
@@ -26,6 +26,7 @@ import { AddToWatchExpressionsAction, ClearReplAction } from 'vs/workbench/parts
import
{
CopyAction
}
from
'
vs/workbench/parts/debug/electron-browser/electronDebugActions
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
...
...
@@ -496,13 +497,13 @@ export class ReplExpressionsController extends BaseDebugController {
private
lastSelectedString
:
string
=
null
;
constructor
(
debugService
:
IDebugService
,
contextMenuService
:
IContextMenuService
,
actionProvider
:
IActionProvider
,
private
replInput
:
ICodeEditor
,
focusOnContextMenu
=
true
actionProvider
:
IActionProvider
,
@
IDebugService
debugService
:
IDebugService
,
@
IContextMenuService
contextMenuService
:
IContextMenuService
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
)
{
super
(
debugService
,
contextMenuService
,
actionProvider
,
focusOnContextMenu
);
super
(
actionProvider
,
debugService
,
contextMenuService
,
contextKeyService
);
}
protected
onLeftClick
(
tree
:
ITree
,
element
:
any
,
eventish
:
ICancelableEvent
,
origin
:
string
=
'
mouse
'
):
boolean
{
...
...
src/vs/workbench/parts/debug/node/debugAdapter.ts
浏览文件 @
46543615
...
...
@@ -152,16 +152,6 @@ export class Adapter {
description
:
nls
.
localize
(
'
internalConsoleOptions
'
,
"
Controls behavior of the internal debug console.
"
)
};
const
warnRelativePaths
=
(
attribute
:
IJSONSchema
)
=>
{
if
(
attribute
)
{
attribute
.
pattern
=
'
^
\\
${.*}.*|
'
+
paths
.
isAbsoluteRegex
.
source
;
attribute
.
errorMessage
=
nls
.
localize
(
'
relativePathsNotConverted
'
,
"
Relative paths will no longer be automatically converted to absolute ones. Consider using ${workspaceRoot} as a prefix.
"
);
}
};
warnRelativePaths
(
properties
[
'
outDir
'
]);
warnRelativePaths
(
properties
[
'
program
'
]);
warnRelativePaths
(
properties
[
'
cwd
'
]);
const
osProperties
=
objects
.
deepClone
(
properties
);
properties
[
'
windows
'
]
=
{
type
:
'
object
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录