Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
16635b80
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,发现更多精彩内容 >>
提交
16635b80
编写于
3月 08, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - move out more things from workbench
上级
3a934189
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
37 addition
and
40 deletion
+37
-40
src/vs/platform/lifecycle/electron-browser/lifecycleService.ts
...s/platform/lifecycle/electron-browser/lifecycleService.ts
+0
-2
src/vs/workbench/electron-browser/main.ts
src/vs/workbench/electron-browser/main.ts
+5
-1
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+8
-33
src/vs/workbench/services/dialogs/electron-browser/dialogService.ts
...kbench/services/dialogs/electron-browser/dialogService.ts
+7
-2
src/vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl.ts
...ervices/remote/electron-browser/remoteAgentServiceImpl.ts
+17
-2
未找到文件。
src/vs/platform/lifecycle/electron-browser/lifecycleService.ts
浏览文件 @
16635b80
...
...
@@ -52,8 +52,6 @@ export class LifecycleService extends Disposable implements ILifecycleService {
this
.
_startupKind
=
this
.
resolveStartupKind
();
this
.
registerListeners
();
this
.
_phase
=
LifecyclePhase
.
Ready
;
}
private
resolveStartupKind
():
StartupKind
{
...
...
src/vs/workbench/electron-browser/main.ts
浏览文件 @
16635b80
...
...
@@ -20,7 +20,8 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle
import
{
stat
}
from
'
vs/base/node/pfs
'
;
import
{
EnvironmentService
}
from
'
vs/platform/environment/node/environmentService
'
;
import
{
KeyboardMapperFactory
}
from
'
vs/workbench/services/keybinding/electron-browser/keybindingService
'
;
import
{
IWindowConfiguration
,
IWindowsService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IWindowConfiguration
,
IWindowsService
,
IWindowService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
WindowService
}
from
'
vs/platform/windows/electron-browser/windowService
'
;
import
{
WindowsChannelClient
}
from
'
vs/platform/windows/node/windowsIpc
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
Client
as
ElectronIPCClient
}
from
'
vs/base/parts/ipc/electron-browser/ipc.electron-browser
'
;
...
...
@@ -170,6 +171,9 @@ class CodeRendererMain extends Disposable {
const
windowsChannel
=
electronMainClient
.
getChannel
(
'
windows
'
);
serviceCollection
.
set
(
IWindowsService
,
new
WindowsChannelClient
(
windowsChannel
));
// Window
serviceCollection
.
set
(
IWindowService
,
new
SyncDescriptor
(
WindowService
,
[
this
.
configuration
]));
// Update Service
const
updateChannel
=
electronMainClient
.
getChannel
(
'
update
'
);
serviceCollection
.
set
(
IUpdateService
,
new
SyncDescriptor
(
UpdateChannelClient
,
[
updateChannel
]));
...
...
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
16635b80
...
...
@@ -35,7 +35,6 @@ import { IFileService } from 'vs/platform/files/common/files';
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
ITitleService
}
from
'
vs/workbench/services/title/common/titleService
'
;
import
{
IInstantiationService
,
ServicesAccessor
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
SyncDescriptor
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
LifecyclePhase
,
StartupKind
,
ILifecycleService
,
WillShutdownEvent
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
IWindowService
,
IWindowConfiguration
,
IPath
,
MenuBarVisibility
,
getTitleBarStyle
}
from
'
vs/platform/windows/common/windows
'
;
...
...
@@ -63,16 +62,6 @@ import { Part } from 'vs/workbench/browser/part';
import
{
IStatusbarService
}
from
'
vs/platform/statusbar/common/statusbar
'
;
import
{
IActivityBarService
}
from
'
vs/workbench/services/activityBar/browser/activityBarService
'
;
// import@node
import
{
DialogChannel
}
from
'
vs/platform/dialogs/node/dialogIpc
'
;
import
{
IRemoteAgentService
}
from
'
vs/workbench/services/remote/node/remoteAgentService
'
;
import
{
DownloadServiceChannel
}
from
'
vs/platform/download/node/downloadIpc
'
;
import
{
LogLevelSetterChannel
}
from
'
vs/platform/log/node/logIpc
'
;
import
{
ISharedProcessService
}
from
'
vs/platform/sharedProcess/node/sharedProcessService
'
;
// import@electron-browser
import
{
WindowService
}
from
'
vs/platform/windows/electron-browser/windowService
'
;
enum
Settings
{
MENUBAR_VISIBLE
=
'
window.menuBarVisibility
'
,
ACTIVITYBAR_VISIBLE
=
'
workbench.activityBar.visible
'
,
...
...
@@ -269,37 +258,23 @@ export class Workbench extends Disposable implements IWorkbenchLayoutService {
private
initServices
(
serviceCollection
:
ServiceCollection
):
void
{
// Parts
serviceCollection
.
set
(
IWorkbenchLayoutService
,
this
);
// TODO@Ben use SyncDescriptor
// Window
serviceCollection
.
set
(
IWindowService
,
new
SyncDescriptor
(
WindowService
,
[
this
.
configuration
]));
// Layout Service
serviceCollection
.
set
(
IWorkbenchLayoutService
,
this
);
//
Contributed s
ervices
//
All Contributed S
ervices
const
contributedServices
=
getServices
();
for
(
let
contributedService
of
contributedServices
)
{
serviceCollection
.
set
(
contributedService
.
id
,
contributedService
.
descriptor
);
}
//
TODO@Steven this should move somewhere else
//
Wrap up
this
.
instantiationService
.
invokeFunction
(
accessor
=>
{
const
sharedProcessService
=
accessor
.
get
(
ISharedProcessService
);
sharedProcessService
.
registerChannel
(
'
dialog
'
,
this
.
instantiationService
.
createInstance
(
DialogChannel
));
});
// Signal to lifecycle that services are set
const
lifecycleService
=
accessor
.
get
(
ILifecycleService
);
lifecycleService
.
phase
=
LifecyclePhase
.
Ready
;
// TODO@Alex TODO@Sandeep this should move somewhere else
this
.
instantiationService
.
invokeFunction
(
accessor
=>
{
const
remoteAgentConnection
=
accessor
.
get
(
IRemoteAgentService
).
getConnection
();
if
(
remoteAgentConnection
)
{
remoteAgentConnection
.
registerChannel
(
'
dialog
'
,
this
.
instantiationService
.
createInstance
(
DialogChannel
));
remoteAgentConnection
.
registerChannel
(
'
download
'
,
new
DownloadServiceChannel
());
remoteAgentConnection
.
registerChannel
(
'
loglevel
'
,
new
LogLevelSetterChannel
(
this
.
logService
));
}
});
// TODO@Sandeep TODO@Martin debt around cyclic dependencies
this
.
instantiationService
.
invokeFunction
(
accessor
=>
{
// TODO@Sandeep TODO@Martin debt around cyclic dependencies
const
fileService
=
accessor
.
get
(
IFileService
);
const
instantiationService
=
accessor
.
get
(
IInstantiationService
);
const
configurationService
=
accessor
.
get
(
IConfigurationService
)
as
any
;
...
...
src/vs/workbench/services/dialogs/electron-browser/dialogService.ts
浏览文件 @
16635b80
...
...
@@ -23,6 +23,8 @@ import { WORKSPACE_EXTENSION } from 'vs/platform/workspaces/common/workspaces';
import
{
REMOTE_HOST_SCHEME
}
from
'
vs/platform/remote/common/remoteHosts
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
import
{
ISharedProcessService
}
from
'
vs/platform/sharedProcess/node/sharedProcessService
'
;
import
{
DialogChannel
}
from
'
vs/platform/dialogs/node/dialogIpc
'
;
interface
IMassagedMessageBoxOptions
{
...
...
@@ -45,8 +47,11 @@ export class DialogService implements IDialogService {
constructor
(
@
IWindowService
private
readonly
windowService
:
IWindowService
,
@
ILogService
private
readonly
logService
:
ILogService
)
{
}
@
ILogService
private
readonly
logService
:
ILogService
,
@
ISharedProcessService
sharedProcessService
:
ISharedProcessService
)
{
sharedProcessService
.
registerChannel
(
'
dialog
'
,
new
DialogChannel
(
this
));
}
confirm
(
confirmation
:
IConfirmation
):
Promise
<
IConfirmationResult
>
{
this
.
logService
.
trace
(
'
DialogService#confirm
'
,
confirmation
.
message
);
...
...
src/vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl.ts
浏览文件 @
16635b80
...
...
@@ -15,6 +15,12 @@ import { RemoteExtensionEnvironmentChannelClient } from 'vs/workbench/services/r
import
{
IRemoteAgentConnection
,
IRemoteAgentEnvironment
,
IRemoteAgentService
}
from
'
vs/workbench/services/remote/node/remoteAgentService
'
;
import
{
IRemoteAuthorityResolverService
}
from
'
vs/platform/remote/common/remoteAuthorityResolver
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
import
{
ILifecycleService
,
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
DialogChannel
}
from
'
vs/platform/dialogs/node/dialogIpc
'
;
import
{
DownloadServiceChannel
}
from
'
vs/platform/download/node/downloadIpc
'
;
import
{
LogLevelSetterChannel
}
from
'
vs/platform/log/node/logIpc
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
export
class
RemoteAgentService
implements
IRemoteAgentService
{
...
...
@@ -26,11 +32,20 @@ export class RemoteAgentService implements IRemoteAgentService {
@
IWindowService
windowService
:
IWindowService
,
@
INotificationService
notificationService
:
INotificationService
,
@
IEnvironmentService
environmentService
:
IEnvironmentService
,
@
IRemoteAuthorityResolverService
remoteAuthorityResolverService
:
IRemoteAuthorityResolverService
@
IRemoteAuthorityResolverService
remoteAuthorityResolverService
:
IRemoteAuthorityResolverService
,
@
ILifecycleService
lifecycleService
:
ILifecycleService
,
@
ILogService
logService
:
ILogService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
)
{
const
{
remoteAuthority
}
=
windowService
.
getConfiguration
();
if
(
remoteAuthority
)
{
this
.
_connection
=
new
RemoteAgentConnection
(
remoteAuthority
,
notificationService
,
environmentService
,
remoteAuthorityResolverService
);
const
connection
=
this
.
_connection
=
new
RemoteAgentConnection
(
remoteAuthority
,
notificationService
,
environmentService
,
remoteAuthorityResolverService
);
lifecycleService
.
when
(
LifecyclePhase
.
Ready
).
then
(()
=>
{
connection
.
registerChannel
(
'
dialog
'
,
instantiationService
.
createInstance
(
DialogChannel
));
connection
.
registerChannel
(
'
download
'
,
new
DownloadServiceChannel
());
connection
.
registerChannel
(
'
loglevel
'
,
new
LogLevelSetterChannel
(
logService
));
});
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录