Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
067d266d
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
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,发现更多精彩内容 >>
提交
067d266d
编写于
12月 13, 2017
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more UriComponents in mainThread-land, #40169
上级
7f712487
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
24 addition
and
23 deletion
+24
-23
src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts
...s/workbench/api/electron-browser/mainThreadDiagnostics.ts
+3
-3
src/vs/workbench/api/electron-browser/mainThreadDialogs.ts
src/vs/workbench/api/electron-browser/mainThreadDialogs.ts
+3
-2
src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts
...pi/electron-browser/mainThreadDocumentContentProviders.ts
+3
-3
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+9
-9
src/vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts
...ench/test/electron-browser/api/extHostDiagnostics.test.ts
+6
-6
未找到文件。
src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts
浏览文件 @
067d266d
...
...
@@ -5,7 +5,7 @@
'
use strict
'
;
import
{
IMarkerService
,
IMarkerData
}
from
'
vs/platform/markers/common/markers
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
URI
,
{
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
MainThreadDiagnosticsShape
,
MainContext
,
IExtHostContext
}
from
'
../node/extHost.protocol
'
;
import
{
extHostNamedCustomer
}
from
'
vs/workbench/api/electron-browser/extHostCustomers
'
;
...
...
@@ -27,10 +27,10 @@ export class MainThreadDiagnostics implements MainThreadDiagnosticsShape {
this
.
_activeOwners
.
forEach
(
owner
=>
this
.
_markerService
.
changeAll
(
owner
,
undefined
));
}
$changeMany
(
owner
:
string
,
entries
:
[
U
RI
,
IMarkerData
[]][]):
TPromise
<
any
>
{
$changeMany
(
owner
:
string
,
entries
:
[
U
riComponents
,
IMarkerData
[]][]):
TPromise
<
any
>
{
for
(
let
entry
of
entries
)
{
let
[
uri
,
markers
]
=
entry
;
this
.
_markerService
.
changeOne
(
owner
,
uri
,
markers
);
this
.
_markerService
.
changeOne
(
owner
,
URI
.
revive
(
uri
)
,
markers
);
}
this
.
_activeOwners
.
add
(
owner
);
return
undefined
;
...
...
src/vs/workbench/api/electron-browser/mainThreadDialogs.ts
浏览文件 @
067d266d
...
...
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
isFalsyOrEmpty
}
from
'
vs/base/common/arrays
'
;
import
{
MainThreadDiaglogsShape
,
MainContext
,
IExtHostContext
,
MainThreadDialogOpenOptions
,
MainThreadDialogSaveOptions
}
from
'
../node/extHost.protocol
'
;
import
{
extHostNamedCustomer
}
from
'
vs/workbench/api/electron-browser/extHostCustomers
'
;
...
...
@@ -56,7 +57,7 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape {
result
.
buttonLabel
=
options
.
openLabel
;
}
if
(
options
.
defaultUri
)
{
result
.
defaultPath
=
options
.
defaultUri
.
fsPath
;
result
.
defaultPath
=
URI
.
revive
(
options
.
defaultUri
)
.
fsPath
;
}
if
(
!
options
.
canSelectFiles
&&
!
options
.
canSelectFolders
)
{
options
.
canSelectFiles
=
true
;
...
...
@@ -82,7 +83,7 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape {
};
if
(
options
.
defaultUri
)
{
result
.
defaultPath
=
options
.
defaultUri
.
fsPath
;
result
.
defaultPath
=
URI
.
revive
(
options
.
defaultUri
)
.
fsPath
;
}
if
(
options
.
saveLabel
)
{
result
.
buttonLabel
=
options
.
saveLabel
;
...
...
src/vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts
浏览文件 @
067d266d
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
URI
,
{
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IModel
}
from
'
vs/editor/common/editorCommon
'
;
...
...
@@ -63,8 +63,8 @@ export class MainThreadDocumentContentProviders implements MainThreadDocumentCon
}
}
$onVirtualDocumentChange
(
uri
:
U
RI
,
value
:
ITextSource
):
void
{
const
model
=
this
.
_modelService
.
getModel
(
uri
);
$onVirtualDocumentChange
(
uri
:
U
riComponents
,
value
:
ITextSource
):
void
{
const
model
=
this
.
_modelService
.
getModel
(
URI
.
revive
(
uri
)
);
if
(
!
model
)
{
return
;
}
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
067d266d
...
...
@@ -113,12 +113,12 @@ export interface MainThreadConfigurationShape extends IDisposable {
}
export
interface
MainThreadDiagnosticsShape
extends
IDisposable
{
$changeMany
(
owner
:
string
,
entries
:
[
U
RI
,
IMarkerData
[]][]):
TPromise
<
any
>
;
$changeMany
(
owner
:
string
,
entries
:
[
U
riComponents
,
IMarkerData
[]][]):
TPromise
<
any
>
;
$clear
(
owner
:
string
):
TPromise
<
any
>
;
}
export
interface
MainThreadDialogOpenOptions
{
defaultUri
?:
U
RI
;
defaultUri
?:
U
riComponents
;
openLabel
?:
string
;
canSelectFiles
?:
boolean
;
canSelectFolders
?:
boolean
;
...
...
@@ -127,7 +127,7 @@ export interface MainThreadDialogOpenOptions {
}
export
interface
MainThreadDialogSaveOptions
{
defaultUri
?:
U
RI
;
defaultUri
?:
U
riComponents
;
saveLabel
?:
string
;
filters
?:
{
[
name
:
string
]:
string
[]
};
}
...
...
@@ -146,7 +146,7 @@ export interface MainThreadDecorationsShape extends IDisposable {
export
interface
MainThreadDocumentContentProvidersShape
extends
IDisposable
{
$registerTextContentProvider
(
handle
:
number
,
scheme
:
string
):
void
;
$unregisterTextContentProvider
(
handle
:
number
):
void
;
$onVirtualDocumentChange
(
uri
:
U
RI
,
value
:
ITextSource
):
void
;
$onVirtualDocumentChange
(
uri
:
U
riComponents
,
value
:
ITextSource
):
void
;
}
export
interface
MainThreadDocumentsShape
extends
IDisposable
{
...
...
@@ -668,10 +668,10 @@ export const MainContext = {
MainThreadCommands
:
<
ProxyIdentifier
<
MainThreadCommandsShape
>>
createMainId
<
MainThreadCommandsShape
>
(
'
MainThreadCommands
'
,
ProxyType
.
CustomMarshaller
),
MainThreadConfiguration
:
createMainId
<
MainThreadConfigurationShape
>
(
'
MainThreadConfiguration
'
,
ProxyType
.
CustomMarshaller
),
MainThreadDebugService
:
createMainId
<
MainThreadDebugServiceShape
>
(
'
MainThreadDebugService
'
,
ProxyType
.
CustomMarshaller
),
MainThreadDecorations
:
createMainId
<
MainThreadDecorationsShape
>
(
'
MainThreadDecorations
'
,
ProxyType
.
NativeJSON
),
MainThreadDiagnostics
:
createMainId
<
MainThreadDiagnosticsShape
>
(
'
MainThreadDiagnostics
'
,
ProxyType
.
CustomMarshaller
),
MainThreadDialogs
:
createMainId
<
MainThreadDiaglogsShape
>
(
'
MainThreadDiaglogs
'
,
ProxyType
.
CustomMarshaller
),
MainThreadDocuments
:
createMainId
<
MainThreadDocumentsShape
>
(
'
MainThreadDocuments
'
,
ProxyType
.
CustomMarshaller
),
MainThreadDecorations
:
createMainId
<
MainThreadDecorationsShape
>
(
'
MainThreadDecorations
'
),
MainThreadDiagnostics
:
createMainId
<
MainThreadDiagnosticsShape
>
(
'
MainThreadDiagnostics
'
),
MainThreadDialogs
:
createMainId
<
MainThreadDiaglogsShape
>
(
'
MainThreadDiaglogs
'
),
MainThreadDocuments
:
createMainId
<
MainThreadDocumentsShape
>
(
'
MainThreadDocuments
'
),
MainThreadDocumentContentProviders
:
createMainId
<
MainThreadDocumentContentProvidersShape
>
(
'
MainThreadDocumentContentProviders
'
,
ProxyType
.
CustomMarshaller
),
MainThreadEditors
:
createMainId
<
MainThreadEditorsShape
>
(
'
MainThreadEditors
'
),
MainThreadErrors
:
createMainId
<
MainThreadErrorsShape
>
(
'
MainThreadErrors
'
),
...
...
@@ -681,7 +681,7 @@ export const MainContext = {
MainThreadMessageService
:
createMainId
<
MainThreadMessageServiceShape
>
(
'
MainThreadMessageService
'
,
ProxyType
.
CustomMarshaller
),
MainThreadOutputService
:
createMainId
<
MainThreadOutputServiceShape
>
(
'
MainThreadOutputService
'
),
MainThreadProgress
:
createMainId
<
MainThreadProgressShape
>
(
'
MainThreadProgress
'
),
MainThreadQuickOpen
:
createMainId
<
MainThreadQuickOpenShape
>
(
'
MainThreadQuickOpen
'
,
ProxyType
.
CustomMarshaller
),
MainThreadQuickOpen
:
createMainId
<
MainThreadQuickOpenShape
>
(
'
MainThreadQuickOpen
'
),
MainThreadStatusBar
:
createMainId
<
MainThreadStatusBarShape
>
(
'
MainThreadStatusBar
'
),
MainThreadStorage
:
createMainId
<
MainThreadStorageShape
>
(
'
MainThreadStorage
'
,
ProxyType
.
CustomMarshaller
),
MainThreadTelemetry
:
createMainId
<
MainThreadTelemetryShape
>
(
'
MainThreadTelemetry
'
,
ProxyType
.
CustomMarshaller
),
...
...
src/vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts
浏览文件 @
067d266d
...
...
@@ -6,7 +6,7 @@
'
use strict
'
;
import
*
as
assert
from
'
assert
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
URI
,
{
UriComponents
}
from
'
vs/base/common/uri
'
;
import
Severity
from
'
vs/base/common/severity
'
;
import
{
DiagnosticCollection
}
from
'
vs/workbench/api/node/extHostDiagnostics
'
;
import
{
Diagnostic
,
DiagnosticSeverity
,
Range
}
from
'
vs/workbench/api/node/extHostTypes
'
;
...
...
@@ -18,7 +18,7 @@ import { mock } from 'vs/workbench/test/electron-browser/api/mock';
suite
(
'
ExtHostDiagnostics
'
,
()
=>
{
class
DiagnosticsShape
extends
mock
<
MainThreadDiagnosticsShape
>
()
{
$changeMany
(
owner
:
string
,
entries
:
[
U
RI
,
IMarkerData
[]][]):
TPromise
<
any
>
{
$changeMany
(
owner
:
string
,
entries
:
[
U
riComponents
,
IMarkerData
[]][]):
TPromise
<
any
>
{
return
TPromise
.
as
(
null
);
}
$clear
(
owner
:
string
):
TPromise
<
any
>
{
...
...
@@ -163,9 +163,9 @@ suite('ExtHostDiagnostics', () => {
test
(
'
diagnostics collection, set tuple overrides, #11547
'
,
function
()
{
let
lastEntries
:
[
U
RI
,
IMarkerData
[]][];
let
lastEntries
:
[
U
riComponents
,
IMarkerData
[]][];
let
collection
=
new
DiagnosticCollection
(
'
test
'
,
new
class
extends
DiagnosticsShape
{
$changeMany
(
owner
:
string
,
entries
:
[
U
RI
,
IMarkerData
[]][]):
TPromise
<
any
>
{
$changeMany
(
owner
:
string
,
entries
:
[
U
riComponents
,
IMarkerData
[]][]):
TPromise
<
any
>
{
lastEntries
=
entries
;
return
super
.
$changeMany
(
owner
,
entries
);
}
...
...
@@ -237,9 +237,9 @@ suite('ExtHostDiagnostics', () => {
test
(
'
diagnostic capping
'
,
function
()
{
let
lastEntries
:
[
U
RI
,
IMarkerData
[]][];
let
lastEntries
:
[
U
riComponents
,
IMarkerData
[]][];
let
collection
=
new
DiagnosticCollection
(
'
test
'
,
new
class
extends
DiagnosticsShape
{
$changeMany
(
owner
:
string
,
entries
:
[
U
RI
,
IMarkerData
[]][]):
TPromise
<
any
>
{
$changeMany
(
owner
:
string
,
entries
:
[
U
riComponents
,
IMarkerData
[]][]):
TPromise
<
any
>
{
lastEntries
=
entries
;
return
super
.
$changeMany
(
owner
,
entries
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录