Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
1f199ff7
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,发现更多精彩内容 >>
提交
1f199ff7
编写于
11月 04, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ipc: remove vscode:openExternal
#10587
上级
e982cfb1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
21 deletion
+25
-21
src/vs/code/electron-main/windows.ts
src/vs/code/electron-main/windows.ts
+1
-7
src/vs/platform/windows/common/windows.ts
src/vs/platform/windows/common/windows.ts
+4
-0
src/vs/platform/windows/common/windowsIpc.ts
src/vs/platform/windows/common/windowsIpc.ts
+14
-8
src/vs/platform/windows/electron-main/windowsService.ts
src/vs/platform/windows/electron-main/windowsService.ts
+5
-0
src/vs/workbench/electron-browser/window.ts
src/vs/workbench/electron-browser/window.ts
+1
-6
未找到文件。
src/vs/code/electron-main/windows.ts
浏览文件 @
1f199ff7
...
@@ -18,7 +18,7 @@ import { EventEmitter } from 'events';
...
@@ -18,7 +18,7 @@ import { EventEmitter } from 'events';
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IStorageService
}
from
'
vs/code/electron-main/storage
'
;
import
{
IStorageService
}
from
'
vs/code/electron-main/storage
'
;
import
{
IPath
,
VSCodeWindow
,
ReadyState
,
IWindowConfiguration
,
IWindowState
as
ISingleWindowState
,
defaultWindowState
,
IWindowSettings
}
from
'
vs/code/electron-main/window
'
;
import
{
IPath
,
VSCodeWindow
,
ReadyState
,
IWindowConfiguration
,
IWindowState
as
ISingleWindowState
,
defaultWindowState
,
IWindowSettings
}
from
'
vs/code/electron-main/window
'
;
import
{
ipcMain
as
ipc
,
app
,
screen
,
crashReporter
,
BrowserWindow
,
dialog
,
shell
}
from
'
electron
'
;
import
{
ipcMain
as
ipc
,
app
,
screen
,
crashReporter
,
BrowserWindow
,
dialog
}
from
'
electron
'
;
import
{
IPathWithLineAndColumn
,
parseLineAndColumnAware
}
from
'
vs/code/electron-main/paths
'
;
import
{
IPathWithLineAndColumn
,
parseLineAndColumnAware
}
from
'
vs/code/electron-main/paths
'
;
import
{
ILifecycleService
}
from
'
vs/code/electron-main/lifecycle
'
;
import
{
ILifecycleService
}
from
'
vs/code/electron-main/lifecycle
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
...
@@ -255,12 +255,6 @@ export class WindowsManager implements IWindowsMainService, IWindowEventService
...
@@ -255,12 +255,6 @@ export class WindowsManager implements IWindowsMainService, IWindowEventService
}
}
});
});
ipc
.
on
(
'
vscode:openExternal
'
,
(
event
,
url
:
string
)
=>
{
this
.
logService
.
log
(
'
IPC#vscode-openExternal
'
);
shell
.
openExternal
(
url
);
});
this
.
updateService
.
on
(
'
update-downloaded
'
,
(
update
:
IUpdate
)
=>
{
this
.
updateService
.
on
(
'
update-downloaded
'
,
(
update
:
IUpdate
)
=>
{
this
.
sendToFocused
(
'
vscode:telemetry
'
,
{
eventName
:
'
update:downloaded
'
,
data
:
{
version
:
update
.
version
}
});
this
.
sendToFocused
(
'
vscode:telemetry
'
,
{
eventName
:
'
update:downloaded
'
,
data
:
{
version
:
update
.
version
}
});
...
...
src/vs/platform/windows/common/windows.ts
浏览文件 @
1f199ff7
...
@@ -39,6 +39,10 @@ export interface IWindowsService {
...
@@ -39,6 +39,10 @@ export interface IWindowsService {
// TODO@joao: what?
// TODO@joao: what?
closeExtensionHostWindow
(
extensionDevelopmentPath
:
string
):
TPromise
<
void
>
;
closeExtensionHostWindow
(
extensionDevelopmentPath
:
string
):
TPromise
<
void
>
;
showItemInFolder
(
path
:
string
):
TPromise
<
void
>
;
showItemInFolder
(
path
:
string
):
TPromise
<
void
>
;
// TODO: this needs to be handled from browser process to prevent
// foreground ordering issues on Windows
openExternal
(
url
:
string
):
TPromise
<
void
>
;
}
}
export
const
IWindowService
=
createDecorator
<
IWindowService
>
(
'
windowService
'
);
export
const
IWindowService
=
createDecorator
<
IWindowService
>
(
'
windowService
'
);
...
...
src/vs/platform/windows/common/windowsIpc.ts
浏览文件 @
1f199ff7
...
@@ -10,9 +10,9 @@ import { IChannel } from 'vs/base/parts/ipc/common/ipc';
...
@@ -10,9 +10,9 @@ import { IChannel } from 'vs/base/parts/ipc/common/ipc';
import
{
IWindowsService
}
from
'
./windows
'
;
import
{
IWindowsService
}
from
'
./windows
'
;
export
interface
IWindowsChannel
extends
IChannel
{
export
interface
IWindowsChannel
extends
IChannel
{
call
(
command
:
'
openFileFolderPicker
'
,
arg
s
:
[
number
,
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
openFileFolderPicker
'
,
arg
:
[
number
,
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
openFilePicker
'
,
arg
s
:
[
number
,
boolean
,
string
]):
TPromise
<
void
>
;
call
(
command
:
'
openFilePicker
'
,
arg
:
[
number
,
boolean
,
string
]):
TPromise
<
void
>
;
call
(
command
:
'
openFolderPicker
'
,
arg
s
:
[
number
,
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
openFolderPicker
'
,
arg
:
[
number
,
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
reloadWindow
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
reloadWindow
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
toggleDevTools
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
toggleDevTools
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
closeFolder
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
closeFolder
'
,
arg
:
number
):
TPromise
<
void
>
;
...
@@ -20,15 +20,16 @@ export interface IWindowsChannel extends IChannel {
...
@@ -20,15 +20,16 @@ export interface IWindowsChannel extends IChannel {
call
(
command
:
'
setRepresentedFilename
'
,
arg
:
[
number
,
string
]):
TPromise
<
void
>
;
call
(
command
:
'
setRepresentedFilename
'
,
arg
:
[
number
,
string
]):
TPromise
<
void
>
;
call
(
command
:
'
getRecentlyOpen
'
,
arg
:
number
):
TPromise
<
{
files
:
string
[];
folders
:
string
[];
}
>
;
call
(
command
:
'
getRecentlyOpen
'
,
arg
:
number
):
TPromise
<
{
files
:
string
[];
folders
:
string
[];
}
>
;
call
(
command
:
'
focusWindow
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
focusWindow
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
setDocumentEdited
'
,
arg
s
:
[
number
,
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
setDocumentEdited
'
,
arg
:
[
number
,
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
toggleMenuBar
'
,
arg
s
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
toggleMenuBar
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
windowOpen
'
,
arg
:
[
string
[],
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
windowOpen
'
,
arg
:
[
string
[],
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
openNewWindow
'
):
TPromise
<
void
>
;
call
(
command
:
'
openNewWindow
'
):
TPromise
<
void
>
;
call
(
command
:
'
showWindow
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
showWindow
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
getWindows
'
):
TPromise
<
{
id
:
number
;
path
:
string
;
title
:
string
;
}[]
>
;
call
(
command
:
'
getWindows
'
):
TPromise
<
{
id
:
number
;
path
:
string
;
title
:
string
;
}[]
>
;
call
(
command
:
'
log
'
,
args
:
[
string
,
string
[]]):
TPromise
<
void
>
;
call
(
command
:
'
log
'
,
arg
:
[
string
,
string
[]]):
TPromise
<
void
>
;
call
(
command
:
'
closeExtensionHostWindow
'
,
args
:
string
):
TPromise
<
void
>
;
call
(
command
:
'
closeExtensionHostWindow
'
,
arg
:
string
):
TPromise
<
void
>
;
call
(
command
:
'
showItemInFolder
'
,
args
:
string
):
TPromise
<
void
>
;
call
(
command
:
'
showItemInFolder
'
,
arg
:
string
):
TPromise
<
void
>
;
call
(
command
:
'
openExternal
'
,
arg
:
string
):
TPromise
<
void
>
;
call
(
command
:
string
,
arg
?:
any
):
TPromise
<
any
>
;
call
(
command
:
string
,
arg
?:
any
):
TPromise
<
any
>
;
}
}
...
@@ -58,6 +59,7 @@ export class WindowsChannel implements IWindowsChannel {
...
@@ -58,6 +59,7 @@ export class WindowsChannel implements IWindowsChannel {
case
'
log
'
:
return
this
.
service
.
log
(
arg
[
0
],
arg
[
1
]);
case
'
log
'
:
return
this
.
service
.
log
(
arg
[
0
],
arg
[
1
]);
case
'
closeExtensionHostWindow
'
:
return
this
.
service
.
closeExtensionHostWindow
(
arg
);
case
'
closeExtensionHostWindow
'
:
return
this
.
service
.
closeExtensionHostWindow
(
arg
);
case
'
showItemInFolder
'
:
return
this
.
service
.
showItemInFolder
(
arg
);
case
'
showItemInFolder
'
:
return
this
.
service
.
showItemInFolder
(
arg
);
case
'
openExternal
'
:
return
this
.
service
.
openExternal
(
arg
);
}
}
}
}
}
}
...
@@ -147,4 +149,8 @@ export class WindowsChannelClient implements IWindowsService {
...
@@ -147,4 +149,8 @@ export class WindowsChannelClient implements IWindowsService {
showItemInFolder
(
path
:
string
):
TPromise
<
void
>
{
showItemInFolder
(
path
:
string
):
TPromise
<
void
>
{
return
this
.
channel
.
call
(
'
showItemInFolder
'
,
path
);
return
this
.
channel
.
call
(
'
showItemInFolder
'
,
path
);
}
}
openExternal
(
url
:
string
):
TPromise
<
void
>
{
return
this
.
channel
.
call
(
'
openExternal
'
,
url
);
}
}
}
\ No newline at end of file
src/vs/platform/windows/electron-main/windowsService.ts
浏览文件 @
1f199ff7
...
@@ -182,4 +182,9 @@ export class WindowsService implements IWindowsService {
...
@@ -182,4 +182,9 @@ export class WindowsService implements IWindowsService {
shell
.
showItemInFolder
(
path
);
shell
.
showItemInFolder
(
path
);
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
null
);
}
}
openExternal
(
url
:
string
):
TPromise
<
void
>
{
shell
.
openExternal
(
url
);
return
TPromise
.
as
(
null
);
}
}
}
\ No newline at end of file
src/vs/workbench/electron-browser/window.ts
浏览文件 @
1f199ff7
...
@@ -121,8 +121,7 @@ export class ElectronWindow {
...
@@ -121,8 +121,7 @@ export class ElectronWindow {
// Handle window.open() calls
// Handle window.open() calls
const
$this
=
this
;
const
$this
=
this
;
(
<
any
>
window
).
open
=
function
(
url
:
string
,
target
:
string
,
features
:
string
,
replace
:
boolean
)
{
(
<
any
>
window
).
open
=
function
(
url
:
string
,
target
:
string
,
features
:
string
,
replace
:
boolean
)
{
$this
.
openExternal
(
url
);
$this
.
windowsService
.
openExternal
(
url
);
return
null
;
return
null
;
};
};
}
}
...
@@ -157,8 +156,4 @@ export class ElectronWindow {
...
@@ -157,8 +156,4 @@ export class ElectronWindow {
focus
():
TPromise
<
void
>
{
focus
():
TPromise
<
void
>
{
return
this
.
windowService
.
focusWindow
();
return
this
.
windowService
.
focusWindow
();
}
}
public
openExternal
(
url
:
string
):
void
{
ipc
.
send
(
'
vscode:openExternal
'
,
url
);
// handled from browser process to prevent foreground ordering issues on Windows
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录