Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
1af44d67
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,发现更多精彩内容 >>
提交
1af44d67
编写于
11月 22, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip: extHostSCM, mainThreadSCM
上级
f4ae41f9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
85 addition
and
2 deletion
+85
-2
src/vs/workbench/api/node/extHost.api.impl.ts
src/vs/workbench/api/node/extHost.api.impl.ts
+3
-1
src/vs/workbench/api/node/extHost.contribution.ts
src/vs/workbench/api/node/extHost.contribution.ts
+2
-0
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+9
-1
src/vs/workbench/api/node/extHostSCM.ts
src/vs/workbench/api/node/extHostSCM.ts
+46
-0
src/vs/workbench/api/node/mainThreadSCM.ts
src/vs/workbench/api/node/mainThreadSCM.ts
+25
-0
未找到文件。
src/vs/workbench/api/node/extHost.api.impl.ts
浏览文件 @
1af44d67
...
...
@@ -20,6 +20,7 @@ import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics';
import
{
ExtHostTreeExplorers
}
from
'
vs/workbench/api/node/extHostTreeExplorers
'
;
import
{
ExtHostWorkspace
}
from
'
vs/workbench/api/node/extHostWorkspace
'
;
import
{
ExtHostQuickOpen
}
from
'
vs/workbench/api/node/extHostQuickOpen
'
;
import
{
ExtHostSCM
}
from
'
vs/workbench/api/node/extHostSCM
'
;
import
{
ExtHostHeapService
}
from
'
vs/workbench/api/node/extHostHeapService
'
;
import
{
ExtHostStatusBar
}
from
'
vs/workbench/api/node/extHostStatusBar
'
;
import
{
ExtHostCommands
}
from
'
vs/workbench/api/node/extHostCommands
'
;
...
...
@@ -78,6 +79,7 @@ export function createApiFactory(initData: IInitData, threadService: IThreadServ
const
extHostFileSystemEvent
=
col
.
define
(
ExtHostContext
.
ExtHostFileSystemEventService
).
set
<
ExtHostFileSystemEventService
>
(
new
ExtHostFileSystemEventService
());
const
extHostQuickOpen
=
col
.
define
(
ExtHostContext
.
ExtHostQuickOpen
).
set
<
ExtHostQuickOpen
>
(
new
ExtHostQuickOpen
(
threadService
));
const
extHostTerminalService
=
col
.
define
(
ExtHostContext
.
ExtHostTerminalService
).
set
<
ExtHostTerminalService
>
(
new
ExtHostTerminalService
(
threadService
));
const
extHostSCM
=
col
.
define
(
ExtHostContext
.
ExtHostSCM
).
set
<
ExtHostSCM
>
(
new
ExtHostSCM
(
threadService
));
col
.
define
(
ExtHostContext
.
ExtHostExtensionService
).
set
(
extensionService
);
col
.
finish
(
false
,
threadService
);
...
...
@@ -361,7 +363,7 @@ export function createApiFactory(initData: IInitData, threadService: IThreadServ
// namespace: scm
const
scm
:
typeof
vscode
.
scm
=
{
createSCMProvider
:
(
id
,
delegate
):
vscode
.
SCMProvider
=>
{
throw
new
Error
(
'
JOAO not implemented
'
);
return
extHostSCM
.
createSCMProvider
(
id
,
delegate
);
}
};
...
...
src/vs/workbench/api/node/extHost.contribution.ts
浏览文件 @
1af44d67
...
...
@@ -32,6 +32,7 @@ import { MainThreadTerminalService } from './mainThreadTerminalService';
import
{
MainThreadWorkspace
}
from
'
./mainThreadWorkspace
'
;
import
{
MainProcessExtensionService
}
from
'
./mainThreadExtensionService
'
;
import
{
MainThreadFileSystemEventService
}
from
'
./mainThreadFileSystemEventService
'
;
import
{
MainThreadSCM
}
from
'
./mainThreadSCM
'
;
// --- other interested parties
import
{
MainProcessTextMateSyntax
}
from
'
vs/editor/node/textMate/TMSyntax
'
;
...
...
@@ -81,6 +82,7 @@ export class ExtHostContribution implements IWorkbenchContribution {
col
.
define
(
MainContext
.
MainThreadTelemetry
).
set
(
create
(
MainThreadTelemetry
));
col
.
define
(
MainContext
.
MainThreadTerminalService
).
set
(
create
(
MainThreadTerminalService
));
col
.
define
(
MainContext
.
MainThreadWorkspace
).
set
(
create
(
MainThreadWorkspace
));
col
.
define
(
MainContext
.
MainThreadSCM
).
set
(
create
(
MainThreadSCM
));
if
(
this
.
extensionService
instanceof
MainProcessExtensionService
)
{
col
.
define
(
MainContext
.
MainProcessExtensionService
).
set
(
<
MainProcessExtensionService
>
this
.
extensionService
);
}
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
1af44d67
...
...
@@ -228,6 +228,9 @@ export abstract class MainProcessExtensionServiceShape {
$onExtensionActivationFailed
(
extensionId
:
string
):
void
{
throw
ni
();
}
}
export
abstract
class
MainThreadSCMShape
{
}
// -- extension host
export
abstract
class
ExtHostCommandsShape
{
...
...
@@ -355,6 +358,9 @@ export abstract class ExtHostTerminalServiceShape {
$acceptTerminalProcessId
(
id
:
number
,
processId
:
number
):
void
{
throw
ni
();
}
}
export
abstract
class
ExtHostSCMShape
{
}
// --- proxy identifiers
export
const
MainContext
=
{
...
...
@@ -376,6 +382,7 @@ export const MainContext = {
MainThreadTerminalService
:
createMainId
<
MainThreadTerminalServiceShape
>
(
'
MainThreadTerminalService
'
,
MainThreadTerminalServiceShape
),
MainThreadWorkspace
:
createMainId
<
MainThreadWorkspaceShape
>
(
'
MainThreadWorkspace
'
,
MainThreadWorkspaceShape
),
MainProcessExtensionService
:
createMainId
<
MainProcessExtensionServiceShape
>
(
'
MainProcessExtensionService
'
,
MainProcessExtensionServiceShape
),
MainThreadSCM
:
createMainId
(
'
MainThreadSCM
'
,
MainThreadSCMShape
)
};
export
const
ExtHostContext
=
{
...
...
@@ -391,5 +398,6 @@ export const ExtHostContext = {
ExtHostLanguageFeatures
:
createExtId
<
ExtHostLanguageFeaturesShape
>
(
'
ExtHostLanguageFeatures
'
,
ExtHostLanguageFeaturesShape
),
ExtHostQuickOpen
:
createExtId
<
ExtHostQuickOpenShape
>
(
'
ExtHostQuickOpen
'
,
ExtHostQuickOpenShape
),
ExtHostExtensionService
:
createExtId
<
ExtHostExtensionServiceShape
>
(
'
ExtHostExtensionService
'
,
ExtHostExtensionServiceShape
),
ExtHostTerminalService
:
createExtId
<
ExtHostTerminalServiceShape
>
(
'
ExtHostTerminalService
'
,
ExtHostTerminalServiceShape
)
ExtHostTerminalService
:
createExtId
<
ExtHostTerminalServiceShape
>
(
'
ExtHostTerminalService
'
,
ExtHostTerminalServiceShape
),
ExtHostSCM
:
createExtId
<
ExtHostSCMShape
>
(
'
ExtHostSCM
'
,
ExtHostSCMShape
)
};
src/vs/workbench/api/node/extHostSCM.ts
0 → 100644
浏览文件 @
1af44d67
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
IThreadService
}
from
'
vs/workbench/services/thread/common/threadService
'
;
import
{
SCMProvider
,
SCMDelegate
,
SCMResourceGroup
}
from
'
vscode
'
;
import
{
MainContext
,
MainThreadSCMShape
}
from
'
./extHost.protocol
'
;
export
class
ExtHostSCMProvider
implements
SCMProvider
{
private
static
ID_GEN
=
0
;
private
_id
:
number
=
ExtHostSCMProvider
.
ID_GEN
++
;
constructor
(
private
_proxy
:
MainThreadSCMShape
,
private
_delegate
:
SCMDelegate
)
{
}
get
id
():
number
{
return
this
.
_id
;
}
createResourceGroup
(
id
:
string
,
label
:
string
):
SCMResourceGroup
{
// throw new Error('JOAO not implemented');
return
null
;
}
dispose
():
void
{
// todo
}
}
export
class
ExtHostSCM
{
private
_proxy
:
MainThreadSCMShape
;
constructor
(
threadService
:
IThreadService
)
{
this
.
_proxy
=
threadService
.
get
(
MainContext
.
MainThreadSCM
);
}
createSCMProvider
(
id
:
string
,
delegate
:
SCMDelegate
):
ExtHostSCMProvider
{
return
new
ExtHostSCMProvider
(
this
.
_proxy
,
delegate
);
}
}
src/vs/workbench/api/node/mainThreadSCM.ts
0 → 100644
浏览文件 @
1af44d67
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IThreadService
}
from
'
vs/workbench/services/thread/common/threadService
'
;
import
{
MainThreadSCMShape
}
from
'
./extHost.protocol
'
;
export
class
MainThreadSCM
extends
MainThreadSCMShape
{
private
_toDispose
:
IDisposable
;
constructor
(
@
IThreadService
threadService
:
IThreadService
)
{
super
();
// const proxy = threadService.get(ExtHostContext.ExtHostSCM);
}
dispose
():
void
{
this
.
_toDispose
=
dispose
(
this
.
_toDispose
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录