Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
357506ab
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
357506ab
编写于
9月 29, 2018
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add NewWindowOptions
上级
5f1e86ea
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
19 deletion
+13
-19
src/vs/platform/windows/common/windows.ts
src/vs/platform/windows/common/windows.ts
+2
-8
src/vs/platform/windows/electron-main/windows.ts
src/vs/platform/windows/electron-main/windows.ts
+2
-2
src/vs/platform/windows/electron-main/windowsService.ts
src/vs/platform/windows/electron-main/windowsService.ts
+4
-4
src/vs/platform/windows/node/windowsIpc.ts
src/vs/platform/windows/node/windowsIpc.ts
+5
-5
未找到文件。
src/vs/platform/windows/common/windows.ts
浏览文件 @
357506ab
...
...
@@ -84,13 +84,7 @@ export interface SaveDialogOptions {
showsTagField
?:
boolean
;
}
export
interface
OpenDialogOptions
{
title
?:
string
;
defaultPath
?:
string
;
buttonLabel
?:
string
;
filters
?:
FileFilter
[];
properties
?:
Array
<
'
openFile
'
|
'
openDirectory
'
|
'
multiSelections
'
|
'
showHiddenFiles
'
|
'
createDirectory
'
|
'
promptToCreate
'
|
'
noResolveAliases
'
|
'
treatPackageAsDirectory
'
>
;
message
?:
string
;
export
interface
INewWindowOptions
{
}
export
interface
IDevToolsOptions
{
...
...
@@ -159,7 +153,7 @@ export interface IWindowsService {
// Global methods
openWindow
(
windowId
:
number
,
paths
:
URI
[],
options
?:
{
forceNewWindow
?:
boolean
,
forceReuseWindow
?:
boolean
,
forceOpenWorkspaceAsFile
?:
boolean
,
args
?:
ParsedArgs
}):
TPromise
<
void
>
;
openNewWindow
():
TPromise
<
void
>
;
openNewWindow
(
options
?:
INewWindowOptions
):
TPromise
<
void
>
;
showWindow
(
windowId
:
number
):
TPromise
<
void
>
;
getWindows
():
TPromise
<
{
id
:
number
;
workspace
?:
IWorkspaceIdentifier
;
folderUri
?:
ISingleFolderWorkspaceIdentifier
;
title
:
string
;
filename
?:
string
;
}[]
>
;
getWindowCount
():
TPromise
<
number
>
;
...
...
src/vs/platform/windows/electron-main/windows.ts
浏览文件 @
357506ab
...
...
@@ -6,7 +6,7 @@
'
use strict
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
OpenContext
,
IWindowConfiguration
,
ReadyState
,
INativeOpenDialogOptions
,
IEnterWorkspaceResult
,
IMessageBoxResult
}
from
'
vs/platform/windows/common/windows
'
;
import
{
OpenContext
,
IWindowConfiguration
,
ReadyState
,
INativeOpenDialogOptions
,
IEnterWorkspaceResult
,
IMessageBoxResult
,
INewWindowOptions
}
from
'
vs/platform/windows/common/windows
'
;
import
{
ParsedArgs
}
from
'
vs/platform/environment/common/environment
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -111,7 +111,7 @@ export interface IWindowsMainService {
focusLastActive
(
cli
:
ParsedArgs
,
context
:
OpenContext
):
ICodeWindow
;
getLastActiveWindow
():
ICodeWindow
;
waitForWindowCloseOrLoad
(
windowId
:
number
):
TPromise
<
void
>
;
openNewWindow
(
context
:
OpenContext
):
ICodeWindow
[];
openNewWindow
(
context
:
OpenContext
,
options
?:
INewWindowOptions
):
ICodeWindow
[];
openNewTabbedWindow
(
context
:
OpenContext
):
ICodeWindow
[];
sendToFocused
(
channel
:
string
,
...
args
:
any
[]):
void
;
sendToAll
(
channel
:
string
,
payload
:
any
,
windowIdsToIgnore
?:
number
[]):
void
;
...
...
src/vs/platform/windows/electron-main/windowsService.ts
浏览文件 @
357506ab
...
...
@@ -11,7 +11,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import
{
assign
}
from
'
vs/base/common/objects
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
product
from
'
vs/platform/node/product
'
;
import
{
IWindowsService
,
OpenContext
,
INativeOpenDialogOptions
,
IEnterWorkspaceResult
,
IMessageBoxResult
,
IDevToolsOptions
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IWindowsService
,
OpenContext
,
INativeOpenDialogOptions
,
IEnterWorkspaceResult
,
IMessageBoxResult
,
IDevToolsOptions
,
INewWindowOptions
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IEnvironmentService
,
ParsedArgs
}
from
'
vs/platform/environment/common/environment
'
;
import
{
shell
,
crashReporter
,
app
,
Menu
,
clipboard
}
from
'
electron
'
;
import
{
Event
,
fromNodeEventEmitter
,
mapEvent
,
filterEvent
,
anyEvent
,
latch
}
from
'
vs/base/common/event
'
;
...
...
@@ -418,10 +418,10 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
return
TPromise
.
as
(
null
);
}
openNewWindow
():
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#openNewWindow
'
);
openNewWindow
(
options
?:
INewWindowOptions
):
TPromise
<
void
>
{
this
.
logService
.
trace
(
'
windowsService#openNewWindow
'
+
JSON
.
stringify
(
options
)
);
this
.
windowsMainService
.
openNewWindow
(
OpenContext
.
API
);
this
.
windowsMainService
.
openNewWindow
(
OpenContext
.
API
,
options
);
return
TPromise
.
as
(
null
);
}
...
...
src/vs/platform/windows/node/windowsIpc.ts
浏览文件 @
357506ab
...
...
@@ -8,7 +8,7 @@
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
Event
,
buffer
}
from
'
vs/base/common/event
'
;
import
{
IChannel
}
from
'
vs/base/parts/ipc/node/ipc
'
;
import
{
IWindowsService
,
INativeOpenDialogOptions
,
IEnterWorkspaceResult
,
CrashReporterStartOptions
,
IMessageBoxResult
,
MessageBoxOptions
,
SaveDialogOptions
,
OpenDialogOptions
,
IDevToolsOptions
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IWindowsService
,
INativeOpenDialogOptions
,
IEnterWorkspaceResult
,
CrashReporterStartOptions
,
IMessageBoxResult
,
MessageBoxOptions
,
SaveDialogOptions
,
OpenDialogOptions
,
IDevToolsOptions
,
INewWindowOptions
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IWorkspaceIdentifier
,
IWorkspaceFolderCreationData
,
ISingleFolderWorkspaceIdentifier
,
isWorkspaceIdentifier
}
from
'
vs/platform/workspaces/common/workspaces
'
;
import
{
IRecentlyOpened
}
from
'
vs/platform/history/common/history
'
;
import
{
ISerializableCommandAction
}
from
'
vs/platform/actions/common/actions
'
;
...
...
@@ -62,7 +62,7 @@ export interface IWindowsChannel extends IChannel {
call
(
command
:
'
setDocumentEdited
'
,
arg
:
[
number
,
boolean
]):
Thenable
<
void
>
;
call
(
command
:
'
quit
'
):
Thenable
<
void
>
;
call
(
command
:
'
openWindow
'
,
arg
:
[
number
,
URI
[],
{
forceNewWindow
?:
boolean
,
forceReuseWindow
?:
boolean
,
forceOpenWorkspaceAsFile
?:
boolean
,
args
?:
ParsedArgs
}]):
Thenable
<
void
>
;
call
(
command
:
'
openNewWindow
'
):
Thenable
<
void
>
;
call
(
command
:
'
openNewWindow
'
,
arg
:
INewWindowOptions
):
Thenable
<
void
>
;
call
(
command
:
'
showWindow
'
,
arg
:
number
):
Thenable
<
void
>
;
call
(
command
:
'
getWindows
'
):
Thenable
<
{
id
:
number
;
workspace
?:
IWorkspaceIdentifier
;
folderUri
?:
ISingleFolderWorkspaceIdentifier
;
title
:
string
;
filename
?:
string
;
}[]
>
;
call
(
command
:
'
getWindowCount
'
):
Thenable
<
number
>
;
...
...
@@ -166,7 +166,7 @@ export class WindowsChannel implements IWindowsChannel {
case
'
onWindowTitleDoubleClick
'
:
return
this
.
service
.
onWindowTitleDoubleClick
(
arg
);
case
'
setDocumentEdited
'
:
return
this
.
service
.
setDocumentEdited
(
arg
[
0
],
arg
[
1
]);
case
'
openWindow
'
:
return
this
.
service
.
openWindow
(
arg
[
0
],
arg
[
1
]
?
(
<
URI
[]
>
arg
[
1
]).
map
(
r
=>
URI
.
revive
(
r
))
:
arg
[
1
],
arg
[
2
]);
case
'
openNewWindow
'
:
return
this
.
service
.
openNewWindow
();
case
'
openNewWindow
'
:
return
this
.
service
.
openNewWindow
(
arg
);
case
'
showWindow
'
:
return
this
.
service
.
showWindow
(
arg
);
case
'
getWindows
'
:
return
this
.
service
.
getWindows
();
case
'
getWindowCount
'
:
return
this
.
service
.
getWindowCount
();
...
...
@@ -363,8 +363,8 @@ export class WindowsChannelClient implements IWindowsService {
return
TPromise
.
wrap
(
this
.
channel
.
call
(
'
openWindow
'
,
[
windowId
,
paths
,
options
]));
}
openNewWindow
():
TPromise
<
void
>
{
return
TPromise
.
wrap
(
this
.
channel
.
call
(
'
openNewWindow
'
)
);
openNewWindow
(
options
?:
INewWindowOptions
):
TPromise
<
void
>
{
return
this
.
channel
.
call
(
'
openNewWindow
'
,
options
);
}
showWindow
(
windowId
:
number
):
TPromise
<
void
>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录