Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
6dc7e364
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,发现更多精彩内容 >>
提交
6dc7e364
编写于
11月 07, 2017
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - remove some ts-ignored things
上级
d2cc9662
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
15 addition
and
43 deletion
+15
-43
src/vs/platform/instantiation/common/instantiationService.ts
src/vs/platform/instantiation/common/instantiationService.ts
+1
-2
src/vs/workbench/api/electron-browser/mainThreadDocuments.ts
src/vs/workbench/api/electron-browser/mainThreadDocuments.ts
+0
-3
src/vs/workbench/api/electron-browser/mainThreadHeapService.ts
...s/workbench/api/electron-browser/mainThreadHeapService.ts
+1
-2
src/vs/workbench/api/electron-browser/mainThreadMessageService.ts
...orkbench/api/electron-browser/mainThreadMessageService.ts
+1
-3
src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts
src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts
+1
-7
src/vs/workbench/api/node/extHostLanguageFeatures.ts
src/vs/workbench/api/node/extHostLanguageFeatures.ts
+1
-6
src/vs/workbench/api/node/extHostMessageService.ts
src/vs/workbench/api/node/extHostMessageService.ts
+1
-3
src/vs/workbench/api/node/extHostTask.ts
src/vs/workbench/api/node/extHostTask.ts
+1
-6
src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts
.../parts/snippets/electron-browser/snippets.contribution.ts
+1
-2
src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts
.../test/electron-browser/api/extHostMessagerService.test.ts
+6
-6
src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts
...lectron-browser/api/mainThreadDocumentsAndEditors.test.ts
+1
-3
未找到文件。
src/vs/platform/instantiation/common/instantiationService.ts
浏览文件 @
6dc7e364
...
...
@@ -62,8 +62,7 @@ export class InstantiationService implements IInstantiationService {
}
}
// @ts-ignore unused generic parameter
createInstance
<
T
>
(
param
:
any
,
...
rest
:
any
[]):
any
{
createInstance
(
param
:
any
,
...
rest
:
any
[]):
any
{
if
(
param
instanceof
SyncDescriptor
)
{
// sync
...
...
src/vs/workbench/api/electron-browser/mainThreadDocuments.ts
浏览文件 @
6dc7e364
...
...
@@ -66,8 +66,6 @@ export class BoundModelReferenceCollection {
export
class
MainThreadDocuments
implements
MainThreadDocumentsShape
{
private
_modelService
:
IModelService
;
// @ts-ignore unused injected service
private
_modeService
:
IModeService
;
private
_textModelResolverService
:
ITextModelService
;
private
_textFileService
:
ITextFileService
;
private
_fileService
:
IFileService
;
...
...
@@ -90,7 +88,6 @@ export class MainThreadDocuments implements MainThreadDocumentsShape {
@
IUntitledEditorService
untitledEditorService
:
IUntitledEditorService
,
)
{
this
.
_modelService
=
modelService
;
this
.
_modeService
=
modeService
;
this
.
_textModelResolverService
=
textModelResolverService
;
this
.
_textFileService
=
textFileService
;
this
.
_fileService
=
fileService
;
...
...
src/vs/workbench/api/electron-browser/mainThreadHeapService.ts
浏览文件 @
6dc7e364
...
...
@@ -69,8 +69,7 @@ export class HeapService implements IHeapService {
trackRecursive
<
T
>
(
p
:
TPromise
<
T
>
):
TPromise
<
T
>
;
trackRecursive
<
T
>
(
obj
:
T
):
T
;
// @ts-ignore unused generic parameter
trackRecursive
<
T
>
(
obj
:
any
):
any
{
trackRecursive
(
obj
:
any
):
any
{
if
(
TPromise
.
is
(
obj
))
{
return
obj
.
then
(
result
=>
this
.
trackRecursive
(
result
));
}
else
{
...
...
src/vs/workbench/api/electron-browser/mainThreadMessageService.ts
浏览文件 @
6dc7e364
...
...
@@ -11,15 +11,13 @@ import { Action } from 'vs/base/common/actions';
import
{
TPromise
as
Promise
}
from
'
vs/base/common/winjs.base
'
;
import
{
MainThreadMessageServiceShape
,
MainContext
,
IExtHostContext
,
MainThreadMessageOptions
}
from
'
../node/extHost.protocol
'
;
import
{
extHostNamedCustomer
}
from
'
vs/workbench/api/electron-browser/extHostCustomers
'
;
import
{
IExtension
Service
,
IExtension
Description
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
IExtensionDescription
}
from
'
vs/platform/extensions/common/extensions
'
;
@
extHostNamedCustomer
(
MainContext
.
MainThreadMessageService
)
export
class
MainThreadMessageService
implements
MainThreadMessageServiceShape
{
constructor
(
extHostContext
:
IExtHostContext
,
// @ts-ignore unused injected service
@
IExtensionService
private
readonly
_extensionService
:
IExtensionService
,
@
IMessageService
private
readonly
_messageService
:
IMessageService
,
@
IChoiceService
private
readonly
_choiceService
:
IChoiceService
)
{
...
...
src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts
浏览文件 @
6dc7e364
...
...
@@ -11,12 +11,10 @@ import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
MainThreadWorkspaceShape
,
ExtHostWorkspaceShape
,
ExtHostContext
,
MainContext
,
IExtHostContext
}
from
'
../node/extHost.protocol
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
extHostNamedCustomer
}
from
'
vs/workbench/api/electron-browser/extHostCustomers
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IRelativePattern
}
from
'
vs/base/common/glob
'
;
import
{
IWorkspaceEditingService
}
from
'
vs/workbench/services/workspace/common/workspaceEditing
'
;
@
extHostNamedCustomer
(
MainContext
.
MainThreadWorkspace
)
export
class
MainThreadWorkspace
implements
MainThreadWorkspaceShape
{
...
...
@@ -30,11 +28,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
@
ISearchService
private
readonly
_searchService
:
ISearchService
,
@
IWorkspaceContextService
private
readonly
_contextService
:
IWorkspaceContextService
,
@
ITextFileService
private
readonly
_textFileService
:
ITextFileService
,
@
IConfigurationService
private
_configurationService
:
IConfigurationService
,
// @ts-ignore unused injected service
@
IFileService
private
readonly
_fileService
:
IFileService
,
// @ts-ignore unused injected service
@
IWorkspaceEditingService
private
_workspaceEditingService
:
IWorkspaceEditingService
@
IConfigurationService
private
_configurationService
:
IConfigurationService
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostWorkspace
);
this
.
_contextService
.
onDidChangeWorkspaceFolders
(
this
.
_onDidChangeWorkspace
,
this
,
this
.
_toDispose
);
...
...
src/vs/workbench/api/node/extHostLanguageFeatures.ts
浏览文件 @
6dc7e364
...
...
@@ -707,11 +707,7 @@ class LinkProviderAdapter {
class
ColorProviderAdapter
{
constructor
(
// @ts-ignore unused property
private
_proxy
:
MainThreadLanguageFeaturesShape
,
private
_documents
:
ExtHostDocuments
,
// @ts-ignore unused property
private
_colorFormatCache
:
Map
<
string
,
number
>
,
private
_provider
:
vscode
.
DocumentColorProvider
)
{
}
...
...
@@ -758,7 +754,6 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
private
_heapService
:
ExtHostHeapService
;
private
_diagnostics
:
ExtHostDiagnostics
;
private
_adapter
=
new
Map
<
number
,
Adapter
>
();
private
_colorFormatCache
=
new
Map
<
string
,
number
>
();
constructor
(
mainContext
:
IMainContext
,
...
...
@@ -1041,7 +1036,7 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
registerColorProvider
(
selector
:
vscode
.
DocumentSelector
,
provider
:
vscode
.
DocumentColorProvider
):
vscode
.
Disposable
{
const
handle
=
this
.
_nextHandle
();
this
.
_adapter
.
set
(
handle
,
new
ColorProviderAdapter
(
this
.
_
proxy
,
this
.
_documents
,
this
.
_colorFormatCache
,
provider
));
this
.
_adapter
.
set
(
handle
,
new
ColorProviderAdapter
(
this
.
_
documents
,
provider
));
this
.
_proxy
.
$registerDocumentColorProvider
(
handle
,
selector
);
return
this
.
_createDisposable
(
handle
);
}
...
...
src/vs/workbench/api/node/extHostMessageService.ts
浏览文件 @
6dc7e364
...
...
@@ -9,9 +9,7 @@ import vscode = require('vscode');
import
{
MainContext
,
MainThreadMessageServiceShape
,
MainThreadMessageOptions
,
IMainContext
}
from
'
./extHost.protocol
'
;
import
{
IExtensionDescription
}
from
'
vs/platform/extensions/common/extensions
'
;
// @ts-ignore unused generic parameter
function
isMessageItem
<
T
>
(
item
:
any
):
item
is
vscode
.
MessageItem
{
function
isMessageItem
(
item
:
any
):
item
is
vscode
.
MessageItem
{
return
item
&&
item
.
title
;
}
...
...
src/vs/workbench/api/node/extHostTask.ts
浏览文件 @
6dc7e364
...
...
@@ -20,11 +20,6 @@ import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace';
import
*
as
vscode
from
'
vscode
'
;
// @ts-ignore unused type
interface
StringMap
<
V
>
{
[
key
:
string
]:
V
;
}
/*
namespace ProblemPattern {
export function from(value: vscode.ProblemPattern | vscode.MultiLineProblemPattern): Problems.ProblemPattern | Problems.MultiLineProblemPattern {
...
...
@@ -465,4 +460,4 @@ export class ExtHostTask implements ExtHostTaskShape {
private
nextHandle
():
number
{
return
this
.
_handleCounter
++
;
}
}
\ No newline at end of file
}
src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts
浏览文件 @
6dc7e364
...
...
@@ -133,9 +133,8 @@ export class Snippet {
}
}
// @ts-ignore unused type
namespace
OpenSnippetsAction
{
{
const
id
=
'
workbench.action.openSnippets
'
;
CommandsRegistry
.
registerCommand
(
id
,
accessor
=>
{
...
...
src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts
浏览文件 @
6dc7e364
...
...
@@ -14,7 +14,7 @@ suite('ExtHostMessageService', function () {
test
(
'
propagte handle on select
'
,
function
()
{
let
service
=
new
MainThreadMessageService
(
null
,
null
,
<
any
>
{
let
service
=
new
MainThreadMessageService
(
null
,
<
any
>
{
show
(
sev
:
number
,
m
:
{
message
;
actions
:
Action
[]
})
{
assert
.
equal
(
m
.
actions
.
length
,
1
);
setImmediate
(()
=>
m
.
actions
[
0
].
run
());
...
...
@@ -34,7 +34,7 @@ suite('ExtHostMessageService', function () {
test
(
'
isCloseAffordance
'
,
function
()
{
let
actions
:
Action
[];
let
service
=
new
MainThreadMessageService
(
null
,
null
,
<
any
>
{
let
service
=
new
MainThreadMessageService
(
null
,
<
any
>
{
show
(
sev
:
number
,
m
:
{
message
;
actions
:
Action
[]
})
{
actions
=
m
.
actions
;
}
...
...
@@ -62,7 +62,7 @@ suite('ExtHostMessageService', function () {
let
actions
:
Action
[];
let
c
:
number
;
let
service
=
new
MainThreadMessageService
(
null
,
null
,
<
any
>
{
let
service
=
new
MainThreadMessageService
(
null
,
<
any
>
{
show
(
sev
:
number
,
m
:
{
message
;
actions
:
Action
[]
})
{
c
=
0
;
actions
=
m
.
actions
;
...
...
@@ -85,7 +85,7 @@ suite('ExtHostMessageService', function () {
suite
(
'
modal
'
,
()
=>
{
test
(
'
calls choice service
'
,
()
=>
{
const
service
=
new
MainThreadMessageService
(
null
,
null
,
<
any
>
{
const
service
=
new
MainThreadMessageService
(
null
,
<
any
>
{
show
(
sev
:
number
,
m
:
{
message
;
actions
:
Action
[]
})
{
throw
new
Error
(
'
not implemented
'
);
}
...
...
@@ -105,7 +105,7 @@ suite('ExtHostMessageService', function () {
});
test
(
'
returns undefined when cancelled
'
,
()
=>
{
const
service
=
new
MainThreadMessageService
(
null
,
null
,
<
any
>
{
const
service
=
new
MainThreadMessageService
(
null
,
<
any
>
{
show
(
sev
:
number
,
m
:
{
message
;
actions
:
Action
[]
})
{
throw
new
Error
(
'
not implemented
'
);
}
...
...
@@ -121,7 +121,7 @@ suite('ExtHostMessageService', function () {
});
test
(
'
hides Cancel button when not needed
'
,
()
=>
{
const
service
=
new
MainThreadMessageService
(
null
,
null
,
<
any
>
{
const
service
=
new
MainThreadMessageService
(
null
,
<
any
>
{
show
(
sev
:
number
,
m
:
{
message
;
actions
:
Action
[]
})
{
throw
new
Error
(
'
not implemented
'
);
}
...
...
src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts
浏览文件 @
6dc7e364
...
...
@@ -25,8 +25,6 @@ suite('MainThreadDocumentsAndEditors', () => {
let
codeEditorService
:
MockCodeEditorService
;
let
textFileService
:
ITextFileService
;
let
workbenchEditorService
:
IWorkbenchEditorService
;
// @ts-ignore unused property
let
documentAndEditor
:
MainThreadDocumentsAndEditors
;
let
deltas
:
IDocumentsAndEditorsDelta
[]
=
[];
const
hugeModelString
=
new
Array
(
2
+
(
50
*
1024
*
1024
)).
join
(
'
-
'
);
...
...
@@ -53,7 +51,7 @@ suite('MainThreadDocumentsAndEditors', () => {
onEditorGroupMoved
=
Event
.
None
;
};
documentAndEditor
=
new
MainThreadDocumentsAndEditors
(
new
MainThreadDocumentsAndEditors
(
OneGetThreadService
(
new
class
extends
mock
<
ExtHostDocumentsAndEditorsShape
>
()
{
$acceptDocumentsAndEditorsDelta
(
delta
)
{
deltas
.
push
(
delta
);
}
}),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录