Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
f5169146
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,发现更多精彩内容 >>
提交
f5169146
编写于
12月 22, 2015
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
trying to fix #1382
上级
3ae2793a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
10 deletion
+11
-10
src/vs/workbench/test/common/api/extHostApiCommands.test.ts
src/vs/workbench/test/common/api/extHostApiCommands.test.ts
+2
-2
src/vs/workbench/test/common/api/testThreadService.ts
src/vs/workbench/test/common/api/testThreadService.ts
+9
-8
未找到文件。
src/vs/workbench/test/common/api/extHostApiCommands.test.ts
浏览文件 @
f5169146
...
@@ -123,7 +123,7 @@ suite('ExtHostLanguageFeatureCommands', function() {
...
@@ -123,7 +123,7 @@ suite('ExtHostLanguageFeatureCommands', function() {
// });
// });
});
});
test
(
'
WorkspaceSymbols,
⇔
back and forth
'
,
function
(
done
)
{
test
(
'
WorkspaceSymbols, back and forth
'
,
function
(
done
)
{
disposables
.
push
(
extHost
.
registerWorkspaceSymbolProvider
(
<
vscode
.
WorkspaceSymbolProvider
>
{
disposables
.
push
(
extHost
.
registerWorkspaceSymbolProvider
(
<
vscode
.
WorkspaceSymbolProvider
>
{
provideWorkspaceSymbols
(
query
):
any
{
provideWorkspaceSymbols
(
query
):
any
{
...
@@ -176,7 +176,7 @@ suite('ExtHostLanguageFeatureCommands', function() {
...
@@ -176,7 +176,7 @@ suite('ExtHostLanguageFeatureCommands', function() {
// });
// });
});
});
test
(
'
Definition,
⇔
back and forth
'
,
function
(
done
)
{
test
(
'
Definition, back and forth
'
,
function
(
done
)
{
disposables
.
push
(
extHost
.
registerDefinitionProvider
(
defaultSelector
,
<
vscode
.
DefinitionProvider
>
{
disposables
.
push
(
extHost
.
registerDefinitionProvider
(
defaultSelector
,
<
vscode
.
DefinitionProvider
>
{
provideDefinition
(
doc
:
any
):
any
{
provideDefinition
(
doc
:
any
):
any
{
...
...
src/vs/workbench/test/common/api/testThreadService.ts
浏览文件 @
f5169146
...
@@ -6,10 +6,8 @@
...
@@ -6,10 +6,8 @@
'
use strict
'
;
'
use strict
'
;
import
{
NullThreadService
}
from
'
vs/platform/test/common/nullThreadService
'
;
import
{
NullThreadService
}
from
'
vs/platform/test/common/nullThreadService
'
;
import
{
create
}
from
'
vs/base/common/types
'
;
import
{
SyncDescriptor0
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
SyncDescriptor0
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
export
class
TestThreadService
extends
NullThreadService
{
export
class
TestThreadService
extends
NullThreadService
{
...
@@ -21,10 +19,12 @@ export class TestThreadService extends NullThreadService {
...
@@ -21,10 +19,12 @@ export class TestThreadService extends NullThreadService {
return
this
.
_callCountValue
;
return
this
.
_callCountValue
;
}
}
private
set
_callCount
(
value
:
number
)
{
private
set
_callCount
(
value
:
number
)
{
this
.
_callCountValue
=
value
;
this
.
_callCountValue
=
value
;
if
(
this
.
_callCountValue
===
0
)
{
if
(
this
.
_callCountValue
===
0
)
{
this
.
_completeIdle
&&
this
.
_completeIdle
();
if
(
this
.
_completeIdle
)
{
this
.
_completeIdle
();
}
this
.
_idle
=
undefined
;
this
.
_idle
=
undefined
;
}
}
}
}
...
@@ -49,18 +49,19 @@ export class TestThreadService extends NullThreadService {
...
@@ -49,18 +49,19 @@ export class TestThreadService extends NullThreadService {
protected
_registerAndInstantiateMainProcessActor
<
T
>
(
id
:
string
,
descriptor
:
SyncDescriptor0
<
T
>
):
T
{
protected
_registerAndInstantiateMainProcessActor
<
T
>
(
id
:
string
,
descriptor
:
SyncDescriptor0
<
T
>
):
T
{
let
_calls
:{
path
:
string
;
args
:
any
[]
}[]
=
[];
let
_calls
:
{
path
:
string
;
args
:
any
[]
}[]
=
[];
let
_instance
:
any
;
let
_instance
:
any
;
return
this
.
_getOrCreateProxyInstance
({
return
this
.
_getOrCreateProxyInstance
({
callOnRemote
:
(
proxyId
:
string
,
path
:
string
,
args
:
any
[]):
TPromise
<
any
>
=>
{
callOnRemote
:
(
proxyId
:
string
,
path
:
string
,
args
:
any
[]):
TPromise
<
any
>
=>
{
this
.
_callCount
++
;
this
.
_callCount
++
;
_calls
.
push
({
path
,
args
});
_calls
.
push
({
path
,
args
});
return
TPromise
.
timeout
(
0
).
then
(()
=>
{
return
new
TPromise
<
any
>
((
c
)
=>
{
setTimeout
(
c
,
0
);
}).
then
(()
=>
{
if
(
!
_instance
)
{
if
(
!
_instance
)
{
_instance
=
this
.
_instantiationService
.
createInstance
(
descriptor
.
ctor
);
_instance
=
this
.
_instantiationService
.
createInstance
(
descriptor
.
ctor
);
}
}
...
@@ -91,4 +92,4 @@ export class TestThreadService extends NullThreadService {
...
@@ -91,4 +92,4 @@ export class TestThreadService extends NullThreadService {
}
}
const
Instance
=
new
TestThreadService
();
const
Instance
=
new
TestThreadService
();
export
default
Instance
;
export
default
Instance
;
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录