Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
1592c3bc
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,发现更多精彩内容 >>
提交
1592c3bc
编写于
3月 07, 2019
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
strict null checks: debug quick open
上级
6f946ab8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
20 deletion
+21
-20
src/tsconfig.strictNullChecks.json
src/tsconfig.strictNullChecks.json
+1
-0
src/vs/workbench/contrib/debug/browser/debugQuickOpen.ts
src/vs/workbench/contrib/debug/browser/debugQuickOpen.ts
+20
-20
未找到文件。
src/tsconfig.strictNullChecks.json
浏览文件 @
1592c3bc
...
...
@@ -244,6 +244,7 @@
"./vs/workbench/contrib/debug/browser/debugContentProvider.ts"
,
"./vs/workbench/contrib/debug/browser/debugEditorActions.ts"
,
"./vs/workbench/contrib/debug/browser/debugEditorModelManager.ts"
,
"./vs/workbench/contrib/debug/browser/debugQuickOpen.ts"
,
"./vs/workbench/contrib/debug/browser/debugStatus.ts"
,
"./vs/workbench/contrib/debug/browser/exceptionWidget.ts"
,
"./vs/workbench/contrib/debug/browser/linkDetector.ts"
,
...
...
src/vs/workbench/contrib/debug/browser/debugQuickOpen.ts
浏览文件 @
1592c3bc
...
...
@@ -4,20 +4,20 @@
*--------------------------------------------------------------------------------------------*/
import
*
as
nls
from
'
vs/nls
'
;
import
*
as
Filters
from
'
vs/base/common/filters
'
;
import
*
as
Quickopen
from
'
vs/workbench/browser/quickopen
'
;
import
*
as
QuickOpen
from
'
vs/base/parts/quickopen/common/quickOpen
'
;
import
*
as
Model
from
'
vs/base/parts/quickopen/browser/quickOpenModel
'
;
import
{
IDebugService
,
ILaunch
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
IWorkspaceContextService
,
WorkbenchState
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
StartAction
}
from
'
vs/workbench/contrib/debug/browser/debugActions
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
QuickOpenEntry
,
QuickOpenModel
,
QuickOpenEntryGroup
,
IHighlight
}
from
'
vs/base/parts/quickopen/browser/quickOpenModel
'
;
import
{
Mode
,
IAutoFocus
}
from
'
vs/base/parts/quickopen/common/quickOpen
'
;
import
{
QuickOpenHandler
}
from
'
vs/workbench/browser/quickopen
'
;
import
{
matchesFuzzy
}
from
'
vs/base/common/filters
'
;
class
AddConfigEntry
extends
Model
.
QuickOpenEntry
{
class
AddConfigEntry
extends
QuickOpenEntry
{
constructor
(
private
label
:
string
,
private
launch
:
ILaunch
,
private
commandService
:
ICommandService
,
private
contextService
:
IWorkspaceContextService
,
highlights
:
Model
.
IHighlight
[]
=
[])
{
constructor
(
private
label
:
string
,
private
launch
:
ILaunch
,
private
commandService
:
ICommandService
,
private
contextService
:
IWorkspaceContextService
,
highlights
:
IHighlight
[]
=
[])
{
super
(
highlights
);
}
...
...
@@ -33,8 +33,8 @@ class AddConfigEntry extends Model.QuickOpenEntry {
return
nls
.
localize
(
'
entryAriaLabel
'
,
"
{0}, debug
"
,
this
.
getLabel
());
}
public
run
(
mode
:
QuickOpen
.
Mode
,
context
:
Model
.
IContext
):
boolean
{
if
(
mode
===
QuickOpen
.
Mode
.
PREVIEW
)
{
public
run
(
mode
:
Mode
):
boolean
{
if
(
mode
===
Mode
.
PREVIEW
)
{
return
false
;
}
this
.
commandService
.
executeCommand
(
'
debug.addConfiguration
'
,
this
.
launch
.
uri
.
toString
());
...
...
@@ -43,9 +43,9 @@ class AddConfigEntry extends Model.QuickOpenEntry {
}
}
class
StartDebugEntry
extends
Model
.
QuickOpenEntry
{
class
StartDebugEntry
extends
QuickOpenEntry
{
constructor
(
private
debugService
:
IDebugService
,
private
contextService
:
IWorkspaceContextService
,
private
notificationService
:
INotificationService
,
private
launch
:
ILaunch
,
private
configurationName
:
string
,
highlights
:
Model
.
IHighlight
[]
=
[])
{
constructor
(
private
debugService
:
IDebugService
,
private
contextService
:
IWorkspaceContextService
,
private
notificationService
:
INotificationService
,
private
launch
:
ILaunch
,
private
configurationName
:
string
,
highlights
:
IHighlight
[]
=
[])
{
super
(
highlights
);
}
...
...
@@ -61,8 +61,8 @@ class StartDebugEntry extends Model.QuickOpenEntry {
return
nls
.
localize
(
'
entryAriaLabel
'
,
"
{0}, debug
"
,
this
.
getLabel
());
}
public
run
(
mode
:
QuickOpen
.
Mode
,
context
:
Model
.
IContext
):
boolean
{
if
(
mode
===
QuickOpen
.
Mode
.
PREVIEW
||
!
StartAction
.
isEnabled
(
this
.
debugService
))
{
public
run
(
mode
:
Mode
):
boolean
{
if
(
mode
===
Mode
.
PREVIEW
||
!
StartAction
.
isEnabled
(
this
.
debugService
))
{
return
false
;
}
// Run selected debug configuration
...
...
@@ -73,7 +73,7 @@ class StartDebugEntry extends Model.QuickOpenEntry {
}
}
export
class
DebugQuickOpenHandler
extends
Quick
open
.
Quick
OpenHandler
{
export
class
DebugQuickOpenHandler
extends
QuickOpenHandler
{
public
static
readonly
ID
=
'
workbench.picker.launch
'
;
...
...
@@ -92,13 +92,13 @@ export class DebugQuickOpenHandler extends Quickopen.QuickOpenHandler {
return
nls
.
localize
(
'
debugAriaLabel
'
,
"
Type a name of a launch configuration to run.
"
);
}
public
getResults
(
input
:
string
,
token
:
CancellationToken
):
Promise
<
Model
.
QuickOpenModel
>
{
const
configurations
:
Model
.
QuickOpenEntry
[]
=
[];
public
getResults
(
input
:
string
,
token
:
CancellationToken
):
Promise
<
QuickOpenModel
>
{
const
configurations
:
QuickOpenEntry
[]
=
[];
const
configManager
=
this
.
debugService
.
getConfigurationManager
();
const
launches
=
configManager
.
getLaunches
();
for
(
let
launch
of
launches
)
{
launch
.
getConfigurationNames
().
map
(
config
=>
({
config
:
config
,
highlights
:
Filters
.
matchesFuzzy
(
input
,
config
,
true
)
}))
launch
.
getConfigurationNames
().
map
(
config
=>
({
config
:
config
,
highlights
:
matchesFuzzy
(
input
,
config
,
true
)
||
undefined
}))
.
filter
(({
highlights
})
=>
!!
highlights
)
.
forEach
(({
config
,
highlights
})
=>
{
if
(
launch
===
configManager
.
selectedConfiguration
.
launch
&&
config
===
configManager
.
selectedConfiguration
.
name
)
{
...
...
@@ -110,19 +110,19 @@ export class DebugQuickOpenHandler extends Quickopen.QuickOpenHandler {
launches
.
filter
(
l
=>
!
l
.
hidden
).
forEach
((
l
,
index
)
=>
{
const
label
=
this
.
contextService
.
getWorkbenchState
()
===
WorkbenchState
.
WORKSPACE
?
nls
.
localize
(
"
addConfigTo
"
,
"
Add Config ({0})...
"
,
l
.
name
)
:
nls
.
localize
(
'
addConfiguration
'
,
"
Add Configuration...
"
);
const
entry
=
new
AddConfigEntry
(
label
,
l
,
this
.
commandService
,
this
.
contextService
,
Filters
.
matchesFuzzy
(
input
,
label
,
true
)
);
const
entry
=
new
AddConfigEntry
(
label
,
l
,
this
.
commandService
,
this
.
contextService
,
matchesFuzzy
(
input
,
label
,
true
)
||
undefined
);
if
(
index
===
0
)
{
configurations
.
push
(
new
Model
.
QuickOpenEntryGroup
(
entry
,
undefined
,
true
));
configurations
.
push
(
new
QuickOpenEntryGroup
(
entry
,
undefined
,
true
));
}
else
{
configurations
.
push
(
entry
);
}
});
return
Promise
.
resolve
(
new
Model
.
QuickOpenModel
(
configurations
));
return
Promise
.
resolve
(
new
QuickOpenModel
(
configurations
));
}
public
getAutoFocus
(
input
:
string
):
QuickOpen
.
IAutoFocus
{
public
getAutoFocus
(
input
:
string
):
IAutoFocus
{
return
{
autoFocusFirstEntry
:
!!
input
,
autoFocusIndex
:
this
.
autoFocusIndex
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录