Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
89affc5c
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,发现更多精彩内容 >>
提交
89affc5c
编写于
6月 14, 2018
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use URI for extension location
上级
a0558e44
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
54 addition
and
35 deletion
+54
-35
src/vs/base/parts/ipc/common/ipc.ts
src/vs/base/parts/ipc/common/ipc.ts
+11
-0
src/vs/platform/extensionManagement/common/extensionManagement.ts
...latform/extensionManagement/common/extensionManagement.ts
+2
-1
src/vs/platform/extensionManagement/common/extensionManagementIpc.ts
...form/extensionManagement/common/extensionManagementIpc.ts
+28
-18
src/vs/platform/extensionManagement/node/extensionLifecycle.ts
...s/platform/extensionManagement/node/extensionLifecycle.ts
+1
-1
src/vs/platform/extensionManagement/node/extensionManagementService.ts
...rm/extensionManagement/node/extensionManagementService.ts
+3
-3
src/vs/platform/localizations/node/localizations.ts
src/vs/platform/localizations/node/localizations.ts
+1
-1
src/vs/workbench/electron-browser/shell.ts
src/vs/workbench/electron-browser/shell.ts
+2
-2
src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts
...bench/parts/extensions/node/extensionsWorkbenchService.ts
+4
-2
src/vs/workbench/services/extensions/node/rpcProtocol.ts
src/vs/workbench/services/extensions/node/rpcProtocol.ts
+2
-7
未找到文件。
src/vs/base/parts/ipc/common/ipc.ts
浏览文件 @
89affc5c
...
@@ -8,6 +8,17 @@
...
@@ -8,6 +8,17 @@
import
{
Promise
,
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
Promise
,
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IDisposable
,
toDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IDisposable
,
toDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
Event
,
Emitter
,
once
,
filterEvent
}
from
'
vs/base/common/event
'
;
import
{
Event
,
Emitter
,
once
,
filterEvent
}
from
'
vs/base/common/event
'
;
import
URI
,
{
UriComponents
}
from
'
vs/base/common/uri
'
;
export
interface
IURITransformer
{
transformIncoming
(
uri
:
UriComponents
):
UriComponents
;
transformOutgoing
(
uri
:
URI
):
URI
;
}
export
const
DefaultURITransformer
:
IURITransformer
=
{
transformIncoming
:
(
uri
:
UriComponents
)
=>
uri
,
transformOutgoing
:
(
uri
:
URI
)
=>
URI
.
revive
(
uri
),
};
enum
MessageType
{
enum
MessageType
{
RequestCommon
,
RequestCommon
,
...
...
src/vs/platform/extensionManagement/common/extensionManagement.ts
浏览文件 @
89affc5c
...
@@ -11,6 +11,7 @@ import { Event } from 'vs/base/common/event';
...
@@ -11,6 +11,7 @@ import { Event } from 'vs/base/common/event';
import
{
IPager
}
from
'
vs/base/common/paging
'
;
import
{
IPager
}
from
'
vs/base/common/paging
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ILocalization
}
from
'
vs/platform/localizations/common/localizations
'
;
import
{
ILocalization
}
from
'
vs/platform/localizations/common/localizations
'
;
import
URI
from
'
vs/base/common/uri
'
;
export
const
EXTENSION_IDENTIFIER_PATTERN
=
'
^([a-z0-9A-Z][a-z0-9
\
-A-Z]*)
\\
.([a-z0-9A-Z][a-z0-9
\
-A-Z]*)$
'
;
export
const
EXTENSION_IDENTIFIER_PATTERN
=
'
^([a-z0-9A-Z][a-z0-9
\
-A-Z]*)
\\
.([a-z0-9A-Z][a-z0-9
\
-A-Z]*)$
'
;
export
const
EXTENSION_IDENTIFIER_REGEX
=
new
RegExp
(
EXTENSION_IDENTIFIER_PATTERN
);
export
const
EXTENSION_IDENTIFIER_REGEX
=
new
RegExp
(
EXTENSION_IDENTIFIER_PATTERN
);
...
@@ -205,7 +206,7 @@ export interface ILocalExtension {
...
@@ -205,7 +206,7 @@ export interface ILocalExtension {
identifier
:
IExtensionIdentifier
;
identifier
:
IExtensionIdentifier
;
manifest
:
IExtensionManifest
;
manifest
:
IExtensionManifest
;
metadata
:
IGalleryMetadata
;
metadata
:
IGalleryMetadata
;
path
:
string
;
location
:
URI
;
readmeUrl
:
string
;
readmeUrl
:
string
;
changelogUrl
:
string
;
changelogUrl
:
string
;
}
}
...
...
src/vs/platform/extensionManagement/common/extensionManagementIpc.ts
浏览文件 @
89affc5c
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
'
use strict
'
;
'
use strict
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IChannel
,
eventToCall
,
eventFromCall
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
IChannel
,
eventToCall
,
eventFromCall
,
IURITransformer
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
IExtensionManagementService
,
ILocalExtension
,
InstallExtensionEvent
,
DidInstallExtensionEvent
,
IGalleryExtension
,
LocalExtensionType
,
DidUninstallExtensionEvent
,
IExtensionIdentifier
,
IGalleryMetadata
,
IReportedExtension
}
from
'
./extensionManagement
'
;
import
{
IExtensionManagementService
,
ILocalExtension
,
InstallExtensionEvent
,
DidInstallExtensionEvent
,
IGalleryExtension
,
LocalExtensionType
,
DidUninstallExtensionEvent
,
IExtensionIdentifier
,
IGalleryMetadata
,
IReportedExtension
}
from
'
./extensionManagement
'
;
import
{
Event
,
buffer
}
from
'
vs/base/common/event
'
;
import
{
Event
,
buffer
}
from
'
vs/base/common/event
'
;
...
@@ -15,13 +15,13 @@ export interface IExtensionManagementChannel extends IChannel {
...
@@ -15,13 +15,13 @@ export interface IExtensionManagementChannel extends IChannel {
call
(
command
:
'
event:onDidInstallExtension
'
):
TPromise
<
void
>
;
call
(
command
:
'
event:onDidInstallExtension
'
):
TPromise
<
void
>
;
call
(
command
:
'
event:onUninstallExtension
'
):
TPromise
<
void
>
;
call
(
command
:
'
event:onUninstallExtension
'
):
TPromise
<
void
>
;
call
(
command
:
'
event:onDidUninstallExtension
'
):
TPromise
<
void
>
;
call
(
command
:
'
event:onDidUninstallExtension
'
):
TPromise
<
void
>
;
call
(
command
:
'
install
'
,
path
:
string
):
TPromise
<
ILocalExtension
>
;
call
(
command
:
'
install
'
,
args
:
[
string
]
):
TPromise
<
ILocalExtension
>
;
call
(
command
:
'
installFromGallery
'
,
extension
:
IGalleryExtension
):
TPromise
<
ILocalExtension
>
;
call
(
command
:
'
installFromGallery
'
,
args
:
[
IGalleryExtension
]
):
TPromise
<
ILocalExtension
>
;
call
(
command
:
'
uninstall
'
,
args
:
[
ILocalExtension
,
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
uninstall
'
,
args
:
[
ILocalExtension
,
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
reinstallFromGallery
'
,
args
:
[
ILocalExtension
]):
TPromise
<
ILocalExtension
>
;
call
(
command
:
'
reinstallFromGallery
'
,
args
:
[
ILocalExtension
]):
TPromise
<
ILocalExtension
>
;
call
(
command
:
'
getInstalled
'
):
TPromise
<
ILocalExtension
[]
>
;
call
(
command
:
'
getInstalled
'
,
args
:
[
LocalExtensionType
]
):
TPromise
<
ILocalExtension
[]
>
;
call
(
command
:
'
getExtensionsReport
'
):
TPromise
<
IReportedExtension
[]
>
;
call
(
command
:
'
getExtensionsReport
'
):
TPromise
<
IReportedExtension
[]
>
;
call
(
command
:
string
,
arg
?:
any
):
TPromise
<
any
>
;
call
(
command
:
'
updateMetadata
'
,
args
:
[
ILocalExtension
,
IGalleryMetadata
]):
TPromise
<
ILocalExtension
>
;
}
}
export
class
ExtensionManagementChannel
implements
IExtensionManagementChannel
{
export
class
ExtensionManagementChannel
implements
IExtensionManagementChannel
{
...
@@ -38,18 +38,18 @@ export class ExtensionManagementChannel implements IExtensionManagementChannel {
...
@@ -38,18 +38,18 @@ export class ExtensionManagementChannel implements IExtensionManagementChannel {
this
.
onDidUninstallExtension
=
buffer
(
service
.
onDidUninstallExtension
,
true
);
this
.
onDidUninstallExtension
=
buffer
(
service
.
onDidUninstallExtension
,
true
);
}
}
call
(
command
:
string
,
arg
?:
any
):
TPromise
<
any
>
{
call
(
command
:
string
,
arg
s
?:
any
):
TPromise
<
any
>
{
switch
(
command
)
{
switch
(
command
)
{
case
'
event:onInstallExtension
'
:
return
eventToCall
(
this
.
onInstallExtension
);
case
'
event:onInstallExtension
'
:
return
eventToCall
(
this
.
onInstallExtension
);
case
'
event:onDidInstallExtension
'
:
return
eventToCall
(
this
.
onDidInstallExtension
);
case
'
event:onDidInstallExtension
'
:
return
eventToCall
(
this
.
onDidInstallExtension
);
case
'
event:onUninstallExtension
'
:
return
eventToCall
(
this
.
onUninstallExtension
);
case
'
event:onUninstallExtension
'
:
return
eventToCall
(
this
.
onUninstallExtension
);
case
'
event:onDidUninstallExtension
'
:
return
eventToCall
(
this
.
onDidUninstallExtension
);
case
'
event:onDidUninstallExtension
'
:
return
eventToCall
(
this
.
onDidUninstallExtension
);
case
'
install
'
:
return
this
.
service
.
install
(
arg
);
case
'
install
'
:
return
this
.
service
.
install
(
arg
s
[
0
]
);
case
'
installFromGallery
'
:
return
this
.
service
.
installFromGallery
(
arg
[
0
]);
case
'
installFromGallery
'
:
return
this
.
service
.
installFromGallery
(
arg
s
[
0
]);
case
'
uninstall
'
:
return
this
.
service
.
uninstall
(
arg
[
0
],
arg
[
1
]);
case
'
uninstall
'
:
return
this
.
service
.
uninstall
(
arg
s
[
0
],
args
[
1
]);
case
'
reinstallFromGallery
'
:
return
this
.
service
.
reinstallFromGallery
(
arg
[
0
]);
case
'
reinstallFromGallery
'
:
return
this
.
service
.
reinstallFromGallery
(
arg
s
[
0
]);
case
'
getInstalled
'
:
return
this
.
service
.
getInstalled
(
arg
);
case
'
getInstalled
'
:
return
this
.
service
.
getInstalled
(
arg
s
[
0
]
);
case
'
updateMetadata
'
:
return
this
.
service
.
updateMetadata
(
arg
[
0
],
arg
[
1
]);
case
'
updateMetadata
'
:
return
this
.
service
.
updateMetadata
(
arg
s
[
0
],
args
[
1
]);
case
'
getExtensionsReport
'
:
return
this
.
service
.
getExtensionsReport
();
case
'
getExtensionsReport
'
:
return
this
.
service
.
getExtensionsReport
();
}
}
return
undefined
;
return
undefined
;
...
@@ -60,7 +60,7 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
...
@@ -60,7 +60,7 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
_serviceBrand
:
any
;
_serviceBrand
:
any
;
constructor
(
private
channel
:
IExtensionManagementChannel
)
{
}
constructor
(
private
channel
:
IExtensionManagementChannel
,
private
uriTransformer
:
IURITransformer
)
{
}
private
_onInstallExtension
=
eventFromCall
<
InstallExtensionEvent
>
(
this
.
channel
,
'
event:onInstallExtension
'
);
private
_onInstallExtension
=
eventFromCall
<
InstallExtensionEvent
>
(
this
.
channel
,
'
event:onInstallExtension
'
);
get
onInstallExtension
():
Event
<
InstallExtensionEvent
>
{
return
this
.
_onInstallExtension
;
}
get
onInstallExtension
():
Event
<
InstallExtensionEvent
>
{
return
this
.
_onInstallExtension
;
}
...
@@ -75,11 +75,13 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
...
@@ -75,11 +75,13 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
get
onDidUninstallExtension
():
Event
<
DidUninstallExtensionEvent
>
{
return
this
.
_onDidUninstallExtension
;
}
get
onDidUninstallExtension
():
Event
<
DidUninstallExtensionEvent
>
{
return
this
.
_onDidUninstallExtension
;
}
install
(
zipPath
:
string
):
TPromise
<
ILocalExtension
>
{
install
(
zipPath
:
string
):
TPromise
<
ILocalExtension
>
{
return
this
.
channel
.
call
(
'
install
'
,
zipPath
);
return
this
.
channel
.
call
(
'
install
'
,
[
zipPath
])
.
then
(
extension
=>
this
.
_transform
(
extension
));
}
}
installFromGallery
(
extension
:
IGalleryExtension
):
TPromise
<
ILocalExtension
>
{
installFromGallery
(
extension
:
IGalleryExtension
):
TPromise
<
ILocalExtension
>
{
return
this
.
channel
.
call
(
'
installFromGallery
'
,
[
extension
]);
return
this
.
channel
.
call
(
'
installFromGallery
'
,
[
extension
])
.
then
(
extension
=>
this
.
_transform
(
extension
));
}
}
uninstall
(
extension
:
ILocalExtension
,
force
=
false
):
TPromise
<
void
>
{
uninstall
(
extension
:
ILocalExtension
,
force
=
false
):
TPromise
<
void
>
{
...
@@ -87,18 +89,26 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
...
@@ -87,18 +89,26 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
}
}
reinstallFromGallery
(
extension
:
ILocalExtension
):
TPromise
<
ILocalExtension
>
{
reinstallFromGallery
(
extension
:
ILocalExtension
):
TPromise
<
ILocalExtension
>
{
return
this
.
channel
.
call
(
'
reinstallFromGallery
'
,
[
extension
]);
return
this
.
channel
.
call
(
'
reinstallFromGallery
'
,
[
extension
])
.
then
(
extension
=>
this
.
_transform
(
extension
));
}
}
getInstalled
(
type
:
LocalExtensionType
=
null
):
TPromise
<
ILocalExtension
[]
>
{
getInstalled
(
type
:
LocalExtensionType
=
null
):
TPromise
<
ILocalExtension
[]
>
{
return
this
.
channel
.
call
(
'
getInstalled
'
,
type
);
return
this
.
channel
.
call
(
'
getInstalled
'
,
[
type
])
.
then
(
extensions
=>
extensions
.
map
(
extension
=>
this
.
_transform
(
extension
)));
}
}
updateMetadata
(
local
:
ILocalExtension
,
metadata
:
IGalleryMetadata
):
TPromise
<
ILocalExtension
>
{
updateMetadata
(
local
:
ILocalExtension
,
metadata
:
IGalleryMetadata
):
TPromise
<
ILocalExtension
>
{
return
this
.
channel
.
call
(
'
updateMetadata
'
,
[
local
,
metadata
]);
return
this
.
channel
.
call
(
'
updateMetadata
'
,
[
local
,
metadata
])
.
then
(
extension
=>
this
.
_transform
(
extension
));
}
}
getExtensionsReport
():
TPromise
<
IReportedExtension
[]
>
{
getExtensionsReport
():
TPromise
<
IReportedExtension
[]
>
{
return
this
.
channel
.
call
(
'
getExtensionsReport
'
);
return
this
.
channel
.
call
(
'
getExtensionsReport
'
);
}
}
private
_transform
(
extension
:
ILocalExtension
):
ILocalExtension
{
return
{
...
extension
,
...{
location
:
this
.
uriTransformer
.
transformOutgoing
(
extension
.
location
)
}
};
}
}
}
\ No newline at end of file
src/vs/platform/extensionManagement/node/extensionLifecycle.ts
浏览文件 @
89affc5c
...
@@ -42,7 +42,7 @@ export class ExtensionsLifecycle extends Disposable {
...
@@ -42,7 +42,7 @@ export class ExtensionsLifecycle extends Disposable {
this
.
logService
.
warn
(
extension
.
identifier
.
id
,
'
Uninstall script should be a node script
'
);
this
.
logService
.
warn
(
extension
.
identifier
.
id
,
'
Uninstall script should be a node script
'
);
return
null
;
return
null
;
}
}
return
{
uninstallHook
:
join
(
extension
.
path
,
uninstallScript
[
1
]),
args
:
uninstallScript
.
slice
(
2
)
||
[]
};
return
{
uninstallHook
:
join
(
extension
.
location
.
path
,
uninstallScript
[
1
]),
args
:
uninstallScript
.
slice
(
2
)
||
[]
};
}
}
return
null
;
return
null
;
}
}
...
...
src/vs/platform/extensionManagement/node/extensionManagementService.ts
浏览文件 @
89affc5c
...
@@ -658,7 +658,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
...
@@ -658,7 +658,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
}
}
private
preUninstallExtension
(
extension
:
ILocalExtension
):
TPromise
<
void
>
{
private
preUninstallExtension
(
extension
:
ILocalExtension
):
TPromise
<
void
>
{
return
pfs
.
exists
(
extension
.
path
)
return
pfs
.
exists
(
extension
.
location
.
path
)
.
then
(
exists
=>
exists
?
null
:
TPromise
.
wrapError
(
new
Error
(
nls
.
localize
(
'
notExists
'
,
"
Could not find extension
"
))))
.
then
(
exists
=>
exists
?
null
:
TPromise
.
wrapError
(
new
Error
(
nls
.
localize
(
'
notExists
'
,
"
Could not find extension
"
))))
.
then
(()
=>
{
.
then
(()
=>
{
this
.
logService
.
info
(
'
Uninstalling extension:
'
,
extension
.
identifier
.
id
);
this
.
logService
.
info
(
'
Uninstalling extension:
'
,
extension
.
identifier
.
id
);
...
@@ -747,7 +747,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
...
@@ -747,7 +747,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
manifest
.
extensionDependencies
=
manifest
.
extensionDependencies
.
map
(
id
=>
adoptToGalleryExtensionId
(
id
));
manifest
.
extensionDependencies
=
manifest
.
extensionDependencies
.
map
(
id
=>
adoptToGalleryExtensionId
(
id
));
}
}
const
identifier
=
{
id
:
type
===
LocalExtensionType
.
System
?
folderName
:
getLocalExtensionIdFromManifest
(
manifest
),
uuid
:
metadata
?
metadata
.
id
:
null
};
const
identifier
=
{
id
:
type
===
LocalExtensionType
.
System
?
folderName
:
getLocalExtensionIdFromManifest
(
manifest
),
uuid
:
metadata
?
metadata
.
id
:
null
};
return
{
type
,
identifier
,
manifest
,
metadata
,
path
:
extensionPath
,
readmeUrl
,
changelogUrl
};
return
{
type
,
identifier
,
manifest
,
metadata
,
location
:
URI
.
file
(
extensionPath
)
,
readmeUrl
,
changelogUrl
};
}))
}))
.
then
(
null
,
()
=>
null
);
.
then
(
null
,
()
=>
null
);
}
}
...
@@ -788,7 +788,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
...
@@ -788,7 +788,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
private
removeExtension
(
extension
:
ILocalExtension
,
type
:
string
):
TPromise
<
void
>
{
private
removeExtension
(
extension
:
ILocalExtension
,
type
:
string
):
TPromise
<
void
>
{
this
.
logService
.
trace
(
`Deleting
${
type
}
extension from disk`
,
extension
.
identifier
.
id
);
this
.
logService
.
trace
(
`Deleting
${
type
}
extension from disk`
,
extension
.
identifier
.
id
);
return
pfs
.
rimraf
(
extension
.
path
).
then
(()
=>
this
.
logService
.
info
(
'
Deleted from disk
'
,
extension
.
identifier
.
id
));
return
pfs
.
rimraf
(
extension
.
location
.
path
).
then
(()
=>
this
.
logService
.
info
(
'
Deleted from disk
'
,
extension
.
identifier
.
id
));
}
}
private
isUninstalled
(
id
:
string
):
TPromise
<
boolean
>
{
private
isUninstalled
(
id
:
string
):
TPromise
<
boolean
>
{
...
...
src/vs/platform/localizations/node/localizations.ts
浏览文件 @
89affc5c
...
@@ -151,7 +151,7 @@ class LanguagePacksCache extends Disposable {
...
@@ -151,7 +151,7 @@ class LanguagePacksCache extends Disposable {
languagePack
.
extensions
.
push
({
extensionIdentifier
,
version
:
extension
.
manifest
.
version
});
languagePack
.
extensions
.
push
({
extensionIdentifier
,
version
:
extension
.
manifest
.
version
});
}
}
for
(
const
translation
of
localizationContribution
.
translations
)
{
for
(
const
translation
of
localizationContribution
.
translations
)
{
languagePack
.
translations
[
translation
.
id
]
=
join
(
extension
.
path
,
translation
.
path
);
languagePack
.
translations
[
translation
.
id
]
=
join
(
extension
.
location
.
path
,
translation
.
path
);
}
}
}
}
}
}
...
...
src/vs/workbench/electron-browser/shell.ts
浏览文件 @
89affc5c
...
@@ -60,7 +60,7 @@ import { WorkbenchModeServiceImpl } from 'vs/workbench/services/mode/common/work
...
@@ -60,7 +60,7 @@ import { WorkbenchModeServiceImpl } from 'vs/workbench/services/mode/common/work
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IUntitledEditorService
,
UntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
IUntitledEditorService
,
UntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
ICrashReporterService
,
NullCrashReporterService
,
CrashReporterService
}
from
'
vs/workbench/services/crashReporter/electron-browser/crashReporterService
'
;
import
{
ICrashReporterService
,
NullCrashReporterService
,
CrashReporterService
}
from
'
vs/workbench/services/crashReporter/electron-browser/crashReporterService
'
;
import
{
getDelayedChannel
,
IPCClient
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
getDelayedChannel
,
IPCClient
,
DefaultURITransformer
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
connect
as
connectNet
}
from
'
vs/base/parts/ipc/node/ipc.net
'
;
import
{
connect
as
connectNet
}
from
'
vs/base/parts/ipc/node/ipc.net
'
;
import
{
IExtensionManagementChannel
,
ExtensionManagementChannelClient
}
from
'
vs/platform/extensionManagement/common/extensionManagementIpc
'
;
import
{
IExtensionManagementChannel
,
ExtensionManagementChannelClient
}
from
'
vs/platform/extensionManagement/common/extensionManagementIpc
'
;
import
{
IExtensionManagementService
,
IExtensionEnablementService
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
import
{
IExtensionManagementService
,
IExtensionEnablementService
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
...
@@ -407,7 +407,7 @@ export class WorkbenchShell {
...
@@ -407,7 +407,7 @@ export class WorkbenchShell {
this
.
lifecycleService
=
lifecycleService
;
this
.
lifecycleService
=
lifecycleService
;
const
extensionManagementChannel
=
getDelayedChannel
<
IExtensionManagementChannel
>
(
sharedProcess
.
then
(
c
=>
c
.
getChannel
(
'
extensions
'
)));
const
extensionManagementChannel
=
getDelayedChannel
<
IExtensionManagementChannel
>
(
sharedProcess
.
then
(
c
=>
c
.
getChannel
(
'
extensions
'
)));
serviceCollection
.
set
(
IExtensionManagementService
,
new
SyncDescriptor
(
ExtensionManagementChannelClient
,
extensionManagementChannel
));
serviceCollection
.
set
(
IExtensionManagementService
,
new
SyncDescriptor
(
ExtensionManagementChannelClient
,
extensionManagementChannel
,
DefaultURITransformer
));
const
extensionEnablementService
=
instantiationService
.
createInstance
(
ExtensionEnablementService
);
const
extensionEnablementService
=
instantiationService
.
createInstance
(
ExtensionEnablementService
);
serviceCollection
.
set
(
IExtensionEnablementService
,
extensionEnablementService
);
serviceCollection
.
set
(
IExtensionEnablementService
,
extensionEnablementService
);
...
...
src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts
浏览文件 @
89affc5c
...
@@ -134,8 +134,10 @@ class Extension implements IExtension {
...
@@ -134,8 +134,10 @@ class Extension implements IExtension {
}
}
private
get
localIconUrl
():
string
{
private
get
localIconUrl
():
string
{
return
this
.
local
&&
this
.
local
.
manifest
.
icon
if
(
this
.
local
&&
this
.
local
.
manifest
.
icon
)
{
&&
URI
.
file
(
path
.
join
(
this
.
local
.
path
,
this
.
local
.
manifest
.
icon
)).
toString
();
return
this
.
local
.
location
.
with
({
path
:
path
.
join
(
this
.
local
.
location
.
path
,
this
.
local
.
manifest
.
icon
)
}).
toString
();
}
return
null
;
}
}
private
get
galleryIconUrl
():
string
{
private
get
galleryIconUrl
():
string
{
...
...
src/vs/workbench/services/extensions/node/rpcProtocol.ts
浏览文件 @
89affc5c
...
@@ -6,20 +6,15 @@
...
@@ -6,20 +6,15 @@
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
{
IMessagePassingProtocol
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
IMessagePassingProtocol
,
IURITransformer
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
LazyPromise
}
from
'
vs/workbench/services/extensions/node/lazyPromise
'
;
import
{
LazyPromise
}
from
'
vs/workbench/services/extensions/node/lazyPromise
'
;
import
{
ProxyIdentifier
,
IRPCProtocol
}
from
'
vs/workbench/services/extensions/node/proxyIdentifier
'
;
import
{
ProxyIdentifier
,
IRPCProtocol
}
from
'
vs/workbench/services/extensions/node/proxyIdentifier
'
;
import
{
CharCode
}
from
'
vs/base/common/charCode
'
;
import
{
CharCode
}
from
'
vs/base/common/charCode
'
;
import
URI
,
{
UriComponents
}
from
'
vs/base/common/uri
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
MarshalledObject
}
from
'
vs/base/common/marshalling
'
;
import
{
MarshalledObject
}
from
'
vs/base/common/marshalling
'
;
declare
var
Proxy
:
any
;
// TODO@TypeScript
declare
var
Proxy
:
any
;
// TODO@TypeScript
export
interface
IURITransformer
{
transformIncoming
(
uri
:
UriComponents
):
UriComponents
;
transformOutgoing
(
uri
:
URI
):
URI
;
}
function
_transformOutgoingURIs
(
obj
:
any
,
transformer
:
IURITransformer
,
depth
:
number
):
any
{
function
_transformOutgoingURIs
(
obj
:
any
,
transformer
:
IURITransformer
,
depth
:
number
):
any
{
if
(
!
obj
||
depth
>
200
)
{
if
(
!
obj
||
depth
>
200
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录