Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
c3d1b9fa
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 搜索 >>
提交
c3d1b9fa
编写于
2月 09, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
offer reload action when extension host dies
上级
1902dcef
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
10 deletion
+17
-10
src/vs/workbench/electron-browser/actions.ts
src/vs/workbench/electron-browser/actions.ts
+1
-1
src/vs/workbench/electron-browser/shell.ts
src/vs/workbench/electron-browser/shell.ts
+6
-7
src/vs/workbench/electron-browser/window.ts
src/vs/workbench/electron-browser/window.ts
+4
-0
src/vs/workbench/services/thread/electron-browser/threadService.ts
...rkbench/services/thread/electron-browser/threadService.ts
+6
-2
未找到文件。
src/vs/workbench/electron-browser/actions.ts
浏览文件 @
c3d1b9fa
...
...
@@ -376,7 +376,7 @@ export class ReloadWindowAction extends Action {
}
public
run
():
TPromise
<
boolean
>
{
ipc
.
send
(
'
vscode:reloadWindow
'
,
this
.
windowService
.
getWindowId
()
);
this
.
windowService
.
getWindow
().
reload
(
);
return
TPromise
.
as
(
true
);
}
...
...
src/vs/workbench/electron-browser/shell.ts
浏览文件 @
c3d1b9fa
...
...
@@ -20,7 +20,6 @@ import {Dimension, Builder, $} from 'vs/base/browser/builder';
import
objects
=
require
(
'
vs/base/common/objects
'
);
import
dom
=
require
(
'
vs/base/browser/dom
'
);
import
aria
=
require
(
'
vs/base/browser/ui/aria/aria
'
);
import
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
disposeAll
,
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
{
ContextViewService
}
from
'
vs/platform/contextview/browser/contextViewService
'
;
...
...
@@ -97,11 +96,11 @@ import {IUntitledEditorService, UntitledEditorService} from 'vs/workbench/servic
import
{
CrashReporter
}
from
'
vs/workbench/electron-browser/crashReporter
'
;
import
{
IThemeService
,
DEFAULT_THEME_ID
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
ThemeService
}
from
'
vs/workbench/services/themes/node/themeService
'
;
import
{
IServiceCtor
,
isServiceEvent
,
getService
}
from
'
vs/base/common/service
'
;
import
{
connect
,
Client
}
from
'
vs/base/node/service.net
'
;
import
{
IExtensionsService
}
from
'
vs/workbench/parts/extensions/common/extensions
'
;
import
{
ExtensionsService
}
from
'
vs/workbench/parts/extensions/node/extensionsService
'
;
import
{
ReloadWindowAction
}
from
'
vs/workbench/electron-browser/actions
'
;
import
{
getService
}
from
'
vs/base/common/service
'
;
import
{
connect
}
from
'
vs/base/node/service.net
'
;
import
{
IExtensionsService
}
from
'
vs/workbench/parts/extensions/common/extensions
'
;
import
{
ExtensionsService
}
from
'
vs/workbench/parts/extensions/node/extensionsService
'
;
import
{
ReloadWindowAction
}
from
'
vs/workbench/electron-browser/actions
'
;
/**
* The Monaco Workbench Shell contains the Monaco workbench with a rich header containing navigation and the activity bar.
...
...
@@ -163,7 +162,7 @@ export class WorkbenchShell {
sharedProcessClientPromise
.
done
(
service
=>
{
service
.
onClose
(()
=>
{
this
.
messageService
.
show
(
Severity
.
Error
,
{
message
:
nls
.
localize
(
'
sharedProcessCrashed
'
,
"
The shared process terminated unexpectedly. Please reload the window.
"
),
message
:
nls
.
localize
(
'
sharedProcessCrashed
'
,
"
The shared process terminated unexpectedly. Please reload the window
to recover
.
"
),
actions
:
[
instantiationService
.
createInstance
(
ReloadWindowAction
,
ReloadWindowAction
.
ID
,
ReloadWindowAction
.
LABEL
)]
});
});
...
...
src/vs/workbench/electron-browser/window.ts
浏览文件 @
c3d1b9fa
...
...
@@ -154,6 +154,10 @@ export class ElectronWindow {
this
.
win
.
close
();
}
public
reload
():
void
{
ipc
.
send
(
'
vscode:reloadWindow
'
,
this
.
win
.
id
);
}
public
showMessageBox
(
options
:
Electron
.
Dialog
.
ShowMessageBoxOptions
):
number
{
return
remote
.
dialog
.
showMessageBox
(
this
.
win
,
options
);
}
...
...
src/vs/workbench/services/thread/electron-browser/threadService.ts
浏览文件 @
c3d1b9fa
...
...
@@ -5,6 +5,7 @@
'
use strict
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
nls
=
require
(
'
vs/nls
'
);
import
{
MainThreadService
as
CommonMainThreadService
}
from
'
vs/platform/thread/common/mainThreadService
'
;
...
...
@@ -176,7 +177,7 @@ class PluginHostProcessManager {
// Support logging from plugin host
else
if
(
msg
&&
(
<
ILogEntry
>
msg
).
type
===
'
__$console
'
)
{
let
logEntry
:
ILogEntry
=
msg
;
let
logEntry
:
ILogEntry
=
msg
;
let
args
=
[];
try
{
...
...
@@ -243,7 +244,10 @@ class PluginHostProcessManager {
// Unexpected termination
if
(
!
this
.
isPluginDevelopmentHost
)
{
this
.
messageService
.
show
(
Severity
.
Error
,
nls
.
localize
(
'
pluginHostProcess.crash
'
,
"
Extension host terminated unexpectedly. Please restart VSCode to recover.
"
));
this
.
messageService
.
show
(
Severity
.
Error
,
{
message
:
nls
.
localize
(
'
pluginHostProcess.crash
'
,
"
Extension host terminated unexpectedly. Please reload the window to recover.
"
),
actions
:
[
new
Action
(
'
reloadWindow
'
,
nls
.
localize
(
'
reloadWindow
'
,
"
Reload Window
"
),
null
,
true
,
()
=>
{
this
.
windowService
.
getWindow
().
reload
();
return
TPromise
.
as
(
null
);
})]
});
console
.
error
(
'
Plugin host terminated unexpectedly. Code:
'
,
code
,
'
Signal:
'
,
signal
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录