Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
101c8ed9
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,发现更多精彩内容 >>
提交
101c8ed9
编写于
4月 18, 2018
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add scheme transformer
上级
034b3773
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
3 deletion
+13
-3
src/vs/workbench/api/node/extHost.api.impl.ts
src/vs/workbench/api/node/extHost.api.impl.ts
+1
-1
src/vs/workbench/api/node/extHostLanguageFeatures.ts
src/vs/workbench/api/node/extHostLanguageFeatures.ts
+10
-0
src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts
...ench/test/electron-browser/api/extHostApiCommands.test.ts
+1
-1
src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts
...test/electron-browser/api/extHostLanguageFeatures.test.ts
+1
-1
未找到文件。
src/vs/workbench/api/node/extHost.api.impl.ts
浏览文件 @
101c8ed9
...
...
@@ -111,7 +111,7 @@ export function createApiFactory(
const
extHostDebugService
=
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostDebugService
,
new
ExtHostDebugService
(
rpcProtocol
,
extHostWorkspace
,
extensionService
));
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostConfiguration
,
extHostConfiguration
);
const
extHostDiagnostics
=
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostDiagnostics
,
new
ExtHostDiagnostics
(
rpcProtocol
));
const
extHostLanguageFeatures
=
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostLanguageFeatures
,
new
ExtHostLanguageFeatures
(
rpcProtocol
,
extHostDocuments
,
extHostCommands
,
extHostHeapService
,
extHostDiagnostics
));
const
extHostLanguageFeatures
=
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostLanguageFeatures
,
new
ExtHostLanguageFeatures
(
rpcProtocol
,
null
,
extHostDocuments
,
extHostCommands
,
extHostHeapService
,
extHostDiagnostics
));
const
extHostFileSystem
=
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostFileSystem
,
new
ExtHostFileSystem
(
rpcProtocol
,
extHostLanguageFeatures
));
const
extHostFileSystemEvent
=
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostFileSystemEventService
,
new
ExtHostFileSystemEventService
());
const
extHostQuickOpen
=
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostQuickOpen
,
new
ExtHostQuickOpen
(
rpcProtocol
,
extHostWorkspace
,
extHostCommands
));
...
...
src/vs/workbench/api/node/extHostLanguageFeatures.ts
浏览文件 @
101c8ed9
...
...
@@ -837,10 +837,15 @@ type Adapter = OutlineAdapter | CodeLensAdapter | DefinitionAdapter | HoverAdapt
|
SuggestAdapter
|
SignatureHelpAdapter
|
LinkProviderAdapter
|
ImplementationAdapter
|
TypeDefinitionAdapter
|
ColorProviderAdapter
|
FoldingProviderAdapter
;
export
interface
ISchemeTransformer
{
transformOutgoing
(
scheme
:
string
):
string
;
}
export
class
ExtHostLanguageFeatures
implements
ExtHostLanguageFeaturesShape
{
private
static
_handlePool
:
number
=
0
;
private
readonly
_schemeTransformer
:
ISchemeTransformer
;
private
_proxy
:
MainThreadLanguageFeaturesShape
;
private
_documents
:
ExtHostDocuments
;
private
_commands
:
ExtHostCommands
;
...
...
@@ -850,11 +855,13 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
constructor
(
mainContext
:
IMainContext
,
schemeTransformer
:
ISchemeTransformer
,
documents
:
ExtHostDocuments
,
commands
:
ExtHostCommands
,
heapMonitor
:
ExtHostHeapService
,
diagnostics
:
ExtHostDiagnostics
)
{
this
.
_schemeTransformer
=
schemeTransformer
;
this
.
_proxy
=
mainContext
.
getProxy
(
MainContext
.
MainThreadLanguageFeatures
);
this
.
_documents
=
documents
;
this
.
_commands
=
commands
;
...
...
@@ -891,6 +898,9 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
}
private
_transformScheme
(
scheme
:
string
):
string
{
if
(
this
.
_schemeTransformer
&&
typeof
scheme
===
'
string
'
)
{
return
this
.
_schemeTransformer
.
transformOutgoing
(
scheme
);
}
return
scheme
;
}
...
...
src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts
浏览文件 @
101c8ed9
...
...
@@ -129,7 +129,7 @@ suite('ExtHostLanguageFeatureCommands', function () {
const
diagnostics
=
new
ExtHostDiagnostics
(
rpcProtocol
);
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostDiagnostics
,
diagnostics
);
extHost
=
new
ExtHostLanguageFeatures
(
rpcProtocol
,
extHostDocuments
,
commands
,
heapService
,
diagnostics
);
extHost
=
new
ExtHostLanguageFeatures
(
rpcProtocol
,
null
,
extHostDocuments
,
commands
,
heapService
,
diagnostics
);
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostLanguageFeatures
,
extHost
);
mainThread
=
rpcProtocol
.
set
(
MainContext
.
MainThreadLanguageFeatures
,
inst
.
createInstance
(
MainThreadLanguageFeatures
,
rpcProtocol
));
...
...
src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts
浏览文件 @
101c8ed9
...
...
@@ -111,7 +111,7 @@ suite('ExtHostLanguageFeatures', function () {
const
diagnostics
=
new
ExtHostDiagnostics
(
rpcProtocol
);
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostDiagnostics
,
diagnostics
);
extHost
=
new
ExtHostLanguageFeatures
(
rpcProtocol
,
extHostDocuments
,
commands
,
heapService
,
diagnostics
);
extHost
=
new
ExtHostLanguageFeatures
(
rpcProtocol
,
null
,
extHostDocuments
,
commands
,
heapService
,
diagnostics
);
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostLanguageFeatures
,
extHost
);
mainThread
=
rpcProtocol
.
set
(
MainContext
.
MainThreadLanguageFeatures
,
inst
.
createInstance
(
MainThreadLanguageFeatures
,
rpcProtocol
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录