Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
2f9b7807
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,发现更多精彩内容 >>
提交
2f9b7807
编写于
6月 11, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
editors - turn runtime extensions into singleton
上级
a18110ad
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
24 addition
and
13 deletion
+24
-13
src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts
...ib/extensions/electron-browser/extensionProfileService.ts
+1
-1
src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts
...ib/extensions/electron-browser/extensions.contribution.ts
+1
-1
src/vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler.ts
...rib/extensions/electron-browser/extensionsAutoProfiler.ts
+1
-1
src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts
...ib/extensions/electron-browser/runtimeExtensionsEditor.ts
+2
-3
src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput.ts
...rib/extensions/electron-browser/runtimeExtensionsInput.ts
+19
-7
未找到文件。
src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts
浏览文件 @
2f9b7807
...
...
@@ -57,7 +57,7 @@ export class ExtensionHostProfileService extends Disposable implements IExtensio
CommandsRegistry
.
registerCommand
(
'
workbench.action.extensionHostProfilder.stop
'
,
()
=>
{
this
.
stopProfiling
();
this
.
_editorService
.
openEditor
(
this
.
_instantiationService
.
createInstance
(
RuntimeExtensionsInput
)
,
{
revealIfOpened
:
true
});
this
.
_editorService
.
openEditor
(
RuntimeExtensionsInput
.
instance
,
{
revealIfOpened
:
true
});
});
}
...
...
src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts
浏览文件 @
2f9b7807
...
...
@@ -50,7 +50,7 @@ class RuntimeExtensionsInputFactory implements IEditorInputFactory {
return
''
;
}
deserialize
(
instantiationService
:
IInstantiationService
,
serializedEditorInput
:
string
):
EditorInput
{
return
new
RuntimeExtensionsInput
()
;
return
RuntimeExtensionsInput
.
instance
;
}
}
...
...
src/vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler.ts
浏览文件 @
2f9b7807
...
...
@@ -186,7 +186,7 @@ export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchCont
),
[{
label
:
localize
(
'
show
'
,
'
Show Extensions
'
),
run
:
()
=>
this
.
_editorService
.
openEditor
(
new
RuntimeExtensionsInput
()
)
run
:
()
=>
this
.
_editorService
.
openEditor
(
RuntimeExtensionsInput
.
instance
)
},
action
],
...
...
src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts
浏览文件 @
2f9b7807
...
...
@@ -494,14 +494,13 @@ export class ShowRuntimeExtensionsAction extends Action {
constructor
(
id
:
string
,
label
:
string
,
@
IEditorService
private
readonly
_editorService
:
IEditorService
,
@
IInstantiationService
private
readonly
_instantiationService
:
IInstantiationService
@
IEditorService
private
readonly
_editorService
:
IEditorService
)
{
super
(
id
,
label
);
}
public
async
run
(
e
?:
any
):
Promise
<
any
>
{
await
this
.
_editorService
.
openEditor
(
this
.
_instantiationService
.
createInstance
(
RuntimeExtensionsInput
)
,
{
revealIfOpened
:
true
});
await
this
.
_editorService
.
openEditor
(
RuntimeExtensionsInput
.
instance
,
{
revealIfOpened
:
true
});
}
}
...
...
src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput.ts
浏览文件 @
2f9b7807
...
...
@@ -5,12 +5,21 @@
import
*
as
nls
from
'
vs/nls
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
EditorInput
}
from
'
vs/workbench/common/editor
'
;
import
{
EditorInput
,
GroupIdentifier
}
from
'
vs/workbench/common/editor
'
;
export
class
RuntimeExtensionsInput
extends
EditorInput
{
static
readonly
ID
=
'
workbench.runtimeExtensions.input
'
;
static
_instance
:
RuntimeExtensionsInput
;
static
get
instance
()
{
if
(
!
RuntimeExtensionsInput
.
_instance
||
RuntimeExtensionsInput
.
_instance
.
isDisposed
())
{
RuntimeExtensionsInput
.
_instance
=
new
RuntimeExtensionsInput
();
}
return
RuntimeExtensionsInput
.
_instance
;
}
readonly
resource
=
URI
.
from
({
scheme
:
'
runtime-extensions
'
,
path
:
'
default
'
...
...
@@ -25,17 +34,20 @@ export class RuntimeExtensionsInput extends EditorInput {
}
matches
(
other
:
unknown
):
boolean
{
if
(
!
(
other
instanceof
RuntimeExtensionsInput
))
{
return
false
;
}
return
true
;
return
other
instanceof
RuntimeExtensionsInput
;
}
resolve
():
Promise
<
any
>
{
return
Promise
.
resolve
(
null
)
;
async
resolve
():
Promise
<
null
>
{
return
null
;
}
supportsSplitEditor
():
boolean
{
return
false
;
}
close
(
group
:
GroupIdentifier
,
openedInOtherGroups
:
boolean
):
void
{
if
(
!
openedInOtherGroups
)
{
this
.
dispose
();
// Only dispose if not opened anymore because all runtime extensions inputs are shared
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录