Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
6f594d08
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,发现更多精彩内容 >>
提交
6f594d08
编写于
11月 13, 2018
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
exploration
上级
138e66a7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
11 deletion
+25
-11
src/vs/platform/extensionManagement/node/multiExtensionManagement.ts
...form/extensionManagement/node/multiExtensionManagement.ts
+17
-4
src/vs/platform/remote/common/remoteAuthorityResolver.ts
src/vs/platform/remote/common/remoteAuthorityResolver.ts
+2
-1
src/vs/platform/remote/node/remoteAuthorityResolverChannel.ts
...vs/platform/remote/node/remoteAuthorityResolverChannel.ts
+4
-4
src/vs/platform/remote/node/remoteAuthorityResolverService.ts
...vs/platform/remote/node/remoteAuthorityResolverService.ts
+2
-2
未找到文件。
src/vs/platform/extensionManagement/node/multiExtensionManagement.ts
浏览文件 @
6f594d08
...
...
@@ -15,6 +15,7 @@ import { URI } from 'vs/base/common/uri';
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
IRemoteAuthorityResolverService
,
IRemoteAuthorityResolver
}
from
'
vs/platform/remote/common/remoteAuthorityResolver
'
;
export
class
MulitExtensionManagementService
extends
Disposable
implements
IExtensionManagementService
{
...
...
@@ -30,7 +31,8 @@ export class MulitExtensionManagementService extends Disposable implements IExte
constructor
(
@
IExtensionManagementServerService
private
extensionManagementServerService
:
IExtensionManagementServerService
,
@
IExtensionGalleryService
private
extensionGalleryService
:
IExtensionGalleryService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
@
IConfigurationService
private
configurationService
:
IConfigurationService
,
@
IRemoteAuthorityResolverService
private
remoteAuthorityResolverService
:
IRemoteAuthorityResolverService
)
{
super
();
this
.
servers
=
this
.
extensionManagementServerService
.
otherExtensionManagementServer
?
[
this
.
extensionManagementServerService
.
localExtensionManagementServer
,
this
.
extensionManagementServerService
.
otherExtensionManagementServer
]
:
[
this
.
extensionManagementServerService
.
localExtensionManagementServer
];
...
...
@@ -83,9 +85,9 @@ export class MulitExtensionManagementService extends Disposable implements IExte
if
(
!
this
.
extensionManagementServerService
.
otherExtensionManagementServer
)
{
return
this
.
extensionManagementServerService
.
localExtensionManagementServer
.
extensionManagementService
.
installFromGallery
(
gallery
);
}
return
this
.
extensionGalleryService
.
getManifest
(
gallery
,
CancellationToken
.
None
)
.
then
(
manifest
=>
{
const
servers
=
!
isUIExtension
(
manifest
,
this
.
configurationService
)
?
this
.
servers
:
[
this
.
extensionManagementServerService
.
local
ExtensionManagementServer
];
return
Promise
.
all
([
this
.
extensionGalleryService
.
getManifest
(
gallery
,
CancellationToken
.
None
),
this
.
hasToSyncExtensions
()]
)
.
then
(
([
manifest
,
syncExtensions
])
=>
{
const
servers
=
isUIExtension
(
manifest
,
this
.
configurationService
)
?
[
this
.
extensionManagementServerService
.
localExtensionManagementServer
]
:
syncExtensions
?
this
.
servers
:
[
this
.
extensionManagementServerService
.
other
ExtensionManagementServer
];
return
Promise
.
all
(
servers
.
map
(
server
=>
server
.
extensionManagementService
.
installFromGallery
(
gallery
)))
.
then
(()
=>
null
);
});
...
...
@@ -98,4 +100,15 @@ export class MulitExtensionManagementService extends Disposable implements IExte
private
getServer
(
extension
:
ILocalExtension
):
IExtensionManagementServer
{
return
this
.
extensionManagementServerService
.
getExtensionManagementServer
(
extension
.
location
);
}
private
_remoteAuthorityResolverPromise
:
Thenable
<
IRemoteAuthorityResolver
>
;
private
hasToSyncExtensions
():
Thenable
<
boolean
>
{
if
(
!
this
.
extensionManagementServerService
.
otherExtensionManagementServer
)
{
return
Promise
.
resolve
(
false
);
}
if
(
!
this
.
_remoteAuthorityResolverPromise
)
{
this
.
_remoteAuthorityResolverPromise
=
this
.
remoteAuthorityResolverService
.
getRemoteAuthorityResolver
(
this
.
extensionManagementServerService
.
otherExtensionManagementServer
.
authority
);
}
return
this
.
_remoteAuthorityResolverPromise
.
then
(({
syncExtensions
})
=>
!!
syncExtensions
);
}
}
\ No newline at end of file
src/vs/platform/remote/common/remoteAuthorityResolver.ts
浏览文件 @
6f594d08
...
...
@@ -28,11 +28,12 @@ export interface IRemoteAuthorityResolverService {
resolveAuthority
(
authority
:
string
):
Thenable
<
ResolvedAuthority
>
;
get
Label
(
authority
:
string
):
Thenable
<
string
|
null
>
;
get
RemoteAuthorityResolver
(
authority
:
string
):
Thenable
<
IRemoteAuthorityResolver
|
null
>
;
}
export
interface
IRemoteAuthorityResolver
{
label
:
string
;
path
:
string
;
authorityPrefix
:
string
;
syncExtensions
?:
boolean
;
}
src/vs/platform/remote/node/remoteAuthorityResolverChannel.ts
浏览文件 @
6f594d08
...
...
@@ -5,7 +5,7 @@
import
{
IChannel
,
IServerChannel
}
from
'
vs/base/parts/ipc/node/ipc
'
;
import
{
Event
,
buffer
}
from
'
vs/base/common/event
'
;
import
{
ResolvedAuthority
,
IResolvingProgressEvent
,
IRemoteAuthorityResolverService
}
from
'
vs/platform/remote/common/remoteAuthorityResolver
'
;
import
{
ResolvedAuthority
,
IResolvingProgressEvent
,
IRemoteAuthorityResolverService
,
IRemoteAuthorityResolver
}
from
'
vs/platform/remote/common/remoteAuthorityResolver
'
;
export
class
RemoteAuthorityResolverChannel
implements
IServerChannel
{
...
...
@@ -26,7 +26,7 @@ export class RemoteAuthorityResolverChannel implements IServerChannel {
call
(
_
,
command
:
string
,
args
?:
any
):
Thenable
<
any
>
{
switch
(
command
)
{
case
'
resolveAuthority
'
:
return
this
.
service
.
resolveAuthority
(
args
[
0
]);
case
'
get
Label
'
:
return
this
.
service
.
getLabel
(
args
[
0
]);
case
'
get
RemoteAuthorityResolver
'
:
return
this
.
service
.
getRemoteAuthorityResolver
(
args
[
0
]);
}
throw
new
Error
(
'
Invalid call
'
);
...
...
@@ -51,8 +51,8 @@ export class RemoteAuthorityResolverChannelClient implements IRemoteAuthorityRes
return
this
.
_resolveAuthorityCache
[
authority
];
}
get
Label
(
authority
:
string
):
Thenable
<
string
|
null
>
{
return
this
.
channel
.
call
(
'
get
Label
'
,
[
authority
]);
get
RemoteAuthorityResolver
(
authority
:
string
):
Thenable
<
IRemoteAuthorityResolver
|
null
>
{
return
this
.
channel
.
call
(
'
get
RemoteAuthorityResolver
'
,
[
authority
]);
}
private
_resolveAuthority
(
authority
:
string
):
Thenable
<
ResolvedAuthority
>
{
...
...
src/vs/platform/remote/node/remoteAuthorityResolverService.ts
浏览文件 @
6f594d08
...
...
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
IRemoteAuthorityResolverService
,
ResolvedAuthority
,
IResolvingProgressEvent
}
from
'
vs/platform/remote/common/remoteAuthorityResolver
'
;
import
{
IRemoteAuthorityResolverService
,
ResolvedAuthority
,
IResolvingProgressEvent
,
IRemoteAuthorityResolver
}
from
'
vs/platform/remote/common/remoteAuthorityResolver
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
...
...
@@ -31,7 +31,7 @@ export class RemoteAuthorityResolverService extends Disposable implements IRemot
throw
new
Error
(
`Not implemented`
);
}
async
get
Label
(
authority
:
string
):
Promise
<
string
|
null
>
{
async
get
RemoteAuthorityResolver
(
authority
:
string
):
Promise
<
IRemoteAuthorityResolver
|
null
>
{
throw
new
Error
(
`Not implemented`
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录