Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
134f551f
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
134f551f
编写于
4月 28, 2021
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "remove unused code after changes for
https://github.com/microsoft/vscode/issues/119943
"
This reverts commit
05658fe9
.
上级
a9ad5d9e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
2 deletion
+7
-2
src/vs/workbench/api/browser/mainThreadDocuments.ts
src/vs/workbench/api/browser/mainThreadDocuments.ts
+2
-0
src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts
...vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts
+3
-1
src/vs/workbench/test/browser/api/mainThreadDocumentsAndEditors.test.ts
...ch/test/browser/api/mainThreadDocumentsAndEditors.test.ts
+2
-1
未找到文件。
src/vs/workbench/api/browser/mainThreadDocuments.ts
浏览文件 @
134f551f
...
...
@@ -16,6 +16,7 @@ import { ExtHostContext, ExtHostDocumentsShape, IExtHostContext, MainThreadDocum
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
toLocalResource
,
extUri
,
IExtUri
}
from
'
vs/base/common/resources
'
;
import
{
IWorkingCopyFileService
}
from
'
vs/workbench/services/workingCopy/common/workingCopyFileService
'
;
import
{
IUriIdentityService
}
from
'
vs/workbench/services/uriIdentity/common/uriIdentity
'
;
import
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
IPathService
}
from
'
vs/workbench/services/path/common/pathService
'
;
...
...
@@ -125,6 +126,7 @@ export class MainThreadDocuments extends Disposable implements MainThreadDocumen
@
ITextModelService
textModelResolverService
:
ITextModelService
,
@
IWorkbenchEnvironmentService
environmentService
:
IWorkbenchEnvironmentService
,
@
IUriIdentityService
uriIdentityService
:
IUriIdentityService
,
@
IWorkingCopyFileService
workingCopyFileService
:
IWorkingCopyFileService
,
@
IPathService
private
readonly
_pathService
:
IPathService
)
{
super
();
...
...
src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts
浏览文件 @
134f551f
...
...
@@ -26,6 +26,7 @@ import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editor
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IWorkingCopyFileService
}
from
'
vs/workbench/services/workingCopy/common/workingCopyFileService
'
;
import
{
IUriIdentityService
}
from
'
vs/workbench/services/uriIdentity/common/uriIdentity
'
;
import
{
IClipboardService
}
from
'
vs/platform/clipboard/common/clipboardService
'
;
import
{
IPathService
}
from
'
vs/workbench/services/path/common/pathService
'
;
...
...
@@ -297,13 +298,14 @@ export class MainThreadDocumentsAndEditors {
@
IBulkEditService
bulkEditService
:
IBulkEditService
,
@
IPanelService
panelService
:
IPanelService
,
@
IWorkbenchEnvironmentService
environmentService
:
IWorkbenchEnvironmentService
,
@
IWorkingCopyFileService
workingCopyFileService
:
IWorkingCopyFileService
,
@
IUriIdentityService
uriIdentityService
:
IUriIdentityService
,
@
IClipboardService
private
readonly
_clipboardService
:
IClipboardService
,
@
IPathService
pathService
:
IPathService
)
{
this
.
_proxy
=
extHostContext
.
getProxy
(
ExtHostContext
.
ExtHostDocumentsAndEditors
);
this
.
_mainThreadDocuments
=
this
.
_toDispose
.
add
(
new
MainThreadDocuments
(
this
,
extHostContext
,
this
.
_modelService
,
this
.
_textFileService
,
fileService
,
textModelResolverService
,
environmentService
,
uriIdentityService
,
pathService
));
this
.
_mainThreadDocuments
=
this
.
_toDispose
.
add
(
new
MainThreadDocuments
(
this
,
extHostContext
,
this
.
_modelService
,
this
.
_textFileService
,
fileService
,
textModelResolverService
,
environmentService
,
uriIdentityService
,
workingCopyFileService
,
pathService
));
extHostContext
.
set
(
MainContext
.
MainThreadDocuments
,
this
.
_mainThreadDocuments
);
const
mainThreadTextEditors
=
this
.
_toDispose
.
add
(
new
MainThreadTextEditors
(
this
,
extHostContext
,
codeEditorService
,
bulkEditService
,
this
.
_editorService
,
this
.
_editorGroupService
));
...
...
src/vs/workbench/test/browser/api/mainThreadDocumentsAndEditors.test.ts
浏览文件 @
134f551f
...
...
@@ -25,7 +25,7 @@ import { NullLogService } from 'vs/platform/log/common/log';
import
{
UndoRedoService
}
from
'
vs/platform/undoRedo/common/undoRedoService
'
;
import
{
TestDialogService
}
from
'
vs/platform/dialogs/test/common/testDialogService
'
;
import
{
TestNotificationService
}
from
'
vs/platform/notification/test/common/testNotificationService
'
;
import
{
TestTextResourcePropertiesService
}
from
'
vs/workbench/test/common/workbenchTestServices
'
;
import
{
TestTextResourcePropertiesService
,
TestWorkingCopyFileService
}
from
'
vs/workbench/test/common/workbenchTestServices
'
;
import
{
UriIdentityService
}
from
'
vs/workbench/services/uriIdentity/common/uriIdentityService
'
;
import
{
IClipboardService
}
from
'
vs/platform/clipboard/common/clipboardService
'
;
...
...
@@ -93,6 +93,7 @@ suite('MainThreadDocumentsAndEditors', () => {
}
},
TestEnvironmentService
,
new
TestWorkingCopyFileService
(),
new
UriIdentityService
(
fileService
),
new
class
extends
mock
<
IClipboardService
>
()
{
override
readText
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录