Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
367dd104
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,发现更多精彩内容 >>
提交
367dd104
编写于
12月 13, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename RPCProtocol.get to RPCProtocol.getProxy (#36972)
上级
2b4ce134
变更
50
隐藏空白更改
内联
并排
Showing
50 changed file
with
79 addition
and
67 deletion
+79
-67
src/vs/workbench/api/electron-browser/mainThreadCommands.ts
src/vs/workbench/api/electron-browser/mainThreadCommands.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts
...workbench/api/electron-browser/mainThreadConfiguration.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadDebugService.ts
.../workbench/api/electron-browser/mainThreadDebugService.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadDecorations.ts
...s/workbench/api/electron-browser/mainThreadDecorations.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts
...pi/electron-browser/mainThreadDocumentContentProviders.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadDocuments.ts
src/vs/workbench/api/electron-browser/mainThreadDocuments.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts
...nch/api/electron-browser/mainThreadDocumentsAndEditors.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadEditors.ts
src/vs/workbench/api/electron-browser/mainThreadEditors.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts
...vs/workbench/api/electron-browser/mainThreadFileSystem.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadFileSystemEventService.ts
.../api/electron-browser/mainThreadFileSystemEventService.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadHeapService.ts
...s/workbench/api/electron-browser/mainThreadHeapService.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts
...kbench/api/electron-browser/mainThreadLanguageFeatures.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts
src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadSCM.ts
src/vs/workbench/api/electron-browser/mainThreadSCM.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts
...rkbench/api/electron-browser/mainThreadSaveParticipant.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadTask.ts
src/vs/workbench/api/electron-browser/mainThreadTask.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts
...rkbench/api/electron-browser/mainThreadTerminalService.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts
src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts
+2
-2
src/vs/workbench/api/electron-browser/mainThreadWindow.ts
src/vs/workbench/api/electron-browser/mainThreadWindow.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts
src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts
+1
-2
src/vs/workbench/api/node/extHost.api.impl.ts
src/vs/workbench/api/node/extHost.api.impl.ts
+3
-3
src/vs/workbench/api/node/extHostCommands.ts
src/vs/workbench/api/node/extHostCommands.ts
+1
-1
src/vs/workbench/api/node/extHostDebugService.ts
src/vs/workbench/api/node/extHostDebugService.ts
+1
-1
src/vs/workbench/api/node/extHostDecorations.ts
src/vs/workbench/api/node/extHostDecorations.ts
+1
-1
src/vs/workbench/api/node/extHostDiagnostics.ts
src/vs/workbench/api/node/extHostDiagnostics.ts
+1
-2
src/vs/workbench/api/node/extHostDialogs.ts
src/vs/workbench/api/node/extHostDialogs.ts
+1
-1
src/vs/workbench/api/node/extHostDocumentContentProviders.ts
src/vs/workbench/api/node/extHostDocumentContentProviders.ts
+1
-1
src/vs/workbench/api/node/extHostDocuments.ts
src/vs/workbench/api/node/extHostDocuments.ts
+1
-1
src/vs/workbench/api/node/extHostDocumentsAndEditors.ts
src/vs/workbench/api/node/extHostDocumentsAndEditors.ts
+2
-2
src/vs/workbench/api/node/extHostExtensionService.ts
src/vs/workbench/api/node/extHostExtensionService.ts
+2
-2
src/vs/workbench/api/node/extHostFileSystem.ts
src/vs/workbench/api/node/extHostFileSystem.ts
+1
-1
src/vs/workbench/api/node/extHostLanguageFeatures.ts
src/vs/workbench/api/node/extHostLanguageFeatures.ts
+1
-1
src/vs/workbench/api/node/extHostLanguages.ts
src/vs/workbench/api/node/extHostLanguages.ts
+1
-2
src/vs/workbench/api/node/extHostMessageService.ts
src/vs/workbench/api/node/extHostMessageService.ts
+1
-1
src/vs/workbench/api/node/extHostOutputService.ts
src/vs/workbench/api/node/extHostOutputService.ts
+1
-1
src/vs/workbench/api/node/extHostQuickOpen.ts
src/vs/workbench/api/node/extHostQuickOpen.ts
+1
-1
src/vs/workbench/api/node/extHostSCM.ts
src/vs/workbench/api/node/extHostSCM.ts
+1
-1
src/vs/workbench/api/node/extHostStatusBar.ts
src/vs/workbench/api/node/extHostStatusBar.ts
+1
-1
src/vs/workbench/api/node/extHostStorage.ts
src/vs/workbench/api/node/extHostStorage.ts
+2
-2
src/vs/workbench/api/node/extHostTask.ts
src/vs/workbench/api/node/extHostTask.ts
+1
-1
src/vs/workbench/api/node/extHostTerminalService.ts
src/vs/workbench/api/node/extHostTerminalService.ts
+1
-1
src/vs/workbench/api/node/extHostTextEditors.ts
src/vs/workbench/api/node/extHostTextEditors.ts
+1
-1
src/vs/workbench/api/node/extHostWindow.ts
src/vs/workbench/api/node/extHostWindow.ts
+1
-1
src/vs/workbench/api/node/extHostWorkspace.ts
src/vs/workbench/api/node/extHostWorkspace.ts
+1
-1
src/vs/workbench/node/extensionHostMain.ts
src/vs/workbench/node/extensionHostMain.ts
+3
-3
src/vs/workbench/services/extensions/electron-browser/extensionService.ts
.../services/extensions/electron-browser/extensionService.ts
+1
-1
src/vs/workbench/services/extensions/node/proxyIdentifier.ts
src/vs/workbench/services/extensions/node/proxyIdentifier.ts
+1
-1
src/vs/workbench/services/extensions/node/rpcProtocol.ts
src/vs/workbench/services/extensions/node/rpcProtocol.ts
+3
-3
src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts
...t/electron-browser/api/extHostDocumentsAndEditors.test.ts
+4
-1
src/vs/workbench/test/electron-browser/api/testThreadService.ts
.../workbench/test/electron-browser/api/testThreadService.ts
+17
-5
未找到文件。
src/vs/workbench/api/electron-browser/mainThreadCommands.ts
浏览文件 @
367dd104
...
...
@@ -21,7 +21,7 @@ export class MainThreadCommands implements MainThreadCommandsShape {
extHostContext
:
IExtHostContext
,
@
ICommandService
private
readonly
_commandService
:
ICommandService
,
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostCommands
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostCommands
);
this
.
_generateCommandsDocumentationRegistration
=
CommandsRegistry
.
registerCommand
(
'
_generateCommandsDocumentation
'
,
()
=>
this
.
_generateCommandsDocumentation
());
}
...
...
src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts
浏览文件 @
367dd104
...
...
@@ -25,7 +25,7 @@ export class MainThreadConfiguration implements MainThreadConfigurationShape {
@
IWorkspaceContextService
private
readonly
_workspaceContextService
:
IWorkspaceContextService
,
@
IWorkspaceConfigurationService
private
configurationService
:
IWorkspaceConfigurationService
)
{
const
proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostConfiguration
);
const
proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostConfiguration
);
this
.
_configurationListener
=
configurationService
.
onDidChangeConfiguration
(
e
=>
{
proxy
.
$acceptConfigurationChanged
(
configurationService
.
getConfigurationData
(),
this
.
toConfigurationChangeEventData
(
e
));
...
...
src/vs/workbench/api/electron-browser/mainThreadDebugService.ts
浏览文件 @
367dd104
...
...
@@ -25,7 +25,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape {
@
IDebugService
private
debugService
:
IDebugService
,
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostDebugService
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostDebugService
);
this
.
_toDispose
=
[];
this
.
_toDispose
.
push
(
debugService
.
onDidNewProcess
(
proc
=>
this
.
_proxy
.
$acceptDebugSessionStarted
(
<
DebugSessionUUID
>
proc
.
getId
(),
proc
.
configuration
.
type
,
proc
.
getName
(
false
))));
this
.
_toDispose
.
push
(
debugService
.
onDidEndProcess
(
proc
=>
this
.
_proxy
.
$acceptDebugSessionTerminated
(
<
DebugSessionUUID
>
proc
.
getId
(),
proc
.
configuration
.
type
,
proc
.
getName
(
false
))));
...
...
src/vs/workbench/api/electron-browser/mainThreadDecorations.ts
浏览文件 @
367dd104
...
...
@@ -21,7 +21,7 @@ export class MainThreadDecorations implements MainThreadDecorationsShape {
context
:
IExtHostContext
,
@
IDecorationsService
private
readonly
_decorationsService
:
IDecorationsService
)
{
this
.
_proxy
=
context
.
get
(
ExtHostContext
.
ExtHostDecorations
);
this
.
_proxy
=
context
.
get
Proxy
(
ExtHostContext
.
ExtHostDecorations
);
}
dispose
()
{
...
...
src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts
浏览文件 @
367dd104
...
...
@@ -31,7 +31,7 @@ export class MainThreadDocumentContentProviders implements MainThreadDocumentCon
@
ICodeEditorService
codeEditorService
:
ICodeEditorService
,
@
IEditorGroupService
editorGroupService
:
IEditorGroupService
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostDocumentContentProviders
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostDocumentContentProviders
);
}
public
dispose
():
void
{
...
...
src/vs/workbench/api/electron-browser/mainThreadDocuments.ts
浏览文件 @
367dd104
...
...
@@ -93,7 +93,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape {
this
.
_fileService
=
fileService
;
this
.
_untitledEditorService
=
untitledEditorService
;
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostDocuments
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostDocuments
);
this
.
_modelIsSynced
=
{};
this
.
_toDispose
=
[];
...
...
src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts
浏览文件 @
367dd104
...
...
@@ -308,7 +308,7 @@ export class MainThreadDocumentsAndEditors {
@
IUntitledEditorService
untitledEditorService
:
IUntitledEditorService
,
@
IEditorGroupService
editorGroupService
:
IEditorGroupService
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostDocumentsAndEditors
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostDocumentsAndEditors
);
const
mainThreadDocuments
=
new
MainThreadDocuments
(
this
,
extHostContext
,
this
.
_modelService
,
modeService
,
this
.
_textFileService
,
fileService
,
textModelResolverService
,
untitledEditorService
);
extHostContext
.
set
(
MainContext
.
MainThreadDocuments
,
mainThreadDocuments
);
...
...
src/vs/workbench/api/electron-browser/mainThreadEditors.ts
浏览文件 @
367dd104
...
...
@@ -46,7 +46,7 @@ export class MainThreadEditors implements MainThreadEditorsShape {
@
IFileService
private
readonly
_fileService
:
IFileService
,
@
IModelService
private
readonly
_modelService
:
IModelService
,
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostEditors
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostEditors
);
this
.
_documentsAndEditors
=
documentsAndEditors
;
this
.
_workbenchEditorService
=
workbenchEditorService
;
this
.
_toDispose
=
[];
...
...
src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts
浏览文件 @
367dd104
...
...
@@ -29,7 +29,7 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape {
@
ISearchService
private
readonly
_searchService
:
ISearchService
,
@
IWorkspaceEditingService
private
readonly
_workspaceEditingService
:
IWorkspaceEditingService
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostFileSystem
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostFileSystem
);
}
dispose
():
void
{
...
...
src/vs/workbench/api/electron-browser/mainThreadFileSystemEventService.ts
浏览文件 @
367dd104
...
...
@@ -19,7 +19,7 @@ export class MainThreadFileSystemEventService {
@
IFileService
fileService
:
IFileService
)
{
const
proxy
:
ExtHostFileSystemEventServiceShape
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostFileSystemEventService
);
const
proxy
:
ExtHostFileSystemEventServiceShape
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostFileSystemEventService
);
const
events
:
FileSystemEvents
=
{
created
:
[],
changed
:
[],
...
...
src/vs/workbench/api/electron-browser/mainThreadHeapService.ts
浏览文件 @
367dd104
...
...
@@ -126,7 +126,7 @@ export class MainThreadHeapService {
extHostContext
:
IExtHostContext
,
@
IHeapService
heapService
:
IHeapService
,
)
{
const
proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostHeapService
);
const
proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostHeapService
);
this
.
_toDispose
=
heapService
.
onGarbageCollection
((
ids
)
=>
{
// send to ext host
proxy
.
$onGarbageCollection
(
ids
);
...
...
src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts
浏览文件 @
367dd104
...
...
@@ -36,7 +36,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha
@
IHeapService
heapService
:
IHeapService
,
@
IModeService
modeService
:
IModeService
,
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostLanguageFeatures
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostLanguageFeatures
);
this
.
_heapService
=
heapService
;
this
.
_modeService
=
modeService
;
}
...
...
src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts
浏览文件 @
367dd104
...
...
@@ -25,7 +25,7 @@ export class MainThreadQuickOpen implements MainThreadQuickOpenShape {
extHostContext
:
IExtHostContext
,
@
IQuickOpenService
quickOpenService
:
IQuickOpenService
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostQuickOpen
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostQuickOpen
);
this
.
_quickOpenService
=
quickOpenService
;
}
...
...
src/vs/workbench/api/electron-browser/mainThreadSCM.ts
浏览文件 @
367dd104
...
...
@@ -268,7 +268,7 @@ export class MainThreadSCM implements MainThreadSCMShape {
extHostContext
:
IExtHostContext
,
@
ISCMService
private
scmService
:
ISCMService
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostSCM
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostSCM
);
}
dispose
():
void
{
...
...
src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts
浏览文件 @
367dd104
...
...
@@ -247,7 +247,7 @@ class ExtHostSaveParticipant implements ISaveParticipantParticipant {
private
_proxy
:
ExtHostDocumentSaveParticipantShape
;
constructor
(
extHostContext
:
IExtHostContext
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostDocumentSaveParticipant
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostDocumentSaveParticipant
);
}
participate
(
editorModel
:
ITextFileEditorModel
,
env
:
{
reason
:
SaveReason
}):
Promise
<
void
>
{
...
...
src/vs/workbench/api/electron-browser/mainThreadTask.ts
浏览文件 @
367dd104
...
...
@@ -25,7 +25,7 @@ export class MainThreadTask implements MainThreadTaskShape {
@
ITaskService
private
_taskService
:
ITaskService
,
@
IWorkspaceContextService
private
_workspaceContextServer
:
IWorkspaceContextService
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostTask
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostTask
);
this
.
_activeHandles
=
Object
.
create
(
null
);
}
...
...
src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts
浏览文件 @
367dd104
...
...
@@ -20,7 +20,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
extHostContext
:
IExtHostContext
,
@
ITerminalService
private
terminalService
:
ITerminalService
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostTerminalService
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostTerminalService
);
this
.
_toDispose
=
[];
this
.
_toDispose
.
push
(
terminalService
.
onInstanceDisposed
((
terminalInstance
)
=>
this
.
_onTerminalDisposed
(
terminalInstance
)));
this
.
_toDispose
.
push
(
terminalService
.
onInstanceProcessIdReady
((
terminalInstance
)
=>
this
.
_onTerminalProcessIdReady
(
terminalInstance
)));
...
...
src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts
浏览文件 @
367dd104
...
...
@@ -24,7 +24,7 @@ export class MainThreadTreeViews extends Disposable implements MainThreadTreeVie
@
IMessageService
private
messageService
:
IMessageService
)
{
super
();
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostTreeViews
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostTreeViews
);
}
$registerView
(
treeViewId
:
string
):
void
{
...
...
@@ -140,4 +140,4 @@ class TreeViewDataProvider implements ITreeViewDataProvider {
assign
(
current
,
treeItem
);
}
}
}
\ No newline at end of file
}
src/vs/workbench/api/electron-browser/mainThreadWindow.ts
浏览文件 @
367dd104
...
...
@@ -20,7 +20,7 @@ export class MainThreadWindow implements MainThreadWindowShape {
extHostContext
:
IExtHostContext
,
@
IWindowService
private
windowService
:
IWindowService
)
{
this
.
proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostWindow
);
this
.
proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostWindow
);
windowService
.
onDidChangeFocus
(
this
.
proxy
.
$onDidChangeWindowFocus
,
this
.
proxy
,
this
.
disposables
);
}
...
...
src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts
浏览文件 @
367dd104
...
...
@@ -29,7 +29,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
@
ITextFileService
private
readonly
_textFileService
:
ITextFileService
,
@
IConfigurationService
private
_configurationService
:
IConfigurationService
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostWorkspace
);
this
.
_proxy
=
extHostContext
.
get
Proxy
(
ExtHostContext
.
ExtHostWorkspace
);
this
.
_contextService
.
onDidChangeWorkspaceFolders
(
this
.
_onDidChangeWorkspace
,
this
,
this
.
_toDispose
);
this
.
_contextService
.
onDidChangeWorkbenchState
(
this
.
_onDidChangeWorkspace
,
this
,
this
.
_toDispose
);
}
...
...
@@ -123,4 +123,3 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
});
}
}
src/vs/workbench/api/node/extHost.api.impl.ts
浏览文件 @
367dd104
...
...
@@ -91,10 +91,10 @@ export function createApiFactory(
const
extHostDocumentsAndEditors
=
threadService
.
set
(
ExtHostContext
.
ExtHostDocumentsAndEditors
,
new
ExtHostDocumentsAndEditors
(
threadService
));
const
extHostDocuments
=
threadService
.
set
(
ExtHostContext
.
ExtHostDocuments
,
new
ExtHostDocuments
(
threadService
,
extHostDocumentsAndEditors
));
const
extHostDocumentContentProviders
=
threadService
.
set
(
ExtHostContext
.
ExtHostDocumentContentProviders
,
new
ExtHostDocumentContentProvider
(
threadService
,
extHostDocumentsAndEditors
));
const
extHostDocumentSaveParticipant
=
threadService
.
set
(
ExtHostContext
.
ExtHostDocumentSaveParticipant
,
new
ExtHostDocumentSaveParticipant
(
logService
,
extHostDocuments
,
threadService
.
get
(
MainContext
.
MainThreadEditors
)));
const
extHostDocumentSaveParticipant
=
threadService
.
set
(
ExtHostContext
.
ExtHostDocumentSaveParticipant
,
new
ExtHostDocumentSaveParticipant
(
logService
,
extHostDocuments
,
threadService
.
get
Proxy
(
MainContext
.
MainThreadEditors
)));
const
extHostEditors
=
threadService
.
set
(
ExtHostContext
.
ExtHostEditors
,
new
ExtHostEditors
(
threadService
,
extHostDocumentsAndEditors
));
const
extHostCommands
=
threadService
.
set
(
ExtHostContext
.
ExtHostCommands
,
new
ExtHostCommands
(
threadService
,
extHostHeapService
,
logService
));
const
extHostTreeViews
=
threadService
.
set
(
ExtHostContext
.
ExtHostTreeViews
,
new
ExtHostTreeViews
(
threadService
.
get
(
MainContext
.
MainThreadTreeViews
),
extHostCommands
));
const
extHostTreeViews
=
threadService
.
set
(
ExtHostContext
.
ExtHostTreeViews
,
new
ExtHostTreeViews
(
threadService
.
get
Proxy
(
MainContext
.
MainThreadTreeViews
),
extHostCommands
));
threadService
.
set
(
ExtHostContext
.
ExtHostWorkspace
,
extHostWorkspace
);
const
extHostDebugService
=
threadService
.
set
(
ExtHostContext
.
ExtHostDebugService
,
new
ExtHostDebugService
(
threadService
,
extHostWorkspace
));
threadService
.
set
(
ExtHostContext
.
ExtHostConfiguration
,
extHostConfiguration
);
...
...
@@ -117,7 +117,7 @@ export function createApiFactory(
const
extHostMessageService
=
new
ExtHostMessageService
(
threadService
);
const
extHostDialogs
=
new
ExtHostDialogs
(
threadService
);
const
extHostStatusBar
=
new
ExtHostStatusBar
(
threadService
);
const
extHostProgress
=
new
ExtHostProgress
(
threadService
.
get
(
MainContext
.
MainThreadProgress
));
const
extHostProgress
=
new
ExtHostProgress
(
threadService
.
get
Proxy
(
MainContext
.
MainThreadProgress
));
const
extHostOutputService
=
new
ExtHostOutputService
(
threadService
);
const
extHostLanguages
=
new
ExtHostLanguages
(
threadService
);
...
...
src/vs/workbench/api/node/extHostCommands.ts
浏览文件 @
367dd104
...
...
@@ -38,7 +38,7 @@ export class ExtHostCommands implements ExtHostCommandsShape {
heapService
:
ExtHostHeapService
,
private
logService
:
ILogService
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadCommands
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadCommands
);
this
.
_converter
=
new
CommandsConverter
(
this
,
heapService
);
}
...
...
src/vs/workbench/api/node/extHostDebugService.ts
浏览文件 @
367dd104
...
...
@@ -61,7 +61,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
this
.
_onDidChangeActiveDebugSession
=
new
Emitter
<
vscode
.
DebugSession
>
();
this
.
_onDidReceiveDebugSessionCustomEvent
=
new
Emitter
<
vscode
.
DebugSessionCustomEvent
>
();
this
.
_debugServiceProxy
=
mainContext
.
get
(
MainContext
.
MainThreadDebugService
);
this
.
_debugServiceProxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadDebugService
);
this
.
_onDidChangeBreakpoints
=
new
Emitter
<
vscode
.
BreakpointsChangeEvent
>
({
onFirstListenerAdd
:
()
=>
{
...
...
src/vs/workbench/api/node/extHostDecorations.ts
浏览文件 @
367dd104
...
...
@@ -19,7 +19,7 @@ export class ExtHostDecorations implements ExtHostDecorationsShape {
private
readonly
_proxy
:
MainThreadDecorationsShape
;
constructor
(
mainContext
:
IMainContext
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadDecorations
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadDecorations
);
}
registerDecorationProvider
(
provider
:
vscode
.
DecorationProvider
,
label
:
string
):
vscode
.
Disposable
{
...
...
src/vs/workbench/api/node/extHostDiagnostics.ts
浏览文件 @
367dd104
...
...
@@ -224,7 +224,7 @@ export class ExtHostDiagnostics implements ExtHostDiagnosticsShape {
private
_collections
:
DiagnosticCollection
[];
constructor
(
mainContext
:
IMainContext
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadDiagnostics
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadDiagnostics
);
this
.
_collections
=
[];
}
...
...
@@ -255,4 +255,3 @@ export class ExtHostDiagnostics implements ExtHostDiagnosticsShape {
this
.
_collections
.
forEach
(
callback
);
}
}
src/vs/workbench/api/node/extHostDialogs.ts
浏览文件 @
367dd104
...
...
@@ -13,7 +13,7 @@ export class ExtHostDialogs {
private
readonly
_proxy
:
MainThreadDiaglogsShape
;
constructor
(
mainContext
:
IMainContext
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadDialogs
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadDialogs
);
}
showOpenDialog
(
options
:
vscode
.
OpenDialogOptions
):
Thenable
<
URI
[]
>
{
...
...
src/vs/workbench/api/node/extHostDocumentContentProviders.ts
浏览文件 @
367dd104
...
...
@@ -25,7 +25,7 @@ export class ExtHostDocumentContentProvider implements ExtHostDocumentContentPro
private
readonly
_documentsAndEditors
:
ExtHostDocumentsAndEditors
;
constructor
(
mainContext
:
IMainContext
,
documentsAndEditors
:
ExtHostDocumentsAndEditors
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadDocumentContentProviders
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadDocumentContentProviders
);
this
.
_documentsAndEditors
=
documentsAndEditors
;
}
...
...
src/vs/workbench/api/node/extHostDocuments.ts
浏览文件 @
367dd104
...
...
@@ -33,7 +33,7 @@ export class ExtHostDocuments implements ExtHostDocumentsShape {
private
_documentLoader
=
new
Map
<
string
,
TPromise
<
ExtHostDocumentData
>>
();
constructor
(
mainContext
:
IMainContext
,
documentsAndEditors
:
ExtHostDocumentsAndEditors
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadDocuments
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadDocuments
);
this
.
_documentsAndEditors
=
documentsAndEditors
;
this
.
_toDispose
=
[
...
...
src/vs/workbench/api/node/extHostDocumentsAndEditors.ts
浏览文件 @
367dd104
...
...
@@ -52,7 +52,7 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha
assert
.
ok
(
!
this
.
_documents
.
has
(
data
.
url
.
toString
()),
`document '
${
data
.
url
}
already exists!'`
);
const
documentData
=
new
ExtHostDocumentData
(
this
.
_mainContext
.
get
(
MainContext
.
MainThreadDocuments
),
this
.
_mainContext
.
get
Proxy
(
MainContext
.
MainThreadDocuments
),
data
.
url
,
data
.
lines
,
data
.
EOL
,
...
...
@@ -80,7 +80,7 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha
const
documentData
=
this
.
_documents
.
get
(
data
.
document
.
toString
());
const
editor
=
new
ExtHostTextEditor
(
this
.
_mainContext
.
get
(
MainContext
.
MainThreadEditors
),
this
.
_mainContext
.
get
Proxy
(
MainContext
.
MainThreadEditors
),
data
.
id
,
documentData
,
data
.
selections
.
map
(
typeConverters
.
toSelection
),
...
...
src/vs/workbench/api/node/extHostExtensionService.ts
浏览文件 @
367dd104
...
...
@@ -132,10 +132,10 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
this
.
_registry
=
new
ExtensionDescriptionRegistry
(
initData
.
extensions
);
this
.
_threadService
=
threadService
;
this
.
_logService
=
logService
;
this
.
_mainThreadTelemetry
=
threadService
.
get
(
MainContext
.
MainThreadTelemetry
);
this
.
_mainThreadTelemetry
=
threadService
.
get
Proxy
(
MainContext
.
MainThreadTelemetry
);
this
.
_storage
=
new
ExtHostStorage
(
threadService
);
this
.
_storagePath
=
new
ExtensionStoragePath
(
initData
.
workspace
,
initData
.
environment
);
this
.
_proxy
=
this
.
_threadService
.
get
(
MainContext
.
MainThreadExtensionService
);
this
.
_proxy
=
this
.
_threadService
.
get
Proxy
(
MainContext
.
MainThreadExtensionService
);
this
.
_activator
=
null
;
// initialize API first (i.e. do not release barrier until the API is initialized)
...
...
src/vs/workbench/api/node/extHostFileSystem.ts
浏览文件 @
367dd104
...
...
@@ -19,7 +19,7 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
private
_handlePool
:
number
=
0
;
constructor
(
mainContext
:
IMainContext
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadFileSystem
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadFileSystem
);
}
registerFileSystemProvider
(
scheme
:
string
,
provider
:
vscode
.
FileSystemProvider
)
{
...
...
src/vs/workbench/api/node/extHostLanguageFeatures.ts
浏览文件 @
367dd104
...
...
@@ -800,7 +800,7 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
heapMonitor
:
ExtHostHeapService
,
diagnostics
:
ExtHostDiagnostics
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadLanguageFeatures
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadLanguageFeatures
);
this
.
_documents
=
documents
;
this
.
_commands
=
commands
;
this
.
_heapService
=
heapMonitor
;
...
...
src/vs/workbench/api/node/extHostLanguages.ts
浏览文件 @
367dd104
...
...
@@ -14,11 +14,10 @@ export class ExtHostLanguages {
constructor
(
mainContext
:
IMainContext
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadLanguages
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadLanguages
);
}
getLanguages
():
TPromise
<
string
[]
>
{
return
this
.
_proxy
.
$getLanguages
();
}
}
src/vs/workbench/api/node/extHostMessageService.ts
浏览文件 @
367dd104
...
...
@@ -18,7 +18,7 @@ export class ExtHostMessageService {
private
_proxy
:
MainThreadMessageServiceShape
;
constructor
(
mainContext
:
IMainContext
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadMessageService
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadMessageService
);
}
showMessage
(
extension
:
IExtensionDescription
,
severity
:
Severity
,
message
:
string
,
optionsOrFirstItem
:
vscode
.
MessageOptions
|
string
,
rest
:
string
[]):
Thenable
<
string
|
undefined
>
;
...
...
src/vs/workbench/api/node/extHostOutputService.ts
浏览文件 @
367dd104
...
...
@@ -64,7 +64,7 @@ export class ExtHostOutputService {
private
_proxy
:
MainThreadOutputServiceShape
;
constructor
(
mainContext
:
IMainContext
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadOutputService
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadOutputService
);
}
createOutputChannel
(
name
:
string
):
vscode
.
OutputChannel
{
...
...
src/vs/workbench/api/node/extHostQuickOpen.ts
浏览文件 @
367dd104
...
...
@@ -24,7 +24,7 @@ export class ExtHostQuickOpen implements ExtHostQuickOpenShape {
private
_validateInput
:
(
input
:
string
)
=>
string
|
Thenable
<
string
>
;
constructor
(
mainContext
:
IMainContext
,
workspace
:
ExtHostWorkspace
,
commands
:
ExtHostCommands
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadQuickOpen
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadQuickOpen
);
this
.
_workspace
=
workspace
;
this
.
_commands
=
commands
;
}
...
...
src/vs/workbench/api/node/extHostSCM.ts
浏览文件 @
367dd104
...
...
@@ -458,7 +458,7 @@ export class ExtHostSCM {
private
_commands
:
ExtHostCommands
,
@
ILogService
private
logService
:
ILogService
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadSCM
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadSCM
);
_commands
.
registerArgumentProcessor
({
processArgument
:
arg
=>
{
...
...
src/vs/workbench/api/node/extHostStatusBar.ts
浏览文件 @
367dd104
...
...
@@ -163,7 +163,7 @@ export class ExtHostStatusBar {
private
_statusMessage
:
StatusBarMessage
;
constructor
(
mainContext
:
IMainContext
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadStatusBar
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadStatusBar
);
this
.
_statusMessage
=
new
StatusBarMessage
(
this
);
}
...
...
src/vs/workbench/api/node/extHostStorage.ts
浏览文件 @
367dd104
...
...
@@ -12,7 +12,7 @@ export class ExtHostStorage {
private
_proxy
:
MainThreadStorageShape
;
constructor
(
mainContext
:
IMainContext
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadStorage
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadStorage
);
}
getValue
<
T
>
(
shared
:
boolean
,
key
:
string
,
defaultValue
?:
T
):
TPromise
<
T
>
{
...
...
@@ -22,4 +22,4 @@ export class ExtHostStorage {
setValue
(
shared
:
boolean
,
key
:
string
,
value
:
any
):
TPromise
<
void
>
{
return
this
.
_proxy
.
$setValue
(
shared
,
key
,
value
);
}
}
\ No newline at end of file
}
src/vs/workbench/api/node/extHostTask.ts
浏览文件 @
367dd104
...
...
@@ -424,7 +424,7 @@ export class ExtHostTask implements ExtHostTaskShape {
private
_handlers
:
Map
<
number
,
HandlerData
>
;
constructor
(
mainContext
:
IMainContext
,
extHostWorkspace
:
ExtHostWorkspace
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadTask
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadTask
);
this
.
_extHostWorkspace
=
extHostWorkspace
;
this
.
_handleCounter
=
0
;
this
.
_handlers
=
new
Map
<
number
,
HandlerData
>
();
...
...
src/vs/workbench/api/node/extHostTerminalService.ts
浏览文件 @
367dd104
...
...
@@ -102,7 +102,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
constructor
(
mainContext
:
IMainContext
)
{
this
.
_onDidCloseTerminal
=
new
Emitter
<
vscode
.
Terminal
>
();
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadTerminalService
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadTerminalService
);
this
.
_terminals
=
[];
}
...
...
src/vs/workbench/api/node/extHostTextEditors.ts
浏览文件 @
367dd104
...
...
@@ -37,7 +37,7 @@ export class ExtHostEditors implements ExtHostEditorsShape {
mainContext
:
IMainContext
,
extHostDocumentsAndEditors
:
ExtHostDocumentsAndEditors
,
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadEditors
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadEditors
);
this
.
_extHostDocumentsAndEditors
=
extHostDocumentsAndEditors
;
this
.
_extHostDocumentsAndEditors
.
onDidChangeVisibleTextEditors
(
e
=>
this
.
_onDidChangeVisibleTextEditors
.
fire
(
e
));
...
...
src/vs/workbench/api/node/extHostWindow.ts
浏览文件 @
367dd104
...
...
@@ -23,7 +23,7 @@ export class ExtHostWindow implements ExtHostWindowShape {
get
state
():
WindowState
{
return
this
.
_state
;
}
constructor
(
mainContext
:
IMainContext
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadWindow
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadWindow
);
this
.
_proxy
.
$getWindowVisibility
().
then
(
isFocused
=>
this
.
$onDidChangeWindowFocus
(
isFocused
));
}
...
...
src/vs/workbench/api/node/extHostWorkspace.ts
浏览文件 @
367dd104
...
...
@@ -59,7 +59,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape {
readonly
onDidChangeWorkspace
:
Event
<
vscode
.
WorkspaceFoldersChangeEvent
>
=
this
.
_onDidChangeWorkspace
.
event
;
constructor
(
mainContext
:
IMainContext
,
data
:
IWorkspaceData
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadWorkspace
);
this
.
_proxy
=
mainContext
.
get
Proxy
(
MainContext
.
MainThreadWorkspace
);
this
.
_workspace
=
Workspace2
.
fromData
(
data
);
}
...
...
src/vs/workbench/node/extensionHostMain.ts
浏览文件 @
367dd104
...
...
@@ -97,7 +97,7 @@ export class ExtensionHostMain {
this
.
_logService
.
info
(
'
extension host started
'
);
this
.
_logService
.
trace
(
'
initData
'
,
initData
);
this
.
_extHostConfiguration
=
new
ExtHostConfiguration
(
rpcProtocol
.
get
(
MainContext
.
MainThreadConfiguration
),
extHostWorkspace
,
initData
.
configuration
);
this
.
_extHostConfiguration
=
new
ExtHostConfiguration
(
rpcProtocol
.
get
Proxy
(
MainContext
.
MainThreadConfiguration
),
extHostWorkspace
,
initData
.
configuration
);
this
.
_extensionService
=
new
ExtHostExtensionService
(
initData
,
rpcProtocol
,
extHostWorkspace
,
this
.
_extHostConfiguration
,
this
.
_logService
);
// error forwarding and stack trace scanning
...
...
@@ -119,8 +119,8 @@ export class ExtensionHostMain {
return
`
${
error
.
name
||
'
Error
'
}
:
${
error
.
message
||
''
}${
stackTraceMessage
}
`
;
};
});
const
mainThreadExtensions
=
rpcProtocol
.
get
(
MainContext
.
MainThreadExtensionService
);
const
mainThreadErrors
=
rpcProtocol
.
get
(
MainContext
.
MainThreadErrors
);
const
mainThreadExtensions
=
rpcProtocol
.
get
Proxy
(
MainContext
.
MainThreadExtensionService
);
const
mainThreadErrors
=
rpcProtocol
.
get
Proxy
(
MainContext
.
MainThreadErrors
);
errors
.
setUnexpectedErrorHandler
(
err
=>
{
const
data
=
errors
.
transformErrorForSerialization
(
err
);
const
extension
=
extensionErrors
.
get
(
err
);
...
...
src/vs/workbench/services/extensions/electron-browser/extensionService.ts
浏览文件 @
367dd104
...
...
@@ -262,7 +262,7 @@ export class ExtensionService extends Disposable implements IExtensionService {
const
expected
:
ProxyIdentifier
<
any
>
[]
=
Object
.
keys
(
MainContext
).
map
((
key
)
=>
MainContext
[
key
]);
this
.
_extensionHostProcessRPCProtocol
.
assertRegistered
(
expected
);
return
this
.
_extensionHostProcessRPCProtocol
.
get
(
ExtHostContext
.
ExtHostExtensionService
);
return
this
.
_extensionHostProcessRPCProtocol
.
get
Proxy
(
ExtHostContext
.
ExtHostExtensionService
);
}
// ---- begin IExtensionService
...
...
src/vs/workbench/services/extensions/node/proxyIdentifier.ts
浏览文件 @
367dd104
...
...
@@ -12,7 +12,7 @@ export interface IRPCProtocol {
* >
* > Use `getFast` for a proxy where such arguments are not automatically serialized/deserialized.
*/
get
<
T
>
(
identifier
:
ProxyIdentifier
<
T
>
):
T
;
get
Proxy
<
T
>
(
identifier
:
ProxyIdentifier
<
T
>
):
T
;
/**
* Returns a proxy to an object addressable/named in the extension host process.
...
...
src/vs/workbench/services/extensions/node/rpcProtocol.ts
浏览文件 @
367dd104
...
...
@@ -44,7 +44,7 @@ export class RPCProtocol implements IRPCProtocol {
});
}
public
get
<
T
>
(
identifier
:
ProxyIdentifier
<
T
>
):
T
{
public
get
Proxy
<
T
>
(
identifier
:
ProxyIdentifier
<
T
>
):
T
{
if
(
!
this
.
_proxies
[
identifier
.
id
])
{
this
.
_proxies
[
identifier
.
id
]
=
this
.
_createProxy
(
identifier
.
id
,
true
);
}
...
...
@@ -65,8 +65,8 @@ export class RPCProtocol implements IRPCProtocol {
target
[
name
]
=
(...
myArgs
:
any
[])
=>
{
return
(
isFancy
?
this
.
fancyRemoteCall
(
proxyId
,
name
,
myArgs
)
:
this
.
remoteCall
(
proxyId
,
name
,
myArgs
)
?
this
.
fancyRemoteCall
(
proxyId
,
name
,
myArgs
)
:
this
.
remoteCall
(
proxyId
,
name
,
myArgs
)
);
};
}
...
...
src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts
浏览文件 @
367dd104
...
...
@@ -15,7 +15,10 @@ suite('ExtHostDocumentsAndEditors', () => {
setup
(
function
()
{
editors
=
new
ExtHostDocumentsAndEditors
({
get
()
{
return
undefined
;
}
getProxy
:
()
=>
{
return
undefined
;
},
getFastProxy
:
()
=>
{
return
undefined
;
},
set
:
undefined
,
assertRegistered
:
undefined
});
});
...
...
src/vs/workbench/test/electron-browser/api/testThreadService.ts
浏览文件 @
367dd104
...
...
@@ -6,11 +6,14 @@
'
use strict
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
ProxyIdentifier
}
from
'
vs/workbench/services/extensions/node/proxyIdentifier
'
;
import
{
ProxyIdentifier
,
IRPCProtocol
}
from
'
vs/workbench/services/extensions/node/proxyIdentifier
'
;
export
function
OneGetThreadService
(
thing
:
any
)
{
export
function
OneGetThreadService
(
thing
:
any
)
:
IRPCProtocol
{
return
{
get
<
T
>
():
T
{
getProxy
<
T
>
():
T
{
return
thing
;
},
getFastProxy
<
T
>
():
T
{
return
thing
;
},
set
<
T
,
R
extends
T
>
(
identifier
:
ProxyIdentifier
<
T
>
,
value
:
R
):
R
{
...
...
@@ -75,7 +78,7 @@ export abstract class AbstractTestThreadService {
protected
abstract
_callOnRemote
(
proxyId
:
string
,
path
:
string
,
args
:
any
[]):
TPromise
<
any
>
;
}
export
class
TestThreadService
extends
AbstractTestThreadService
{
export
class
TestThreadService
extends
AbstractTestThreadService
implements
IRPCProtocol
{
constructor
(
isMainProcess
:
boolean
=
false
)
{
super
(
isMainProcess
);
}
...
...
@@ -120,7 +123,16 @@ export class TestThreadService extends AbstractTestThreadService {
return
value
;
}
get
<
T
>
(
identifier
:
ProxyIdentifier
<
T
>
):
T
{
getProxy
<
T
>
(
identifier
:
ProxyIdentifier
<
T
>
):
T
{
return
this
.
_get
(
identifier
);
}
getFastProxy
<
T
>
(
identifier
:
ProxyIdentifier
<
T
>
):
T
{
return
this
.
_get
(
identifier
);
}
_get
<
T
>
(
identifier
:
ProxyIdentifier
<
T
>
):
T
{
let
id
=
identifier
.
id
;
if
(
this
.
_locals
[
id
])
{
return
this
.
_locals
[
id
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录