Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
48eb87fd
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 搜索 >>
提交
48eb87fd
编写于
10月 29, 2020
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix #108584
上级
96d03d1e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
31 addition
and
36 deletion
+31
-36
src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
.../contrib/extensions/browser/extensionsWorkbenchService.ts
+31
-36
未找到文件。
src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
浏览文件 @
48eb87fd
...
...
@@ -209,12 +209,12 @@ class Extension implements IExtension {
return
this
.
gallery
?
this
.
gallery
.
preview
:
false
;
}
private
isGalleryOutdated
():
boolean
{
return
this
.
local
&&
this
.
gallery
?
semver
.
gt
(
this
.
local
.
manifest
.
version
,
this
.
gallery
.
version
)
:
false
;
}
getManifest
(
token
:
CancellationToken
):
Promise
<
IExtensionManifest
|
null
>
{
if
(
this
.
gallery
&&
!
this
.
isGalleryOutdated
())
{
if
(
this
.
local
&&
!
this
.
outdated
)
{
return
Promise
.
resolve
(
this
.
local
.
manifest
);
}
if
(
this
.
gallery
)
{
if
(
this
.
gallery
.
assets
.
manifest
)
{
return
this
.
galleryService
.
getManifest
(
this
.
gallery
,
token
);
}
...
...
@@ -222,19 +222,15 @@ class Extension implements IExtension {
return
Promise
.
resolve
(
null
);
}
if
(
this
.
local
)
{
return
Promise
.
resolve
(
this
.
local
.
manifest
);
}
return
Promise
.
resolve
(
null
);
}
hasReadme
():
boolean
{
if
(
this
.
gallery
&&
!
this
.
isGalleryOutdated
()
&&
this
.
gallery
.
assets
.
readme
)
{
if
(
this
.
local
&&
this
.
local
.
readmeUrl
)
{
return
true
;
}
if
(
this
.
local
&&
this
.
local
.
readmeUrl
)
{
if
(
this
.
gallery
&&
this
.
gallery
.
assets
.
readme
)
{
return
true
;
}
...
...
@@ -242,17 +238,17 @@ class Extension implements IExtension {
}
getReadme
(
token
:
CancellationToken
):
Promise
<
string
>
{
if
(
this
.
gallery
&&
!
this
.
isGalleryOutdated
())
{
if
(
this
.
local
&&
this
.
local
.
readmeUrl
&&
!
this
.
outdated
)
{
return
this
.
fileService
.
readFile
(
this
.
local
.
readmeUrl
).
then
(
content
=>
content
.
value
.
toString
());
}
if
(
this
.
gallery
)
{
if
(
this
.
gallery
.
assets
.
readme
)
{
return
this
.
galleryService
.
getReadme
(
this
.
gallery
,
token
);
}
this
.
telemetryService
.
publicLog
(
'
extensions:NotFoundReadMe
'
,
this
.
telemetryData
);
}
if
(
this
.
local
&&
this
.
local
.
readmeUrl
)
{
return
this
.
fileService
.
readFile
(
this
.
local
.
readmeUrl
).
then
(
content
=>
content
.
value
.
toString
());
}
if
(
this
.
type
===
ExtensionType
.
System
)
{
return
Promise
.
resolve
(
`#
${
this
.
displayName
||
this
.
name
}
**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
...
...
@@ -265,11 +261,11 @@ ${this.description}
}
hasChangelog
():
boolean
{
if
(
this
.
gallery
&&
this
.
gallery
.
assets
.
changelog
&&
!
this
.
isGalleryOutdated
()
)
{
if
(
this
.
local
&&
this
.
local
.
changelogUrl
)
{
return
true
;
}
if
(
this
.
local
&&
this
.
local
.
changelogUrl
)
{
if
(
this
.
gallery
&&
this
.
gallery
.
assets
.
changelog
)
{
return
true
;
}
...
...
@@ -277,42 +273,41 @@ ${this.description}
}
getChangelog
(
token
:
CancellationToken
):
Promise
<
string
>
{
if
(
this
.
gallery
&&
this
.
gallery
.
assets
.
changelog
&&
!
this
.
isGalleryOutdated
())
{
return
this
.
galleryService
.
getChangelog
(
this
.
gallery
,
token
);
}
const
changelogUrl
=
this
.
local
&&
this
.
local
.
changelogUrl
;
if
(
this
.
local
&&
this
.
local
.
changelogUrl
&&
!
this
.
outdated
)
{
return
this
.
fileService
.
readFile
(
this
.
local
.
changelogUrl
).
then
(
content
=>
content
.
value
.
toString
());
}
if
(
!
changelogUrl
)
{
if
(
this
.
type
===
ExtensionType
.
System
)
{
return
Promise
.
resolve
(
'
Please check the [VS Code Release Notes](command:update.showCurrentReleaseNotes) for changes to the built-in extensions.
'
);
}
if
(
this
.
gallery
&&
this
.
gallery
.
assets
.
changelog
)
{
return
this
.
galleryService
.
getChangelog
(
this
.
gallery
,
token
);
}
return
Promise
.
reject
(
new
Error
(
'
not available
'
));
if
(
this
.
type
===
ExtensionType
.
System
)
{
return
Promise
.
resolve
(
'
Please check the [VS Code Release Notes](command:update.showCurrentReleaseNotes) for changes to the built-in extensions.
'
);
}
return
this
.
fileService
.
readFile
(
changelogUrl
).
then
(
content
=>
content
.
value
.
toString
(
));
return
Promise
.
reject
(
new
Error
(
'
not available
'
));
}
get
dependencies
():
string
[]
{
const
{
local
,
gallery
}
=
this
;
if
(
gallery
&&
!
this
.
isGalleryOutdated
())
{
return
gallery
.
properties
.
dependencies
||
[];
}
if
(
local
&&
local
.
manifest
.
extensionDependencies
)
{
if
(
local
&&
local
.
manifest
.
extensionDependencies
&&
!
this
.
outdated
)
{
return
local
.
manifest
.
extensionDependencies
;
}
if
(
gallery
)
{
return
gallery
.
properties
.
dependencies
||
[];
}
return
[];
}
get
extensionPack
():
string
[]
{
const
{
local
,
gallery
}
=
this
;
if
(
gallery
&&
!
this
.
isGalleryOutdated
())
{
return
gallery
.
properties
.
extensionPack
||
[];
}
if
(
local
&&
local
.
manifest
.
extensionPack
)
{
if
(
local
&&
local
.
manifest
.
extensionPack
&&
!
this
.
outdated
)
{
return
local
.
manifest
.
extensionPack
;
}
if
(
gallery
)
{
return
gallery
.
properties
.
extensionPack
||
[];
}
return
[];
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录