Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
7970f2a7
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,发现更多精彩内容 >>
提交
7970f2a7
编写于
12月 10, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Strict null check window and storageipc
上级
461366c8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
53 addition
and
51 deletion
+53
-51
src/tsconfig.strictNullChecks.json
src/tsconfig.strictNullChecks.json
+2
-0
src/vs/platform/history/common/history.ts
src/vs/platform/history/common/history.ts
+1
-1
src/vs/platform/storage/node/storageIpc.ts
src/vs/platform/storage/node/storageIpc.ts
+1
-1
src/vs/platform/windows/common/windows.ts
src/vs/platform/windows/common/windows.ts
+6
-6
src/vs/platform/windows/electron-browser/windowService.ts
src/vs/platform/windows/electron-browser/windowService.ts
+3
-3
src/vs/platform/windows/electron-main/windowsService.ts
src/vs/platform/windows/electron-main/windowsService.ts
+40
-40
未找到文件。
src/tsconfig.strictNullChecks.json
浏览文件 @
7970f2a7
...
@@ -506,6 +506,7 @@
...
@@ -506,6 +506,7 @@
"./vs/platform/state/node/stateService.ts"
,
"./vs/platform/state/node/stateService.ts"
,
"./vs/platform/statusbar/common/statusbar.ts"
,
"./vs/platform/statusbar/common/statusbar.ts"
,
"./vs/platform/storage/common/storage.ts"
,
"./vs/platform/storage/common/storage.ts"
,
"./vs/platform/storage/node/storageIpc.ts"
,
"./vs/platform/storage/node/storageMainService.ts"
,
"./vs/platform/storage/node/storageMainService.ts"
,
"./vs/platform/storage/node/storageService.ts"
,
"./vs/platform/storage/node/storageService.ts"
,
"./vs/platform/telemetry/browser/errorTelemetry.ts"
,
"./vs/platform/telemetry/browser/errorTelemetry.ts"
,
...
@@ -537,6 +538,7 @@
...
@@ -537,6 +538,7 @@
"./vs/platform/windows/common/windows.ts"
,
"./vs/platform/windows/common/windows.ts"
,
"./vs/platform/windows/electron-browser/windowService.ts"
,
"./vs/platform/windows/electron-browser/windowService.ts"
,
"./vs/platform/windows/electron-main/windows.ts"
,
"./vs/platform/windows/electron-main/windows.ts"
,
"./vs/platform/windows/electron-main/windowsService.ts"
,
"./vs/platform/windows/node/windowsIpc.ts"
,
"./vs/platform/windows/node/windowsIpc.ts"
,
"./vs/platform/workbench/common/contextkeys.ts"
,
"./vs/platform/workbench/common/contextkeys.ts"
,
"./vs/platform/workspace/common/workspace.ts"
,
"./vs/platform/workspace/common/workspace.ts"
,
...
...
src/vs/platform/history/common/history.ts
浏览文件 @
7970f2a7
...
@@ -21,7 +21,7 @@ export interface IHistoryMainService {
...
@@ -21,7 +21,7 @@ export interface IHistoryMainService {
onRecentlyOpenedChange
:
CommonEvent
<
void
>
;
onRecentlyOpenedChange
:
CommonEvent
<
void
>
;
addRecentlyOpened
(
workspaces
:
(
IWorkspaceIdentifier
|
ISingleFolderWorkspaceIdentifier
)[],
files
:
URI
[]):
void
;
addRecentlyOpened
(
workspaces
:
undefined
|
(
IWorkspaceIdentifier
|
ISingleFolderWorkspaceIdentifier
)[],
files
:
URI
[]):
void
;
getRecentlyOpened
(
currentWorkspace
?:
IWorkspaceIdentifier
|
ISingleFolderWorkspaceIdentifier
,
currentFiles
?:
IPath
[]):
IRecentlyOpened
;
getRecentlyOpened
(
currentWorkspace
?:
IWorkspaceIdentifier
|
ISingleFolderWorkspaceIdentifier
,
currentFiles
?:
IPath
[]):
IRecentlyOpened
;
removeFromRecentlyOpened
(
paths
:
(
IWorkspaceIdentifier
|
ISingleFolderWorkspaceIdentifier
|
URI
|
string
)[]):
void
;
removeFromRecentlyOpened
(
paths
:
(
IWorkspaceIdentifier
|
ISingleFolderWorkspaceIdentifier
|
URI
|
string
)[]):
void
;
clearRecentlyOpened
():
void
;
clearRecentlyOpened
():
void
;
...
...
src/vs/platform/storage/node/storageIpc.ts
浏览文件 @
7970f2a7
...
@@ -57,7 +57,7 @@ export class GlobalStorageDatabaseChannel extends Disposable implements IServerC
...
@@ -57,7 +57,7 @@ export class GlobalStorageDatabaseChannel extends Disposable implements IServerC
private
serializeEvents
(
events
:
IStorageChangeEvent
[]):
ISerializableItemsChangeEvent
{
private
serializeEvents
(
events
:
IStorageChangeEvent
[]):
ISerializableItemsChangeEvent
{
const
items
=
new
Map
<
Key
,
Value
>
();
const
items
=
new
Map
<
Key
,
Value
>
();
events
.
forEach
(
event
=>
items
.
set
(
event
.
key
,
this
.
storageMainService
.
get
(
event
.
key
,
null
)));
events
.
forEach
(
event
=>
items
.
set
(
event
.
key
,
this
.
storageMainService
.
get
(
event
.
key
,
''
)));
return
{
items
:
mapToSerializable
(
items
)
}
as
ISerializableItemsChangeEvent
;
return
{
items
:
mapToSerializable
(
items
)
}
as
ISerializableItemsChangeEvent
;
}
}
...
...
src/vs/platform/windows/common/windows.ts
浏览文件 @
7970f2a7
...
@@ -115,9 +115,9 @@ export interface IWindowsService {
...
@@ -115,9 +115,9 @@ export interface IWindowsService {
openDevTools
(
windowId
:
number
,
options
?:
IDevToolsOptions
):
TPromise
<
void
>
;
openDevTools
(
windowId
:
number
,
options
?:
IDevToolsOptions
):
TPromise
<
void
>
;
toggleDevTools
(
windowId
:
number
):
TPromise
<
void
>
;
toggleDevTools
(
windowId
:
number
):
TPromise
<
void
>
;
closeWorkspace
(
windowId
:
number
):
TPromise
<
void
>
;
closeWorkspace
(
windowId
:
number
):
TPromise
<
void
>
;
enterWorkspace
(
windowId
:
number
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
;
enterWorkspace
(
windowId
:
number
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
;
createAndEnterWorkspace
(
windowId
:
number
,
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
>
;
createAndEnterWorkspace
(
windowId
:
number
,
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
;
saveAndEnterWorkspace
(
windowId
:
number
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
;
saveAndEnterWorkspace
(
windowId
:
number
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
;
toggleFullScreen
(
windowId
:
number
):
TPromise
<
void
>
;
toggleFullScreen
(
windowId
:
number
):
TPromise
<
void
>
;
setRepresentedFilename
(
windowId
:
number
,
fileName
:
string
):
TPromise
<
void
>
;
setRepresentedFilename
(
windowId
:
number
,
fileName
:
string
):
TPromise
<
void
>
;
addRecentlyOpened
(
files
:
URI
[]):
TPromise
<
void
>
;
addRecentlyOpened
(
files
:
URI
[]):
TPromise
<
void
>
;
...
@@ -199,9 +199,9 @@ export interface IWindowService {
...
@@ -199,9 +199,9 @@ export interface IWindowService {
toggleDevTools
():
TPromise
<
void
>
;
toggleDevTools
():
TPromise
<
void
>
;
closeWorkspace
():
TPromise
<
void
>
;
closeWorkspace
():
TPromise
<
void
>
;
updateTouchBar
(
items
:
ISerializableCommandAction
[][]):
TPromise
<
void
>
;
updateTouchBar
(
items
:
ISerializableCommandAction
[][]):
TPromise
<
void
>
;
enterWorkspace
(
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
;
enterWorkspace
(
path
:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
;
createAndEnterWorkspace
(
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
>
;
createAndEnterWorkspace
(
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
;
saveAndEnterWorkspace
(
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
;
saveAndEnterWorkspace
(
path
:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
;
toggleFullScreen
():
TPromise
<
void
>
;
toggleFullScreen
():
TPromise
<
void
>
;
setRepresentedFilename
(
fileName
:
string
):
TPromise
<
void
>
;
setRepresentedFilename
(
fileName
:
string
):
TPromise
<
void
>
;
getRecentlyOpened
():
TPromise
<
IRecentlyOpened
>
;
getRecentlyOpened
():
TPromise
<
IRecentlyOpened
>
;
...
...
src/vs/platform/windows/electron-browser/windowService.ts
浏览文件 @
7970f2a7
...
@@ -90,15 +90,15 @@ export class WindowService extends Disposable implements IWindowService {
...
@@ -90,15 +90,15 @@ export class WindowService extends Disposable implements IWindowService {
return
this
.
windowsService
.
closeWorkspace
(
this
.
windowId
);
return
this
.
windowsService
.
closeWorkspace
(
this
.
windowId
);
}
}
enterWorkspace
(
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
enterWorkspace
(
path
:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
{
return
this
.
windowsService
.
enterWorkspace
(
this
.
windowId
,
path
);
return
this
.
windowsService
.
enterWorkspace
(
this
.
windowId
,
path
);
}
}
createAndEnterWorkspace
(
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
createAndEnterWorkspace
(
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
{
return
this
.
windowsService
.
createAndEnterWorkspace
(
this
.
windowId
,
folders
,
path
);
return
this
.
windowsService
.
createAndEnterWorkspace
(
this
.
windowId
,
folders
,
path
);
}
}
saveAndEnterWorkspace
(
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
saveAndEnterWorkspace
(
path
:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
{
return
this
.
windowsService
.
saveAndEnterWorkspace
(
this
.
windowId
,
path
);
return
this
.
windowsService
.
saveAndEnterWorkspace
(
this
.
windowId
,
path
);
}
}
...
...
src/vs/platform/windows/electron-main/windowsService.ts
浏览文件 @
7970f2a7
...
@@ -64,28 +64,28 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -64,28 +64,28 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
this
.
logService
.
trace
(
'
windowsService#pickFileFolderAndOpen
'
);
this
.
logService
.
trace
(
'
windowsService#pickFileFolderAndOpen
'
);
this
.
windowsMainService
.
pickFileFolderAndOpen
(
options
);
this
.
windowsMainService
.
pickFileFolderAndOpen
(
options
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
pickFileAndOpen
(
options
:
INativeOpenDialogOptions
):
TPromise
<
void
>
{
pickFileAndOpen
(
options
:
INativeOpenDialogOptions
):
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#pickFileAndOpen
'
);
this
.
logService
.
trace
(
'
windowsService#pickFileAndOpen
'
);
this
.
windowsMainService
.
pickFileAndOpen
(
options
);
this
.
windowsMainService
.
pickFileAndOpen
(
options
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
pickFolderAndOpen
(
options
:
INativeOpenDialogOptions
):
TPromise
<
void
>
{
pickFolderAndOpen
(
options
:
INativeOpenDialogOptions
):
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#pickFolderAndOpen
'
);
this
.
logService
.
trace
(
'
windowsService#pickFolderAndOpen
'
);
this
.
windowsMainService
.
pickFolderAndOpen
(
options
);
this
.
windowsMainService
.
pickFolderAndOpen
(
options
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
pickWorkspaceAndOpen
(
options
:
INativeOpenDialogOptions
):
TPromise
<
void
>
{
pickWorkspaceAndOpen
(
options
:
INativeOpenDialogOptions
):
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#pickWorkspaceAndOpen
'
);
this
.
logService
.
trace
(
'
windowsService#pickWorkspaceAndOpen
'
);
this
.
windowsMainService
.
pickWorkspaceAndOpen
(
options
);
this
.
windowsMainService
.
pickWorkspaceAndOpen
(
options
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
showMessageBox
(
windowId
:
number
,
options
:
Electron
.
MessageBoxOptions
):
Thenable
<
IMessageBoxResult
>
{
showMessageBox
(
windowId
:
number
,
options
:
Electron
.
MessageBoxOptions
):
Thenable
<
IMessageBoxResult
>
{
...
@@ -117,7 +117,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -117,7 +117,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
this
.
windowsMainService
.
reload
(
codeWindow
,
args
);
this
.
windowsMainService
.
reload
(
codeWindow
,
args
);
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
openDevTools
(
windowId
:
number
,
options
?:
IDevToolsOptions
):
TPromise
<
void
>
{
openDevTools
(
windowId
:
number
,
options
?:
IDevToolsOptions
):
TPromise
<
void
>
{
...
@@ -128,7 +128,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -128,7 +128,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
win
.
webContents
.
openDevTools
(
options
);
codeWindow
.
win
.
webContents
.
openDevTools
(
options
);
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
toggleDevTools
(
windowId
:
number
):
TPromise
<
void
>
{
toggleDevTools
(
windowId
:
number
):
TPromise
<
void
>
{
...
@@ -144,7 +144,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -144,7 +144,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
}
}
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
updateTouchBar
(
windowId
:
number
,
items
:
ISerializableCommandAction
[][]):
TPromise
<
void
>
{
updateTouchBar
(
windowId
:
number
,
items
:
ISerializableCommandAction
[][]):
TPromise
<
void
>
{
...
@@ -155,7 +155,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -155,7 +155,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
updateTouchBar
(
items
);
codeWindow
.
updateTouchBar
(
items
);
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
closeWorkspace
(
windowId
:
number
):
TPromise
<
void
>
{
closeWorkspace
(
windowId
:
number
):
TPromise
<
void
>
{
...
@@ -166,10 +166,10 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -166,10 +166,10 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
this
.
windowsMainService
.
closeWorkspace
(
codeWindow
);
this
.
windowsMainService
.
closeWorkspace
(
codeWindow
);
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
enterWorkspace
(
windowId
:
number
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
enterWorkspace
(
windowId
:
number
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
{
this
.
logService
.
trace
(
'
windowsService#enterWorkspace
'
,
windowId
);
this
.
logService
.
trace
(
'
windowsService#enterWorkspace
'
,
windowId
);
const
codeWindow
=
this
.
windowsMainService
.
getWindowById
(
windowId
);
const
codeWindow
=
this
.
windowsMainService
.
getWindowById
(
windowId
);
...
@@ -177,10 +177,10 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -177,10 +177,10 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
return
this
.
windowsMainService
.
enterWorkspace
(
codeWindow
,
path
);
return
this
.
windowsMainService
.
enterWorkspace
(
codeWindow
,
path
);
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
createAndEnterWorkspace
(
windowId
:
number
,
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
createAndEnterWorkspace
(
windowId
:
number
,
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
{
this
.
logService
.
trace
(
'
windowsService#createAndEnterWorkspace
'
,
windowId
);
this
.
logService
.
trace
(
'
windowsService#createAndEnterWorkspace
'
,
windowId
);
const
codeWindow
=
this
.
windowsMainService
.
getWindowById
(
windowId
);
const
codeWindow
=
this
.
windowsMainService
.
getWindowById
(
windowId
);
...
@@ -188,10 +188,10 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -188,10 +188,10 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
return
this
.
windowsMainService
.
createAndEnterWorkspace
(
codeWindow
,
folders
,
path
);
return
this
.
windowsMainService
.
createAndEnterWorkspace
(
codeWindow
,
folders
,
path
);
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
saveAndEnterWorkspace
(
windowId
:
number
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
saveAndEnterWorkspace
(
windowId
:
number
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
|
undefined
>
{
this
.
logService
.
trace
(
'
windowsService#saveAndEnterWorkspace
'
,
windowId
);
this
.
logService
.
trace
(
'
windowsService#saveAndEnterWorkspace
'
,
windowId
);
const
codeWindow
=
this
.
windowsMainService
.
getWindowById
(
windowId
);
const
codeWindow
=
this
.
windowsMainService
.
getWindowById
(
windowId
);
...
@@ -199,7 +199,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -199,7 +199,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
return
this
.
windowsMainService
.
saveAndEnterWorkspace
(
codeWindow
,
path
);
return
this
.
windowsMainService
.
saveAndEnterWorkspace
(
codeWindow
,
path
);
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
toggleFullScreen
(
windowId
:
number
):
TPromise
<
void
>
{
toggleFullScreen
(
windowId
:
number
):
TPromise
<
void
>
{
...
@@ -210,7 +210,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -210,7 +210,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
toggleFullScreen
();
codeWindow
.
toggleFullScreen
();
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
setRepresentedFilename
(
windowId
:
number
,
fileName
:
string
):
TPromise
<
void
>
{
setRepresentedFilename
(
windowId
:
number
,
fileName
:
string
):
TPromise
<
void
>
{
...
@@ -221,28 +221,28 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -221,28 +221,28 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
setRepresentedFilename
(
fileName
);
codeWindow
.
setRepresentedFilename
(
fileName
);
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
addRecentlyOpened
(
files
:
URI
[]):
TPromise
<
void
>
{
addRecentlyOpened
(
files
:
URI
[]):
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#addRecentlyOpened
'
);
this
.
logService
.
trace
(
'
windowsService#addRecentlyOpened
'
);
this
.
historyService
.
addRecentlyOpened
(
void
0
,
files
);
this
.
historyService
.
addRecentlyOpened
(
void
0
,
files
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
removeFromRecentlyOpened
(
paths
:
(
IWorkspaceIdentifier
|
ISingleFolderWorkspaceIdentifier
|
URI
|
string
)[]):
TPromise
<
void
>
{
removeFromRecentlyOpened
(
paths
:
(
IWorkspaceIdentifier
|
ISingleFolderWorkspaceIdentifier
|
URI
|
string
)[]):
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#removeFromRecentlyOpened
'
);
this
.
logService
.
trace
(
'
windowsService#removeFromRecentlyOpened
'
);
this
.
historyService
.
removeFromRecentlyOpened
(
paths
);
this
.
historyService
.
removeFromRecentlyOpened
(
paths
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
clearRecentlyOpened
():
TPromise
<
void
>
{
clearRecentlyOpened
():
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#clearRecentlyOpened
'
);
this
.
logService
.
trace
(
'
windowsService#clearRecentlyOpened
'
);
this
.
historyService
.
clearRecentlyOpened
();
this
.
historyService
.
clearRecentlyOpened
();
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
getRecentlyOpened
(
windowId
:
number
):
TPromise
<
IRecentlyOpened
>
{
getRecentlyOpened
(
windowId
:
number
):
TPromise
<
IRecentlyOpened
>
{
...
@@ -307,7 +307,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -307,7 +307,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
win
.
focus
();
codeWindow
.
win
.
focus
();
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
closeWindow
(
windowId
:
number
):
TPromise
<
void
>
{
closeWindow
(
windowId
:
number
):
TPromise
<
void
>
{
...
@@ -318,7 +318,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -318,7 +318,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
win
.
close
();
codeWindow
.
win
.
close
();
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
isFocused
(
windowId
:
number
):
TPromise
<
boolean
>
{
isFocused
(
windowId
:
number
):
TPromise
<
boolean
>
{
...
@@ -329,7 +329,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -329,7 +329,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
return
TPromise
.
as
(
codeWindow
.
win
.
isFocused
());
return
TPromise
.
as
(
codeWindow
.
win
.
isFocused
());
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
false
);
}
}
isMaximized
(
windowId
:
number
):
TPromise
<
boolean
>
{
isMaximized
(
windowId
:
number
):
TPromise
<
boolean
>
{
...
@@ -340,7 +340,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -340,7 +340,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
return
TPromise
.
as
(
codeWindow
.
win
.
isMaximized
());
return
TPromise
.
as
(
codeWindow
.
win
.
isMaximized
());
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
false
);
}
}
maximizeWindow
(
windowId
:
number
):
TPromise
<
void
>
{
maximizeWindow
(
windowId
:
number
):
TPromise
<
void
>
{
...
@@ -351,7 +351,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -351,7 +351,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
win
.
maximize
();
codeWindow
.
win
.
maximize
();
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
unmaximizeWindow
(
windowId
:
number
):
TPromise
<
void
>
{
unmaximizeWindow
(
windowId
:
number
):
TPromise
<
void
>
{
...
@@ -362,7 +362,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -362,7 +362,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
win
.
unmaximize
();
codeWindow
.
win
.
unmaximize
();
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
minimizeWindow
(
windowId
:
number
):
TPromise
<
void
>
{
minimizeWindow
(
windowId
:
number
):
TPromise
<
void
>
{
...
@@ -373,7 +373,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -373,7 +373,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
win
.
minimize
();
codeWindow
.
win
.
minimize
();
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
onWindowTitleDoubleClick
(
windowId
:
number
):
TPromise
<
void
>
{
onWindowTitleDoubleClick
(
windowId
:
number
):
TPromise
<
void
>
{
...
@@ -384,7 +384,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -384,7 +384,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
onWindowTitleDoubleClick
();
codeWindow
.
onWindowTitleDoubleClick
();
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
setDocumentEdited
(
windowId
:
number
,
flag
:
boolean
):
TPromise
<
void
>
{
setDocumentEdited
(
windowId
:
number
,
flag
:
boolean
):
TPromise
<
void
>
{
...
@@ -395,13 +395,13 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -395,13 +395,13 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
win
.
setDocumentEdited
(
flag
);
codeWindow
.
win
.
setDocumentEdited
(
flag
);
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
openWindow
(
windowId
:
number
,
paths
:
URI
[],
options
?:
{
forceNewWindow
?:
boolean
,
forceReuseWindow
?:
boolean
,
forceOpenWorkspaceAsFile
?:
boolean
,
args
?:
ParsedArgs
}):
TPromise
<
void
>
{
openWindow
(
windowId
:
number
,
paths
:
URI
[],
options
?:
{
forceNewWindow
?:
boolean
,
forceReuseWindow
?:
boolean
,
forceOpenWorkspaceAsFile
?:
boolean
,
args
?:
ParsedArgs
}):
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#openWindow
'
);
this
.
logService
.
trace
(
'
windowsService#openWindow
'
);
if
(
!
paths
||
!
paths
.
length
)
{
if
(
!
paths
||
!
paths
.
length
)
{
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
this
.
windowsMainService
.
open
({
this
.
windowsMainService
.
open
({
...
@@ -414,7 +414,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -414,7 +414,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
forceOpenWorkspaceAsFile
:
options
&&
options
.
forceOpenWorkspaceAsFile
forceOpenWorkspaceAsFile
:
options
&&
options
.
forceOpenWorkspaceAsFile
});
});
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
openNewWindow
(
options
?:
INewWindowOptions
):
TPromise
<
void
>
{
openNewWindow
(
options
?:
INewWindowOptions
):
TPromise
<
void
>
{
...
@@ -422,7 +422,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -422,7 +422,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
this
.
windowsMainService
.
openNewWindow
(
OpenContext
.
API
,
options
);
this
.
windowsMainService
.
openNewWindow
(
OpenContext
.
API
,
options
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
showWindow
(
windowId
:
number
):
TPromise
<
void
>
{
showWindow
(
windowId
:
number
):
TPromise
<
void
>
{
...
@@ -433,7 +433,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -433,7 +433,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
codeWindow
.
win
.
show
();
codeWindow
.
win
.
show
();
}
}
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
getWindows
():
TPromise
<
{
id
:
number
;
workspace
?:
IWorkspaceIdentifier
;
folderUri
?:
ISingleFolderWorkspaceIdentifier
;
title
:
string
;
filename
?:
string
;
}[]
>
{
getWindows
():
TPromise
<
{
id
:
number
;
workspace
?:
IWorkspaceIdentifier
;
folderUri
?:
ISingleFolderWorkspaceIdentifier
;
title
:
string
;
filename
?:
string
;
}[]
>
{
...
@@ -451,13 +451,13 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -451,13 +451,13 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
log
(
severity
:
string
,
...
messages
:
string
[]):
TPromise
<
void
>
{
log
(
severity
:
string
,
...
messages
:
string
[]):
TPromise
<
void
>
{
console
[
severity
].
apply
(
console
,
...
messages
);
console
[
severity
].
apply
(
console
,
...
messages
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
showItemInFolder
(
path
:
string
):
TPromise
<
void
>
{
showItemInFolder
(
path
:
string
):
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#showItemInFolder
'
);
this
.
logService
.
trace
(
'
windowsService#showItemInFolder
'
);
shell
.
showItemInFolder
(
path
);
shell
.
showItemInFolder
(
path
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
getActiveWindowId
():
TPromise
<
number
|
undefined
>
{
getActiveWindowId
():
TPromise
<
number
|
undefined
>
{
...
@@ -472,20 +472,20 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -472,20 +472,20 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
startCrashReporter
(
config
:
Electron
.
CrashReporterStartOptions
):
TPromise
<
void
>
{
startCrashReporter
(
config
:
Electron
.
CrashReporterStartOptions
):
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#startCrashReporter
'
);
this
.
logService
.
trace
(
'
windowsService#startCrashReporter
'
);
crashReporter
.
start
(
config
);
crashReporter
.
start
(
config
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
quit
():
TPromise
<
void
>
{
quit
():
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#quit
'
);
this
.
logService
.
trace
(
'
windowsService#quit
'
);
this
.
windowsMainService
.
quit
();
this
.
windowsMainService
.
quit
();
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
relaunch
(
options
:
{
addArgs
?:
string
[],
removeArgs
?:
string
[]
}):
TPromise
<
void
>
{
relaunch
(
options
:
{
addArgs
?:
string
[],
removeArgs
?:
string
[]
}):
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#relaunch
'
);
this
.
logService
.
trace
(
'
windowsService#relaunch
'
);
this
.
lifecycleService
.
relaunch
(
options
);
this
.
lifecycleService
.
relaunch
(
options
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
whenSharedProcessReady
():
TPromise
<
void
>
{
whenSharedProcessReady
():
TPromise
<
void
>
{
...
@@ -496,7 +496,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -496,7 +496,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
toggleSharedProcess
():
TPromise
<
void
>
{
toggleSharedProcess
():
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#toggleSharedProcess
'
);
this
.
logService
.
trace
(
'
windowsService#toggleSharedProcess
'
);
this
.
sharedProcess
.
toggle
();
this
.
sharedProcess
.
toggle
();
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
openAboutDialog
():
TPromise
<
void
>
{
openAboutDialog
():
TPromise
<
void
>
{
...
@@ -544,7 +544,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
...
@@ -544,7 +544,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
}
}
});
});
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
void
0
);
}
}
handleURL
(
uri
:
URI
):
TPromise
<
boolean
>
{
handleURL
(
uri
:
URI
):
TPromise
<
boolean
>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录