Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
7f450765
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,体验更适合开发者的 AI 搜索 >>
提交
7f450765
编写于
3月 09, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - codewindow => icodewindow
上级
438bfd31
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
70 addition
and
54 deletion
+70
-54
src/vs/code/electron-main/window.ts
src/vs/code/electron-main/window.ts
+1
-17
src/vs/code/electron-main/windows.ts
src/vs/code/electron-main/windows.ts
+37
-37
src/vs/platform/windows/electron-main/windows.ts
src/vs/platform/windows/electron-main/windows.ts
+32
-0
未找到文件。
src/vs/code/electron-main/window.ts
浏览文件 @
7f450765
...
...
@@ -20,35 +20,19 @@ import product from 'vs/platform/node/product';
import
{
IWindowSettings
,
MenuBarVisibility
,
IWindowConfiguration
,
ReadyState
,
IRunActionInWindowRequest
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
isLinux
,
isMacintosh
,
isWindows
}
from
'
vs/base/common/platform
'
;
import
{
ICodeWindow
}
from
'
vs/platform/windows/electron-main/windows
'
;
import
{
ICodeWindow
,
IWindowState
,
WindowMode
}
from
'
vs/platform/windows/electron-main/windows
'
;
import
{
IWorkspaceIdentifier
,
IWorkspacesMainService
}
from
'
vs/platform/workspaces/common/workspaces
'
;
import
{
IBackupMainService
}
from
'
vs/platform/backup/common/backup
'
;
import
{
ICommandAction
}
from
'
vs/platform/actions/common/actions
'
;
import
{
mark
,
exportEntries
}
from
'
vs/base/common/performance
'
;
import
{
resolveMarketplaceHeaders
}
from
'
vs/platform/extensionManagement/node/extensionGalleryService
'
;
export
interface
IWindowState
{
width
?:
number
;
height
?:
number
;
x
?:
number
;
y
?:
number
;
mode
?:
WindowMode
;
display
?:
number
;
}
export
interface
IWindowCreationOptions
{
state
:
IWindowState
;
extensionDevelopmentPath
?:
string
;
isExtensionTestHost
?:
boolean
;
}
export
enum
WindowMode
{
Maximized
,
Normal
,
Minimized
,
// not used anymore, but also cannot remove due to existing stored UI state (needs migration)
Fullscreen
}
export
const
defaultWindowState
=
function
(
mode
=
WindowMode
.
Normal
):
IWindowState
{
return
{
width
:
1024
,
...
...
src/vs/code/electron-main/windows.ts
浏览文件 @
7f450765
...
...
@@ -13,7 +13,7 @@ import { assign, mixin, equals } from 'vs/base/common/objects';
import
{
IBackupMainService
}
from
'
vs/platform/backup/common/backup
'
;
import
{
IEnvironmentService
,
ParsedArgs
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IStateService
}
from
'
vs/platform/state/common/state
'
;
import
{
CodeWindow
,
IWindowState
as
ISingleWindowState
,
defaultWindowState
,
WindowMod
e
}
from
'
vs/code/electron-main/window
'
;
import
{
CodeWindow
,
defaultWindowStat
e
}
from
'
vs/code/electron-main/window
'
;
import
{
ipcMain
as
ipc
,
screen
,
BrowserWindow
,
dialog
,
systemPreferences
,
app
}
from
'
electron
'
;
import
{
IPathWithLineAndColumn
,
parseLineAndColumnAware
}
from
'
vs/code/node/paths
'
;
import
{
ILifecycleService
,
UnloadReason
,
IWindowUnloadEvent
}
from
'
vs/platform/lifecycle/electron-main/lifecycleMain
'
;
...
...
@@ -25,7 +25,7 @@ import CommonEvent, { Emitter } from 'vs/base/common/event';
import
product
from
'
vs/platform/node/product
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
isEqual
}
from
'
vs/base/common/paths
'
;
import
{
IWindowsMainService
,
IOpenConfiguration
,
IWindowsCountChangedEvent
,
ICodeWindow
}
from
'
vs/platform/windows/electron-main/windows
'
;
import
{
IWindowsMainService
,
IOpenConfiguration
,
IWindowsCountChangedEvent
,
ICodeWindow
,
IWindowState
as
ISingleWindowState
,
WindowMode
}
from
'
vs/platform/windows/electron-main/windows
'
;
import
{
IHistoryMainService
}
from
'
vs/platform/history/common/history
'
;
import
{
IProcessEnvironment
,
isLinux
,
isMacintosh
,
isWindows
}
from
'
vs/base/common/platform
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
...
...
@@ -76,7 +76,7 @@ interface IOpenBrowserWindowOptions {
filesToWait
?:
IPathsToWaitFor
;
forceNewWindow
?:
boolean
;
windowToUse
?:
CodeWindow
;
windowToUse
?:
I
CodeWindow
;
emptyWindowBackupFolder
?:
string
;
}
...
...
@@ -102,7 +102,7 @@ export class WindowsManager implements IWindowsMainService {
private
static
readonly
windowsStateStorageKey
=
'
windowsState
'
;
private
static
WINDOWS
:
CodeWindow
[]
=
[];
private
static
WINDOWS
:
I
CodeWindow
[]
=
[];
private
initialUserEnv
:
IProcessEnvironment
;
...
...
@@ -112,8 +112,8 @@ export class WindowsManager implements IWindowsMainService {
private
dialogs
:
Dialogs
;
private
workspacesManager
:
WorkspacesManager
;
private
_onWindowReady
=
new
Emitter
<
CodeWindow
>
();
onWindowReady
:
CommonEvent
<
CodeWindow
>
=
this
.
_onWindowReady
.
event
;
private
_onWindowReady
=
new
Emitter
<
I
CodeWindow
>
();
onWindowReady
:
CommonEvent
<
I
CodeWindow
>
=
this
.
_onWindowReady
.
event
;
private
_onWindowClose
=
new
Emitter
<
number
>
();
onWindowClose
:
CommonEvent
<
number
>
=
this
.
_onWindowClose
.
event
;
...
...
@@ -121,8 +121,8 @@ export class WindowsManager implements IWindowsMainService {
private
_onWindowLoad
=
new
Emitter
<
number
>
();
onWindowLoad
:
CommonEvent
<
number
>
=
this
.
_onWindowLoad
.
event
;
private
_onActiveWindowChanged
=
new
Emitter
<
CodeWindow
>
();
onActiveWindowChanged
:
CommonEvent
<
CodeWindow
>
=
this
.
_onActiveWindowChanged
.
event
;
private
_onActiveWindowChanged
=
new
Emitter
<
I
CodeWindow
>
();
onActiveWindowChanged
:
CommonEvent
<
I
CodeWindow
>
=
this
.
_onActiveWindowChanged
.
event
;
private
_onWindowReload
=
new
Emitter
<
number
>
();
onWindowReload
:
CommonEvent
<
number
>
=
this
.
_onWindowReload
.
event
;
...
...
@@ -193,7 +193,7 @@ export class WindowsManager implements IWindowsMainService {
// Handle various lifecycle events around windows
this
.
lifecycleService
.
onBeforeWindowUnload
(
e
=>
this
.
onBeforeWindowUnload
(
e
));
this
.
lifecycleService
.
onBeforeWindowClose
(
win
=>
this
.
onBeforeWindowClose
(
win
as
CodeWindow
));
this
.
lifecycleService
.
onBeforeWindowClose
(
win
=>
this
.
onBeforeWindowClose
(
win
as
I
CodeWindow
));
this
.
lifecycleService
.
onBeforeQuit
(()
=>
this
.
onBeforeQuit
());
this
.
onWindowsCountChanged
(
e
=>
{
if
(
e
.
newCount
-
e
.
oldCount
>
0
)
{
...
...
@@ -281,7 +281,7 @@ export class WindowsManager implements IWindowsMainService {
}
// See note on #onBeforeQuit() for details how these events are flowing
private
onBeforeWindowClose
(
win
:
CodeWindow
):
void
{
private
onBeforeWindowClose
(
win
:
I
CodeWindow
):
void
{
if
(
this
.
lifecycleService
.
isQuitRequested
())
{
return
;
// during quit, many windows close in parallel so let it be handled in the before-quit handler
}
...
...
@@ -313,7 +313,7 @@ export class WindowsManager implements IWindowsMainService {
}
}
private
toWindowState
(
win
:
CodeWindow
):
IWindowState
{
private
toWindowState
(
win
:
I
CodeWindow
):
IWindowState
{
return
{
workspace
:
win
.
openedWorkspace
,
folderPath
:
win
.
openedFolderPath
,
...
...
@@ -322,7 +322,7 @@ export class WindowsManager implements IWindowsMainService {
};
}
public
open
(
openConfig
:
IOpenConfiguration
):
CodeWindow
[]
{
public
open
(
openConfig
:
IOpenConfiguration
):
I
CodeWindow
[]
{
openConfig
=
this
.
validateOpenConfig
(
openConfig
);
let
pathsToOpen
=
this
.
getPathsToOpen
(
openConfig
);
...
...
@@ -481,7 +481,7 @@ export class WindowsManager implements IWindowsMainService {
filesToWait
:
IPathsToWaitFor
,
foldersToAdd
:
IPath
[]
)
{
const
usedWindows
:
CodeWindow
[]
=
[];
const
usedWindows
:
I
CodeWindow
[]
=
[];
// Settings can decide if files/folders open in new window or not
let
{
openFolderInNewWindow
,
openFilesInNewWindow
}
=
this
.
shouldOpenNewWindow
(
openConfig
);
...
...
@@ -694,7 +694,7 @@ export class WindowsManager implements IWindowsMainService {
return
arrays
.
distinct
(
usedWindows
);
}
private
doOpenFilesInExistingWindow
(
window
:
CodeWindow
,
filesToOpen
:
IPath
[],
filesToCreate
:
IPath
[],
filesToDiff
:
IPath
[],
filesToWait
:
IPathsToWaitFor
):
CodeWindow
{
private
doOpenFilesInExistingWindow
(
window
:
ICodeWindow
,
filesToOpen
:
IPath
[],
filesToCreate
:
IPath
[],
filesToDiff
:
IPath
[],
filesToWait
:
IPathsToWaitFor
):
I
CodeWindow
{
window
.
focus
();
// make sure window has focus
window
.
ready
().
then
(
readyWindow
=>
{
...
...
@@ -704,7 +704,7 @@ export class WindowsManager implements IWindowsMainService {
return
window
;
}
private
doAddFoldersToExistingWidow
(
window
:
CodeWindow
,
foldersToAdd
:
IPath
[]):
CodeWindow
{
private
doAddFoldersToExistingWidow
(
window
:
ICodeWindow
,
foldersToAdd
:
IPath
[]):
I
CodeWindow
{
window
.
focus
();
// make sure window has focus
window
.
ready
().
then
(
readyWindow
=>
{
...
...
@@ -714,7 +714,7 @@ export class WindowsManager implements IWindowsMainService {
return
window
;
}
private
doOpenFolderOrWorkspace
(
openConfig
:
IOpenConfiguration
,
folderOrWorkspace
:
IPathToOpen
,
openInNewWindow
:
boolean
,
filesToOpen
:
IPath
[],
filesToCreate
:
IPath
[],
filesToDiff
:
IPath
[],
filesToWait
:
IPathsToWaitFor
,
windowToUse
?:
CodeWindow
):
CodeWindow
{
private
doOpenFolderOrWorkspace
(
openConfig
:
IOpenConfiguration
,
folderOrWorkspace
:
IPathToOpen
,
openInNewWindow
:
boolean
,
filesToOpen
:
IPath
[],
filesToCreate
:
IPath
[],
filesToDiff
:
IPath
[],
filesToWait
:
IPathsToWaitFor
,
windowToUse
?:
ICodeWindow
):
I
CodeWindow
{
const
browserWindow
=
this
.
openInBrowserWindow
({
userEnv
:
openConfig
.
userEnv
,
cli
:
openConfig
.
cli
,
...
...
@@ -1036,7 +1036,7 @@ export class WindowsManager implements IWindowsMainService {
this
.
open
({
context
:
openConfig
.
context
,
cli
:
openConfig
.
cli
,
forceNewWindow
:
true
,
forceEmpty
:
openConfig
.
cli
.
_
.
length
===
0
,
userEnv
:
openConfig
.
userEnv
});
}
private
openInBrowserWindow
(
options
:
IOpenBrowserWindowOptions
):
CodeWindow
{
private
openInBrowserWindow
(
options
:
IOpenBrowserWindowOptions
):
I
CodeWindow
{
// Build IWindowConfiguration from config and options
const
configuration
:
IWindowConfiguration
=
mixin
({},
options
.
cli
);
// inherit all properties from CLI
...
...
@@ -1061,7 +1061,7 @@ export class WindowsManager implements IWindowsMainService {
configuration
.
backupPath
=
join
(
this
.
environmentService
.
backupHome
,
options
.
emptyWindowBackupFolder
);
}
let
window
:
CodeWindow
;
let
window
:
I
CodeWindow
;
if
(
!
options
.
forceNewWindow
)
{
window
=
options
.
windowToUse
||
this
.
getLastActiveWindow
();
if
(
window
)
{
...
...
@@ -1278,7 +1278,7 @@ export class WindowsManager implements IWindowsMainService {
return
state
;
}
public
reload
(
win
:
CodeWindow
,
cli
?:
ParsedArgs
):
void
{
public
reload
(
win
:
I
CodeWindow
,
cli
?:
ParsedArgs
):
void
{
// Only reload when the window has not vetoed this
this
.
lifecycleService
.
unload
(
win
,
UnloadReason
.
RELOAD
).
done
(
veto
=>
{
...
...
@@ -1291,22 +1291,22 @@ export class WindowsManager implements IWindowsMainService {
});
}
public
closeWorkspace
(
win
:
CodeWindow
):
void
{
public
closeWorkspace
(
win
:
I
CodeWindow
):
void
{
this
.
openInBrowserWindow
({
cli
:
this
.
environmentService
.
args
,
windowToUse
:
win
});
}
public
saveAndEnterWorkspace
(
win
:
CodeWindow
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
public
saveAndEnterWorkspace
(
win
:
I
CodeWindow
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
return
this
.
workspacesManager
.
saveAndEnterWorkspace
(
win
,
path
).
then
(
result
=>
this
.
doEnterWorkspace
(
win
,
result
));
}
public
createAndEnterWorkspace
(
win
:
CodeWindow
,
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
public
createAndEnterWorkspace
(
win
:
I
CodeWindow
,
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
return
this
.
workspacesManager
.
createAndEnterWorkspace
(
win
,
folders
,
path
).
then
(
result
=>
this
.
doEnterWorkspace
(
win
,
result
));
}
private
doEnterWorkspace
(
win
:
CodeWindow
,
result
:
IEnterWorkspaceResult
):
IEnterWorkspaceResult
{
private
doEnterWorkspace
(
win
:
I
CodeWindow
,
result
:
IEnterWorkspaceResult
):
IEnterWorkspaceResult
{
// Mark as recently opened
this
.
historyMainService
.
addRecentlyOpened
([
result
.
workspace
],
[]);
...
...
@@ -1358,7 +1358,7 @@ export class WindowsManager implements IWindowsMainService {
}));
}
public
focusLastActive
(
cli
:
ParsedArgs
,
context
:
OpenContext
):
CodeWindow
{
public
focusLastActive
(
cli
:
ParsedArgs
,
context
:
OpenContext
):
I
CodeWindow
{
const
lastActive
=
this
.
getLastActiveWindow
();
if
(
lastActive
)
{
lastActive
.
focus
();
...
...
@@ -1370,7 +1370,7 @@ export class WindowsManager implements IWindowsMainService {
return
this
.
open
({
context
,
cli
,
forceEmpty
:
true
})[
0
];
}
public
getLastActiveWindow
():
CodeWindow
{
public
getLastActiveWindow
():
I
CodeWindow
{
return
getLastActiveWindow
(
WindowsManager
.
WINDOWS
);
}
...
...
@@ -1412,7 +1412,7 @@ export class WindowsManager implements IWindowsMainService {
});
}
public
getFocusedWindow
():
CodeWindow
{
public
getFocusedWindow
():
I
CodeWindow
{
const
win
=
BrowserWindow
.
getFocusedWindow
();
if
(
win
)
{
return
this
.
getWindowById
(
win
.
id
);
...
...
@@ -1421,7 +1421,7 @@ export class WindowsManager implements IWindowsMainService {
return
null
;
}
public
getWindowById
(
windowId
:
number
):
CodeWindow
{
public
getWindowById
(
windowId
:
number
):
I
CodeWindow
{
const
res
=
WindowsManager
.
WINDOWS
.
filter
(
w
=>
w
.
id
===
windowId
);
if
(
res
&&
res
.
length
===
1
)
{
return
res
[
0
];
...
...
@@ -1430,7 +1430,7 @@ export class WindowsManager implements IWindowsMainService {
return
null
;
}
public
getWindows
():
CodeWindow
[]
{
public
getWindows
():
I
CodeWindow
[]
{
return
WindowsManager
.
WINDOWS
;
}
...
...
@@ -1438,7 +1438,7 @@ export class WindowsManager implements IWindowsMainService {
return
WindowsManager
.
WINDOWS
.
length
;
}
private
onWindowError
(
window
:
CodeWindow
,
error
:
WindowError
):
void
{
private
onWindowError
(
window
:
I
CodeWindow
,
error
:
WindowError
):
void
{
this
.
logService
.
error
(
error
===
WindowError
.
CRASHED
?
'
[VS Code]: render process crashed!
'
:
'
[VS Code]: detected unresponsive
'
);
// Unresponsive
...
...
@@ -1488,7 +1488,7 @@ export class WindowsManager implements IWindowsMainService {
}
}
private
onWindowClosed
(
win
:
CodeWindow
):
void
{
private
onWindowClosed
(
win
:
I
CodeWindow
):
void
{
// Tell window
win
.
dispose
();
...
...
@@ -1547,15 +1547,15 @@ export class WindowsManager implements IWindowsMainService {
this
.
dialogs
.
pickAndOpen
(
internalOptions
);
}
public
showMessageBox
(
options
:
Electron
.
MessageBoxOptions
,
win
?:
CodeWindow
):
TPromise
<
IMessageBoxResult
>
{
public
showMessageBox
(
options
:
Electron
.
MessageBoxOptions
,
win
?:
I
CodeWindow
):
TPromise
<
IMessageBoxResult
>
{
return
this
.
dialogs
.
showMessageBox
(
options
,
win
);
}
public
showSaveDialog
(
options
:
Electron
.
SaveDialogOptions
,
win
?:
CodeWindow
):
TPromise
<
string
>
{
public
showSaveDialog
(
options
:
Electron
.
SaveDialogOptions
,
win
?:
I
CodeWindow
):
TPromise
<
string
>
{
return
this
.
dialogs
.
showSaveDialog
(
options
,
win
);
}
public
showOpenDialog
(
options
:
Electron
.
OpenDialogOptions
,
win
?:
CodeWindow
):
TPromise
<
string
[]
>
{
public
showOpenDialog
(
options
:
Electron
.
OpenDialogOptions
,
win
?:
I
CodeWindow
):
TPromise
<
string
[]
>
{
return
this
.
dialogs
.
showOpenDialog
(
options
,
win
);
}
...
...
@@ -1742,7 +1742,7 @@ class WorkspacesManager {
)
{
}
public
saveAndEnterWorkspace
(
window
:
CodeWindow
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
public
saveAndEnterWorkspace
(
window
:
I
CodeWindow
,
path
:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
if
(
!
window
||
!
window
.
win
||
window
.
readyState
!==
ReadyState
.
READY
||
!
window
.
openedWorkspace
||
!
path
||
!
this
.
isValidTargetWorkspacePath
(
window
,
path
))
{
return
TPromise
.
as
(
null
);
// return early if the window is not ready or disposed or does not have a workspace
}
...
...
@@ -1750,7 +1750,7 @@ class WorkspacesManager {
return
this
.
doSaveAndOpenWorkspace
(
window
,
window
.
openedWorkspace
,
path
);
}
public
createAndEnterWorkspace
(
window
:
CodeWindow
,
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
public
createAndEnterWorkspace
(
window
:
I
CodeWindow
,
folders
?:
IWorkspaceFolderCreationData
[],
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
if
(
!
window
||
!
window
.
win
||
window
.
readyState
!==
ReadyState
.
READY
)
{
return
TPromise
.
as
(
null
);
// return early if the window is not ready or disposed
}
...
...
@@ -1767,7 +1767,7 @@ class WorkspacesManager {
}
private
isValidTargetWorkspacePath
(
window
:
CodeWindow
,
path
?:
string
):
TPromise
<
boolean
>
{
private
isValidTargetWorkspacePath
(
window
:
I
CodeWindow
,
path
?:
string
):
TPromise
<
boolean
>
{
if
(
!
path
)
{
return
TPromise
.
wrap
(
true
);
}
...
...
@@ -1793,7 +1793,7 @@ class WorkspacesManager {
return
TPromise
.
wrap
(
true
);
// OK
}
private
doSaveAndOpenWorkspace
(
window
:
CodeWindow
,
workspace
:
IWorkspaceIdentifier
,
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
private
doSaveAndOpenWorkspace
(
window
:
I
CodeWindow
,
workspace
:
IWorkspaceIdentifier
,
path
?:
string
):
TPromise
<
IEnterWorkspaceResult
>
{
let
savePromise
:
TPromise
<
IWorkspaceIdentifier
>
;
if
(
path
)
{
savePromise
=
this
.
workspacesMainService
.
saveWorkspace
(
workspace
,
path
);
...
...
src/vs/platform/windows/electron-main/windows.ts
浏览文件 @
7f450765
...
...
@@ -14,6 +14,22 @@ import { IProcessEnvironment } from 'vs/base/common/platform';
import
{
IWorkspaceIdentifier
,
IWorkspaceFolderCreationData
}
from
'
vs/platform/workspaces/common/workspaces
'
;
import
{
ICommandAction
}
from
'
vs/platform/actions/common/actions
'
;
export
interface
IWindowState
{
width
?:
number
;
height
?:
number
;
x
?:
number
;
y
?:
number
;
mode
?:
WindowMode
;
display
?:
number
;
}
export
enum
WindowMode
{
Maximized
,
Normal
,
Minimized
,
// not used anymore, but also cannot remove due to existing stored UI state (needs migration)
Fullscreen
}
export
interface
ICodeWindow
{
id
:
number
;
win
:
Electron
.
BrowserWindow
;
...
...
@@ -21,13 +37,24 @@ export interface ICodeWindow {
openedFolderPath
:
string
;
openedWorkspace
:
IWorkspaceIdentifier
;
backupPath
:
string
;
isExtensionDevelopmentHost
:
boolean
;
isExtensionTestHost
:
boolean
;
lastFocusTime
:
number
;
readyState
:
ReadyState
;
ready
():
TPromise
<
ICodeWindow
>
;
load
(
config
:
IWindowConfiguration
,
isReload
?:
boolean
):
void
;
reload
(
configuration
?:
IWindowConfiguration
,
cli
?:
ParsedArgs
):
void
;
focus
():
void
;
close
():
void
;
getBounds
():
Electron
.
Rectangle
;
send
(
channel
:
string
,
...
args
:
any
[]):
void
;
sendWhenReady
(
channel
:
string
,
...
args
:
any
[]):
void
;
...
...
@@ -38,6 +65,11 @@ export interface ICodeWindow {
onWindowTitleDoubleClick
():
void
;
updateTouchBar
(
items
:
ICommandAction
[][]):
void
;
setReady
():
void
;
serializeWindowState
():
IWindowState
;
dispose
():
void
;
}
export
const
IWindowsMainService
=
createDecorator
<
IWindowsMainService
>
(
'
windowsMainService
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录