Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
0ce7badd
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,发现更多精彩内容 >>
提交
0ce7badd
编写于
10月 19, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Strict null checks
#60565
上级
f2653c04
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
47 addition
and
28 deletion
+47
-28
src/tsconfig.strictNullChecks.json
src/tsconfig.strictNullChecks.json
+9
-0
src/vs/base/node/encoding.ts
src/vs/base/node/encoding.ts
+1
-1
src/vs/base/node/ps.ts
src/vs/base/node/ps.ts
+8
-6
src/vs/base/parts/ipc/node/ipc.cp.ts
src/vs/base/parts/ipc/node/ipc.cp.ts
+15
-7
src/vs/platform/actions/common/menu.ts
src/vs/platform/actions/common/menu.ts
+5
-5
src/vs/platform/configuration/common/configurationModels.ts
src/vs/platform/configuration/common/configurationModels.ts
+4
-4
src/vs/workbench/parts/search/common/queryBuilder.ts
src/vs/workbench/parts/search/common/queryBuilder.ts
+5
-5
未找到文件。
src/tsconfig.strictNullChecks.json
浏览文件 @
0ce7badd
...
...
@@ -63,6 +63,7 @@
"./vs/base/node/ports.ts"
,
"./vs/base/node/processes.ts"
,
"./vs/base/node/proxy.ts"
,
"./vs/base/node/ps.ts"
,
"./vs/base/node/request.ts"
,
"./vs/base/node/stats.ts"
,
"./vs/base/node/storage.ts"
,
...
...
@@ -70,7 +71,9 @@
"./vs/base/parts/contextmenu/common/contextmenu.ts"
,
"./vs/base/parts/contextmenu/electron-browser/contextmenu.ts"
,
"./vs/base/parts/contextmenu/electron-main/contextmenu.ts"
,
"./vs/base/parts/ipc/node/ipc.cp.ts"
,
"./vs/base/parts/ipc/node/ipc.ts"
,
"./vs/base/parts/ipc/test/node/testApp.ts"
,
"./vs/base/parts/ipc/test/node/testService.ts"
,
"./vs/base/parts/quickopen/common/quickOpen.ts"
,
"./vs/base/test/browser/ui/grid/util.ts"
,
...
...
@@ -347,12 +350,14 @@
"./vs/nls.d.ts"
,
"./vs/nls.mock.ts"
,
"./vs/platform/actions/common/actions.ts"
,
"./vs/platform/actions/common/menu.ts"
,
"./vs/platform/backup/common/backup.ts"
,
"./vs/platform/broadcast/electron-browser/broadcastService.ts"
,
"./vs/platform/clipboard/common/clipboardService.ts"
,
"./vs/platform/clipboard/electron-browser/clipboardService.ts"
,
"./vs/platform/commands/common/commands.ts"
,
"./vs/platform/configuration/common/configuration.ts"
,
"./vs/platform/configuration/common/configurationModels.ts"
,
"./vs/platform/configuration/common/configurationRegistry.ts"
,
"./vs/platform/contextkey/browser/contextKeyService.ts"
,
"./vs/platform/contextkey/common/contextkey.ts"
,
...
...
@@ -489,9 +494,11 @@
"./vs/workbench/parts/scm/common/scm.ts"
,
"./vs/workbench/parts/scm/electron-browser/scmUtil.ts"
,
"./vs/workbench/parts/search/common/constants.ts"
,
"./vs/workbench/parts/search/common/queryBuilder.ts"
,
"./vs/workbench/parts/surveys/electron-browser/nps.contribution.ts"
,
"./vs/workbench/parts/tasks/common/problemMatcher.ts"
,
"./vs/workbench/parts/tasks/common/taskTemplates.ts"
,
"./vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.ts"
,
"./vs/workbench/parts/terminal/browser/terminalWidgetManager.ts"
,
"./vs/workbench/parts/terminal/common/terminal.ts"
,
"./vs/workbench/parts/terminal/common/terminalColorRegistry.ts"
,
...
...
@@ -504,6 +511,7 @@
"./vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts"
,
"./vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts"
,
"./vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils.ts"
,
"./vs/workbench/services/actions/common/menuService.ts"
,
"./vs/workbench/services/activity/common/activity.ts"
,
"./vs/workbench/services/backup/common/backup.ts"
,
"./vs/workbench/services/commands/common/commandService.ts"
,
...
...
@@ -536,6 +544,7 @@
"./vs/workbench/services/progress/common/progress.ts"
,
"./vs/workbench/services/scm/common/scm.ts"
,
"./vs/workbench/services/scm/common/scmService.ts"
,
"./vs/workbench/services/search/node/legacy/search.ts"
,
"./vs/workbench/services/search/node/search.ts"
,
"./vs/workbench/services/search/node/searchHistoryService.ts"
,
"./vs/workbench/services/search/node/searchIpc.ts"
,
...
...
src/vs/base/node/encoding.ts
浏览文件 @
0ce7badd
...
...
@@ -63,7 +63,7 @@ export function toDecodeStream(readable: Readable, options: IDecodeStreamOptions
// waiting for the decoder to be ready
this
.
_decodeStreamConstruction
.
then
(
_
=>
callback
(),
err
=>
callback
(
err
));
}
else
if
(
this
.
_bytesBuffered
>=
options
.
minBytesRequiredForDetection
)
{
}
else
if
(
t
ypeof
options
.
minBytesRequiredForDetection
===
'
number
'
&&
t
his
.
_bytesBuffered
>=
options
.
minBytesRequiredForDetection
)
{
// buffered enough data, create stream and forward data
this
.
_startDecodeStream
(
callback
);
...
...
src/vs/base/node/ps.ts
浏览文件 @
0ce7badd
...
...
@@ -137,14 +137,14 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
windowsProcessTree
.
getProcessCpuUsage
(
processList
,
(
completeProcessList
)
=>
{
const
processItems
:
Map
<
number
,
ProcessItem
>
=
new
Map
();
completeProcessList
.
forEach
(
process
=>
{
const
commandLine
=
cleanUNCPrefix
(
process
.
commandLine
);
const
commandLine
=
cleanUNCPrefix
(
process
.
commandLine
||
''
);
processItems
.
set
(
process
.
pid
,
{
name
:
findName
(
commandLine
),
cmd
:
commandLine
,
pid
:
process
.
pid
,
ppid
:
process
.
ppid
,
load
:
process
.
cpu
,
mem
:
process
.
memory
load
:
process
.
cpu
||
0
,
mem
:
process
.
memory
||
0
});
});
...
...
@@ -197,9 +197,11 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
const
pids
:
number
[]
=
[];
while
(
processes
.
length
)
{
const
process
=
processes
.
shift
();
pids
.
push
(
process
.
pid
);
if
(
process
.
children
)
{
processes
=
processes
.
concat
(
process
.
children
);
if
(
process
)
{
pids
.
push
(
process
.
pid
);
if
(
process
.
children
)
{
processes
=
processes
.
concat
(
process
.
children
);
}
}
}
...
...
src/vs/base/parts/ipc/node/ipc.cp.ts
浏览文件 @
0ce7badd
...
...
@@ -22,7 +22,13 @@ import * as errors from 'vs/base/common/errors';
export
class
Server
extends
IPCServer
{
constructor
()
{
super
({
send
:
r
=>
{
try
{
process
.
send
(
r
.
toString
(
'
base64
'
));
}
catch
(
e
)
{
/* not much to do */
}
},
send
:
r
=>
{
try
{
if
(
process
.
send
)
{
process
.
send
(
r
.
toString
(
'
base64
'
));
}
}
catch
(
e
)
{
/* not much to do */
}
},
onMessage
:
fromNodeEventEmitter
(
process
,
'
message
'
,
msg
=>
Buffer
.
from
(
msg
,
'
base64
'
))
});
...
...
@@ -81,8 +87,8 @@ export class Client implements IChannelClient, IDisposable {
private
disposeDelayer
:
Delayer
<
void
>
;
private
activeRequests
=
new
Set
<
IDisposable
>
();
private
child
:
ChildProcess
;
private
_client
:
IPCClient
;
private
child
:
ChildProcess
|
null
;
private
_client
:
IPCClient
|
null
;
private
channels
=
new
Map
<
string
,
IChannel
>
();
private
_onDidProcessExit
=
new
Emitter
<
{
code
:
number
,
signal
:
string
}
>
();
...
...
@@ -200,7 +206,7 @@ export class Client implements IChannelClient, IDisposable {
// Handle remote console logs specially
if
(
isRemoteConsoleLog
(
msg
))
{
log
(
msg
,
`IPC Library:
${
this
.
options
.
serverName
}
`
);
return
null
;
return
;
}
// Anything else goes to the outside
...
...
@@ -253,8 +259,10 @@ export class Client implements IChannelClient, IDisposable {
private
disposeClient
()
{
if
(
this
.
_client
)
{
this
.
child
.
kill
();
this
.
child
=
null
;
if
(
this
.
child
)
{
this
.
child
.
kill
();
this
.
child
=
null
;
}
this
.
_client
=
null
;
this
.
channels
.
clear
();
}
...
...
@@ -263,7 +271,7 @@ export class Client implements IChannelClient, IDisposable {
dispose
()
{
this
.
_onDidProcessExit
.
dispose
();
this
.
disposeDelayer
.
cancel
();
this
.
disposeDelayer
=
null
;
this
.
disposeDelayer
=
null
!
;
// StrictNullOverride: nulling out ok in dispose
this
.
disposeClient
();
this
.
activeRequests
.
clear
();
}
...
...
src/vs/platform/actions/common/menu.ts
浏览文件 @
0ce7badd
...
...
@@ -27,17 +27,17 @@ export class Menu implements IMenu {
const
menuItems
=
MenuRegistry
.
getMenuItems
(
id
);
const
keysFilter
=
new
Set
<
string
>
();
let
group
:
MenuItemGroup
;
let
group
:
MenuItemGroup
|
undefined
;
menuItems
.
sort
(
Menu
.
_compareMenuItems
);
for
(
let
item
of
menuItems
)
{
// group by groupId
const
groupName
=
item
.
group
;
if
(
!
group
||
group
[
0
]
!==
groupName
)
{
group
=
[
groupName
,
[]];
group
=
[
groupName
||
''
,
[]];
this
.
_menuGroups
.
push
(
group
);
}
group
[
1
].
push
(
item
);
group
!
[
1
].
push
(
item
);
// keep keys for eventing
Menu
.
_fillInKbExprKeys
(
item
.
when
,
keysFilter
);
...
...
@@ -79,7 +79,7 @@ export class Menu implements IMenu {
const
[
id
,
items
]
=
group
;
const
activeActions
:
(
MenuItemAction
|
SubmenuItemAction
)[]
=
[];
for
(
const
item
of
items
)
{
if
(
this
.
_contextKeyService
.
contextMatchesRules
(
item
.
when
))
{
if
(
this
.
_contextKeyService
.
contextMatchesRules
(
item
.
when
||
null
))
{
const
action
=
isIMenuItem
(
item
)
?
new
MenuItemAction
(
item
.
command
,
item
.
alt
,
options
,
this
.
_contextKeyService
,
this
.
_commandService
)
:
new
SubmenuItemAction
(
item
);
activeActions
.
push
(
action
);
}
...
...
@@ -91,7 +91,7 @@ export class Menu implements IMenu {
return
result
;
}
private
static
_fillInKbExprKeys
(
exp
:
ContextKeyExpr
,
set
:
Set
<
string
>
):
void
{
private
static
_fillInKbExprKeys
(
exp
:
ContextKeyExpr
|
undefined
,
set
:
Set
<
string
>
):
void
{
if
(
exp
)
{
for
(
let
key
of
exp
.
keys
())
{
set
.
add
(
key
);
...
...
src/vs/platform/configuration/common/configurationModels.ts
浏览文件 @
0ce7badd
...
...
@@ -320,8 +320,8 @@ export class Configuration {
inspect
<
C
>
(
key
:
string
,
overrides
:
IConfigurationOverrides
,
workspace
:
Workspace
):
{
default
:
C
,
user
:
C
,
workspace
:
C
,
workspaceFolder
:
C
workspace
?
:
C
,
workspaceFolder
?
:
C
memory
?:
C
value
:
C
,
}
{
...
...
@@ -344,7 +344,7 @@ export class Configuration {
workspace
:
string
[];
workspaceFolder
:
string
[];
}
{
const
folderConfigurationModel
=
this
.
getFolderConfigurationModelForResource
(
null
,
workspace
);
const
folderConfigurationModel
=
this
.
getFolderConfigurationModelForResource
(
undefined
,
workspace
);
return
{
default
:
this
.
_defaultConfiguration
.
freeze
().
keys
,
user
:
this
.
_userConfiguration
.
freeze
().
keys
,
...
...
@@ -447,7 +447,7 @@ export class Configuration {
return
folderConsolidatedConfiguration
;
}
private
getFolderConfigurationModelForResource
(
resource
:
URI
,
workspace
:
Workspace
):
ConfigurationMode
l
{
private
getFolderConfigurationModelForResource
(
resource
:
URI
|
undefined
,
workspace
:
Workspace
):
ConfigurationModel
|
nul
l
{
if
(
workspace
&&
resource
)
{
const
root
=
workspace
.
getFolder
(
resource
);
if
(
root
)
{
...
...
src/vs/workbench/parts/search/common/queryBuilder.ts
浏览文件 @
0ce7badd
...
...
@@ -86,7 +86,7 @@ export class QueryBuilder {
};
}
file
(
folderResources
?:
uri
[],
options
?
:
IFileQueryBuilderOptions
):
IFileQuery
{
file
(
folderResources
:
uri
[]
|
undefined
,
options
:
IFileQueryBuilderOptions
):
IFileQuery
{
const
commonQuery
=
this
.
commonQuery
(
folderResources
,
options
);
return
<
IFileQuery
>
{
...
commonQuery
,
...
...
@@ -101,8 +101,8 @@ export class QueryBuilder {
}
private
commonQuery
(
folderResources
?:
uri
[],
options
:
ICommonQueryBuilderOptions
=
{}):
ICommonQueryProps
<
uri
>
{
let
{
searchPaths
,
pattern
:
includePattern
}
=
this
.
parseSearchPaths
(
options
.
includePattern
);
let
excludePattern
=
this
.
parseExcludePattern
(
options
.
excludePattern
);
let
{
searchPaths
,
pattern
:
includePattern
}
=
this
.
parseSearchPaths
(
options
.
includePattern
||
''
);
let
excludePattern
=
this
.
parseExcludePattern
(
options
.
excludePattern
||
''
);
// Build folderQueries from searchPaths, if given, otherwise folderResources
let
folderQueries
=
folderResources
&&
folderResources
.
map
(
uri
=>
this
.
getFolderQueryForRoot
(
uri
,
options
));
...
...
@@ -153,7 +153,7 @@ export class QueryBuilder {
}
}
return
contentPattern
.
isCaseSensitive
;
return
!!
contentPattern
.
isCaseSensitive
;
}
private
isMultiline
(
contentPattern
:
IPatternInfo
):
boolean
{
...
...
@@ -364,7 +364,7 @@ function splitGlobFromPath(searchPath: string): { pathPortion: string, globPorti
return
{
pathPortion
,
globPortion
:
searchPath
.
substr
(
lastSlashMatch
.
index
+
1
)
globPortion
:
searchPath
.
substr
(
(
lastSlashMatch
.
index
||
0
)
+
1
)
};
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录