Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
f5992a03
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 搜索 >>
提交
f5992a03
编写于
10月 25, 2016
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix #14380
上级
b326ba71
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
7 deletion
+28
-7
src/vs/workbench/electron-browser/shell.ts
src/vs/workbench/electron-browser/shell.ts
+5
-4
src/vs/workbench/parts/extensions/electron-browser/extensionsWorkbenchService.ts
...extensions/electron-browser/extensionsWorkbenchService.ts
+0
-1
src/vs/workbench/services/extensions/electron-browser/extensions.ts
...kbench/services/extensions/electron-browser/extensions.ts
+23
-2
未找到文件。
src/vs/workbench/electron-browser/shell.ts
浏览文件 @
f5992a03
...
...
@@ -288,8 +288,13 @@ export class WorkbenchShell {
this
.
toUnbind
.
push
(
lifecycleService
.
onShutdown
(()
=>
disposables
.
dispose
()));
serviceCollection
.
set
(
ILifecycleService
,
lifecycleService
);
const
extensionManagementChannel
=
getDelayedChannel
<
IExtensionManagementChannel
>
(
sharedProcess
.
then
(
c
=>
c
.
getChannel
(
'
extensions
'
)));
const
extensionManagementChannelClient
=
new
ExtensionManagementChannelClient
(
extensionManagementChannel
);
serviceCollection
.
set
(
IExtensionManagementService
,
extensionManagementChannelClient
);
const
extensionsRuntimeService
=
instantiationService
.
createInstance
(
ExtensionsRuntimeService
);
serviceCollection
.
set
(
IExtensionsRuntimeService
,
extensionsRuntimeService
);
disposables
.
add
(
extensionsRuntimeService
);
const
extensionHostProcessWorker
=
this
.
startExtensionHost
(
instantiationService
);
this
.
threadService
=
instantiationService
.
createInstance
(
MainThreadService
,
extensionHostProcessWorker
.
messagingProtocol
);
...
...
@@ -333,10 +338,6 @@ export class WorkbenchShell {
const
integrityService
=
instantiationService
.
createInstance
(
IntegrityServiceImpl
);
serviceCollection
.
set
(
IIntegrityService
,
integrityService
);
const
extensionManagementChannel
=
getDelayedChannel
<
IExtensionManagementChannel
>
(
sharedProcess
.
then
(
c
=>
c
.
getChannel
(
'
extensions
'
)));
const
extensionManagementChannelClient
=
new
ExtensionManagementChannelClient
(
extensionManagementChannel
);
serviceCollection
.
set
(
IExtensionManagementService
,
extensionManagementChannelClient
);
const
urlChannel
=
mainProcessClient
.
getChannel
(
'
url
'
);
const
urlChannelClient
=
new
URLChannelClient
(
urlChannel
,
this
.
windowService
.
getWindowId
());
serviceCollection
.
set
(
IURLService
,
urlChannelClient
);
...
...
src/vs/workbench/parts/extensions/electron-browser/extensionsWorkbenchService.ts
浏览文件 @
f5992a03
...
...
@@ -627,7 +627,6 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService {
if
(
!
error
)
{
this
.
unInstalled
.
push
(
uninstalling
.
extension
);
this
.
extensionsRuntimeService
.
setEnablement
(
uninstalling
.
extension
.
identifier
,
true
);
uninstalling
.
extension
.
needsReload
=
!
newlyInstalled
;
this
.
reportTelemetry
(
uninstalling
,
true
);
}
...
...
src/vs/workbench/services/extensions/electron-browser/extensions.ts
浏览文件 @
f5992a03
...
...
@@ -9,7 +9,9 @@ import { TPromise } from 'vs/base/common/winjs.base';
import
{
distinct
}
from
'
vs/base/common/arrays
'
;
import
*
as
paths
from
'
vs/base/common/paths
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
ExtensionScanner
,
MessagesCollector
}
from
'
vs/workbench/node/extensionPoints
'
;
import
{
IExtensionManagementService
,
DidUninstallExtensionEvent
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
import
{
IWorkspaceContextService
,
IWorkspace
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IExtensionsRuntimeService
,
IExtensionDescription
,
IMessage
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
...
...
@@ -29,17 +31,20 @@ export class ExtensionsRuntimeService implements IExtensionsRuntimeService {
private
workspace
:
IWorkspace
;
private
installedExtensions
:
TPromise
<
IExtensionDescription
[]
>
;
private
_globalDisabledExtensions
:
string
[];
private
_workspaceDisabledExtensions
:
string
[];
private
disposables
:
IDisposable
[]
=
[];
constructor
(
@
IStorageService
private
storageService
:
IStorageService
,
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
,
@
IMessageService
private
messageService
:
IMessageService
,
@
IEnvironmentService
private
environmentService
:
IEnvironmentService
@
IEnvironmentService
private
environmentService
:
IEnvironmentService
,
@
IExtensionManagementService
private
extensionManagementService
:
IExtensionManagementService
)
{
this
.
workspace
=
contextService
.
getWorkspace
();
extensionManagementService
.
onDidUninstallExtension
(
this
.
onDidUninstallExtension
,
this
,
this
.
disposables
);
}
public
getExtensions
(
includeDisabled
:
boolean
=
false
):
TPromise
<
IExtensionDescription
[]
>
{
...
...
@@ -163,6 +168,14 @@ export class ExtensionsRuntimeService implements IExtensionsRuntimeService {
}
}
private
onDidUninstallExtension
({
id
,
error
}:
DidUninstallExtensionEvent
):
void
{
if
(
!
error
)
{
id
=
stripVersion
(
id
);
this
.
enableExtension
(
id
,
StorageScope
.
WORKSPACE
);
this
.
enableExtension
(
id
,
StorageScope
.
GLOBAL
);
}
}
private
scanExtensions
():
TPromise
<
IExtensionDescription
[]
>
{
const
collector
=
new
MessagesCollector
();
const
version
=
pkg
.
version
;
...
...
@@ -226,4 +239,12 @@ export class ExtensionsRuntimeService implements IExtensionsRuntimeService {
}
}
}
dispose
():
void
{
this
.
disposables
=
dispose
(
this
.
disposables
);
}
}
function
stripVersion
(
id
:
string
):
string
{
return
id
.
replace
(
/-
\d
+
\.\d
+
\.\d
+$/
,
''
);
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录