Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
5adcd252
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 搜索 >>
提交
5adcd252
编写于
1月 08, 2021
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix #113257
上级
ed6c343e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
6 deletion
+7
-6
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
...nch/contrib/extensions/browser/extensions.contribution.ts
+1
-1
src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
...workbench/contrib/extensions/browser/extensionsActions.ts
+6
-5
未找到文件。
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
浏览文件 @
5adcd252
...
...
@@ -526,7 +526,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi
try
{
await
this
.
extensionsWorkbenchService
.
install
(
extension
);
}
catch
(
err
)
{
runAction
(
this
.
instantiationService
.
createInstance
(
PromptExtensionInstallFailureAction
,
extension
,
InstallOperation
.
Update
,
err
));
runAction
(
this
.
instantiationService
.
createInstance
(
PromptExtensionInstallFailureAction
,
extension
,
extension
.
latestVersion
,
InstallOperation
.
Update
,
err
));
}
}));
}
...
...
src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
浏览文件 @
5adcd252
...
...
@@ -98,6 +98,7 @@ export class PromptExtensionInstallFailureAction extends Action {
constructor
(
private
readonly
extension
:
IExtension
,
private
readonly
version
:
string
,
private
readonly
installOperation
:
InstallOperation
,
private
readonly
error
:
Error
,
@
IProductService
private
readonly
productService
:
IProductService
,
...
...
@@ -128,7 +129,7 @@ export class PromptExtensionInstallFailureAction extends Action {
if
(
this
.
extension
.
gallery
&&
this
.
productService
.
extensionsGallery
)
{
promptChoices
.
push
({
label
:
localize
(
'
download
'
,
"
Try Downloading Manually...
"
),
run
:
()
=>
this
.
openerService
.
open
(
URI
.
parse
(
`
${
this
.
productService
.
extensionsGallery
!
.
serviceUrl
}
/publishers/
${
this
.
extension
.
publisher
}
/vsextensions/
${
this
.
extension
.
name
}
/
${
this
.
extension
.
version
}
/vspackage`
)).
then
(()
=>
{
run
:
()
=>
this
.
openerService
.
open
(
URI
.
parse
(
`
${
this
.
productService
.
extensionsGallery
!
.
serviceUrl
}
/publishers/
${
this
.
extension
.
publisher
}
/vsextensions/
${
this
.
extension
.
name
}
/
${
this
.
version
}
/vspackage`
)).
then
(()
=>
{
this
.
notificationService
.
prompt
(
Severity
.
Info
,
localize
(
'
install vsix
'
,
'
Once downloaded, please manually install the downloaded VSIX of
\'
{0}
\'
.
'
,
this
.
extension
.
identifier
.
id
),
...
...
@@ -277,7 +278,7 @@ export abstract class AbstractInstallAction extends ExtensionAction {
try
{
return
await
this
.
extensionsWorkbenchService
.
install
(
extension
,
this
.
getInstallOptions
());
}
catch
(
error
)
{
await
this
.
instantiationService
.
createInstance
(
PromptExtensionInstallFailureAction
,
extension
,
InstallOperation
.
Install
,
error
).
run
();
await
this
.
instantiationService
.
createInstance
(
PromptExtensionInstallFailureAction
,
extension
,
extension
.
latestVersion
,
InstallOperation
.
Install
,
error
).
run
();
return
undefined
;
}
}
...
...
@@ -705,7 +706,7 @@ export class UpdateAction extends ExtensionAction {
await
this
.
extensionsWorkbenchService
.
install
(
extension
);
alert
(
localize
(
'
updateExtensionComplete
'
,
"
Updating extension {0} to version {1} completed.
"
,
extension
.
displayName
,
extension
.
latestVersion
));
}
catch
(
err
)
{
this
.
instantiationService
.
createInstance
(
PromptExtensionInstallFailureAction
,
extension
,
InstallOperation
.
Update
,
err
).
run
();
this
.
instantiationService
.
createInstance
(
PromptExtensionInstallFailureAction
,
extension
,
extension
.
latestVersion
,
InstallOperation
.
Update
,
err
).
run
();
}
}
...
...
@@ -1053,7 +1054,7 @@ export class InstallAnotherVersionAction extends ExtensionAction {
await
this
.
extensionsWorkbenchService
.
installVersion
(
this
.
extension
!
,
pick
.
id
);
}
}
catch
(
error
)
{
this
.
instantiationService
.
createInstance
(
PromptExtensionInstallFailureAction
,
this
.
extension
!
,
InstallOperation
.
Install
,
error
).
run
();
this
.
instantiationService
.
createInstance
(
PromptExtensionInstallFailureAction
,
this
.
extension
!
,
pick
.
latest
?
this
.
extension
!
.
latestVersion
:
pick
.
id
,
InstallOperation
.
Install
,
error
).
run
();
}
}
return
null
;
...
...
@@ -1641,7 +1642,7 @@ export class InstallRecommendedExtensionAction extends Action {
try
{
await
this
.
extensionWorkbenchService
.
install
(
extension
);
}
catch
(
err
)
{
this
.
instantiationService
.
createInstance
(
PromptExtensionInstallFailureAction
,
extension
,
InstallOperation
.
Install
,
err
).
run
();
this
.
instantiationService
.
createInstance
(
PromptExtensionInstallFailureAction
,
extension
,
extension
.
latestVersion
,
InstallOperation
.
Install
,
err
).
run
();
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录