Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
d3b77c03
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,发现更多精彩内容 >>
提交
d3b77c03
编写于
1月 06, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix ipc: now has event as first arg on renderer side
上级
c5f13122
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
11 addition
and
13 deletion
+11
-13
src/vs/workbench/electron-browser/integration.ts
src/vs/workbench/electron-browser/integration.ts
+6
-6
src/vs/workbench/electron-browser/update.ts
src/vs/workbench/electron-browser/update.ts
+1
-1
src/vs/workbench/parts/extensions/electron-browser/extensionsWorkbenchExtension.ts
...tensions/electron-browser/extensionsWorkbenchExtension.ts
+1
-1
src/vs/workbench/parts/files/electron-browser/electronFileTracker.ts
...bench/parts/files/electron-browser/electronFileTracker.ts
+1
-1
src/vs/workbench/parts/files/electron-browser/textFileServices.ts
...orkbench/parts/files/electron-browser/textFileServices.ts
+0
-1
src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts
...kbench/parts/snippets/electron-browser/snippetsTracker.ts
+0
-1
src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts
...h/services/lifecycle/electron-browser/lifecycleService.ts
+1
-1
src/vs/workbench/services/window/electron-browser/windowService.ts
...rkbench/services/window/electron-browser/windowService.ts
+1
-1
未找到文件。
src/vs/workbench/electron-browser/integration.ts
浏览文件 @
d3b77c03
...
...
@@ -49,12 +49,12 @@ export class ElectronIntegration {
this
.
windowService
.
registerWindow
(
activeWindow
);
// Support runAction event
ipc
.
on
(
'
vscode:runAction
'
,
(
actionId
:
string
)
=>
{
ipc
.
on
(
'
vscode:runAction
'
,
(
event
,
actionId
:
string
)
=>
{
this
.
keybindingService
.
executeCommand
(
actionId
,
{
from
:
'
menu
'
}).
done
(
undefined
,
err
=>
this
.
messageService
.
show
(
Severity
.
Error
,
err
));
});
// Support options change
ipc
.
on
(
'
vscode:optionsChange
'
,
(
options
:
string
)
=>
{
ipc
.
on
(
'
vscode:optionsChange
'
,
(
event
,
options
:
string
)
=>
{
let
optionsData
=
JSON
.
parse
(
options
);
for
(
let
key
in
optionsData
)
{
if
(
optionsData
.
hasOwnProperty
(
key
))
{
...
...
@@ -65,7 +65,7 @@ export class ElectronIntegration {
});
// Support resolve keybindings event
ipc
.
on
(
'
vscode:resolveKeybindings
'
,
(
rawActionIds
:
string
)
=>
{
ipc
.
on
(
'
vscode:resolveKeybindings
'
,
(
event
,
rawActionIds
:
string
)
=>
{
let
actionIds
:
string
[]
=
[];
try
{
actionIds
=
JSON
.
parse
(
rawActionIds
);
...
...
@@ -81,11 +81,11 @@ export class ElectronIntegration {
},
()
=>
errors
.
onUnexpectedError
);
});
ipc
.
on
(
'
vscode:telemetry
'
,
({
eventName
,
data
})
=>
{
ipc
.
on
(
'
vscode:telemetry
'
,
(
event
,
{
eventName
,
data
})
=>
{
this
.
telemetryService
.
publicLog
(
eventName
,
data
);
});
ipc
.
on
(
'
vscode:reportError
'
,
(
error
)
=>
{
ipc
.
on
(
'
vscode:reportError
'
,
(
e
vent
,
e
rror
)
=>
{
if
(
error
)
{
let
errorParsed
=
JSON
.
parse
(
error
);
errorParsed
.
mainProcess
=
true
;
...
...
@@ -99,7 +99,7 @@ export class ElectronIntegration {
});
// Theme changes
ipc
.
on
(
'
vscode:changeTheme
'
,
(
theme
:
string
)
=>
{
ipc
.
on
(
'
vscode:changeTheme
'
,
(
event
,
theme
:
string
)
=>
{
this
.
storageService
.
store
(
'
workbench.theme
'
,
theme
,
StorageScope
.
GLOBAL
);
});
...
...
src/vs/workbench/electron-browser/update.ts
浏览文件 @
d3b77c03
...
...
@@ -57,7 +57,7 @@ export class Update {
)
{
const
env
=
this
.
contextService
.
getConfiguration
().
env
;
ipc
.
on
(
'
vscode:update-downloaded
'
,
(
update
:
IUpdate
)
=>
{
ipc
.
on
(
'
vscode:update-downloaded
'
,
(
event
,
update
:
IUpdate
)
=>
{
this
.
messageService
.
show
(
severity
.
Info
,
{
message
:
nls
.
localize
(
'
updateAvailable
'
,
"
{0} will be updated after it restarts.
"
,
env
.
appName
),
actions
:
[
Update
.
ShowReleaseNotesAction
(
env
.
releaseNotesUrl
),
Update
.
NotNowAction
,
Update
.
ApplyUpdateAction
]
...
...
src/vs/workbench/parts/extensions/electron-browser/extensionsWorkbenchExtension.ts
浏览文件 @
d3b77c03
...
...
@@ -83,7 +83,7 @@ export class ExtensionsWorkbenchExtension implements IWorkbenchContribution {
}
private
registerListeners
():
void
{
ipc
.
on
(
'
vscode:installExtensions
'
,
(
request
:
IInstallExtensionsRequest
)
=>
{
ipc
.
on
(
'
vscode:installExtensions
'
,
(
event
,
request
:
IInstallExtensionsRequest
)
=>
{
if
(
request
.
extensionsToInstall
)
{
this
.
install
(
request
.
extensionsToInstall
).
done
(
null
,
errors
.
onUnexpectedError
);
}
...
...
src/vs/workbench/parts/files/electron-browser/electronFileTracker.ts
浏览文件 @
d3b77c03
...
...
@@ -82,7 +82,7 @@ export class FileTracker implements IWorkbenchContribution {
this
.
toUnbind
.
push
(()
=>
disposable
.
dispose
());
// Support openFiles event for existing and new files
ipc
.
on
(
'
vscode:openFiles
'
,
(
request
:
IOpenFileRequest
)
=>
{
ipc
.
on
(
'
vscode:openFiles
'
,
(
event
,
request
:
IOpenFileRequest
)
=>
{
let
inputs
:
IResourceInput
[]
=
[];
if
(
request
.
filesToOpen
)
{
inputs
.
push
(...
this
.
toInputs
(
request
.
filesToOpen
,
false
));
...
...
src/vs/workbench/parts/files/electron-browser/textFileServices.ts
浏览文件 @
d3b77c03
...
...
@@ -30,7 +30,6 @@ import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
import
{
IConfigurationService
,
IConfigurationServiceEvent
,
ConfigurationServiceEventTypes
}
from
'
vs/platform/configuration/common/configuration
'
;
import
remote
=
require
(
'
remote
'
);
import
{
ipcRenderer
as
ipc
}
from
'
electron
'
;
const
Dialog
=
remote
.
require
(
'
dialog
'
);
...
...
src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts
浏览文件 @
d3b77c03
...
...
@@ -20,7 +20,6 @@ import {ILifecycleService} from 'vs/platform/lifecycle/common/lifecycle';
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
remote
=
require
(
'
remote
'
);
import
{
ipcRenderer
as
ipc
}
from
'
electron
'
;
import
fs
=
require
(
'
fs
'
);
export
class
SnippetsTracker
implements
workbenchExt
.
IWorkbenchContribution
{
...
...
src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts
浏览文件 @
d3b77c03
...
...
@@ -28,7 +28,7 @@ export class LifecycleService extends BaseLifecycleService {
let
windowId
=
this
.
windowService
.
getWindowId
();
// Main side indicates that window is about to unload, check for vetos
ipc
.
on
(
'
vscode:beforeUnload
'
,
(
reply
:
{
okChannel
:
string
,
cancelChannel
:
string
})
=>
{
ipc
.
on
(
'
vscode:beforeUnload
'
,
(
event
,
reply
:
{
okChannel
:
string
,
cancelChannel
:
string
})
=>
{
let
veto
=
this
.
beforeUnload
();
if
(
typeof
veto
===
'
boolean
'
)
{
...
...
src/vs/workbench/services/window/electron-browser/windowService.ts
浏览文件 @
d3b77c03
...
...
@@ -50,7 +50,7 @@ export class WindowService implements IWindowService {
}
private
registerListeners
():
void
{
ipc
.
on
(
'
vscode:broadcast
'
,
(
b
:
IBroadcast
)
=>
{
ipc
.
on
(
'
vscode:broadcast
'
,
(
event
,
b
:
IBroadcast
)
=>
{
this
.
_onBroadcast
.
fire
(
b
);
});
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录