Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d7bb4b5a
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,发现更多精彩内容 >>
提交
d7bb4b5a
编写于
12月 13, 2017
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more native json, #40169
上级
426a39d7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
15 deletion
+20
-15
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+7
-7
src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts
src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts
+3
-2
src/vs/workbench/api/node/extHostFileSystemEventService.ts
src/vs/workbench/api/node/extHostFileSystemEventService.ts
+10
-6
未找到文件。
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
d7bb4b5a
...
@@ -452,7 +452,7 @@ export interface ExtHostDocumentsShape {
...
@@ -452,7 +452,7 @@ export interface ExtHostDocumentsShape {
}
}
export
interface
ExtHostDocumentSaveParticipantShape
{
export
interface
ExtHostDocumentSaveParticipantShape
{
$participateInSave
(
resource
:
U
RI
,
reason
:
SaveReason
):
Thenable
<
boolean
[]
>
;
$participateInSave
(
resource
:
U
riComponents
,
reason
:
SaveReason
):
Thenable
<
boolean
[]
>
;
}
}
export
interface
ITextEditorAddData
{
export
interface
ITextEditorAddData
{
...
@@ -510,9 +510,9 @@ export interface ExtHostExtensionServiceShape {
...
@@ -510,9 +510,9 @@ export interface ExtHostExtensionServiceShape {
}
}
export
interface
FileSystemEvents
{
export
interface
FileSystemEvents
{
created
:
U
RI
[];
created
:
U
riComponents
[];
changed
:
U
RI
[];
changed
:
U
riComponents
[];
deleted
:
U
RI
[];
deleted
:
U
riComponents
[];
}
}
export
interface
ExtHostFileSystemEventServiceShape
{
export
interface
ExtHostFileSystemEventServiceShape
{
$onFileEvent
(
events
:
FileSystemEvents
):
void
;
$onFileEvent
(
events
:
FileSystemEvents
):
void
;
...
@@ -686,7 +686,7 @@ export const MainContext = {
...
@@ -686,7 +686,7 @@ export const MainContext = {
MainThreadStorage
:
createMainId
<
MainThreadStorageShape
>
(
'
MainThreadStorage
'
),
MainThreadStorage
:
createMainId
<
MainThreadStorageShape
>
(
'
MainThreadStorage
'
),
MainThreadTelemetry
:
createMainId
<
MainThreadTelemetryShape
>
(
'
MainThreadTelemetry
'
),
MainThreadTelemetry
:
createMainId
<
MainThreadTelemetryShape
>
(
'
MainThreadTelemetry
'
),
MainThreadTerminalService
:
createMainId
<
MainThreadTerminalServiceShape
>
(
'
MainThreadTerminalService
'
),
MainThreadTerminalService
:
createMainId
<
MainThreadTerminalServiceShape
>
(
'
MainThreadTerminalService
'
),
MainThreadWorkspace
:
createMainId
<
MainThreadWorkspaceShape
>
(
'
MainThreadWorkspace
'
),
MainThreadWorkspace
:
createMainId
<
MainThreadWorkspaceShape
>
(
'
MainThreadWorkspace
'
,
ProxyType
.
CustomMarshaller
),
MainThreadFileSystem
:
createMainId
<
MainThreadFileSystemShape
>
(
'
MainThreadFileSystem
'
),
MainThreadFileSystem
:
createMainId
<
MainThreadFileSystemShape
>
(
'
MainThreadFileSystem
'
),
MainThreadExtensionService
:
createMainId
<
MainThreadExtensionServiceShape
>
(
'
MainThreadExtensionService
'
),
MainThreadExtensionService
:
createMainId
<
MainThreadExtensionServiceShape
>
(
'
MainThreadExtensionService
'
),
MainThreadSCM
:
createMainId
<
MainThreadSCMShape
>
(
'
MainThreadSCM
'
,
ProxyType
.
CustomMarshaller
),
MainThreadSCM
:
createMainId
<
MainThreadSCMShape
>
(
'
MainThreadSCM
'
,
ProxyType
.
CustomMarshaller
),
...
@@ -703,11 +703,11 @@ export const ExtHostContext = {
...
@@ -703,11 +703,11 @@ export const ExtHostContext = {
ExtHostDocumentsAndEditors
:
createExtId
<
ExtHostDocumentsAndEditorsShape
>
(
'
ExtHostDocumentsAndEditors
'
,
ProxyType
.
CustomMarshaller
),
ExtHostDocumentsAndEditors
:
createExtId
<
ExtHostDocumentsAndEditorsShape
>
(
'
ExtHostDocumentsAndEditors
'
,
ProxyType
.
CustomMarshaller
),
ExtHostDocuments
:
createExtId
<
ExtHostDocumentsShape
>
(
'
ExtHostDocuments
'
),
ExtHostDocuments
:
createExtId
<
ExtHostDocumentsShape
>
(
'
ExtHostDocuments
'
),
ExtHostDocumentContentProviders
:
createExtId
<
ExtHostDocumentContentProvidersShape
>
(
'
ExtHostDocumentContentProviders
'
),
ExtHostDocumentContentProviders
:
createExtId
<
ExtHostDocumentContentProvidersShape
>
(
'
ExtHostDocumentContentProviders
'
),
ExtHostDocumentSaveParticipant
:
createExtId
<
ExtHostDocumentSaveParticipantShape
>
(
'
ExtHostDocumentSaveParticipant
'
,
ProxyType
.
CustomMarshaller
),
ExtHostDocumentSaveParticipant
:
createExtId
<
ExtHostDocumentSaveParticipantShape
>
(
'
ExtHostDocumentSaveParticipant
'
),
ExtHostEditors
:
createExtId
<
ExtHostEditorsShape
>
(
'
ExtHostEditors
'
,
ProxyType
.
CustomMarshaller
),
ExtHostEditors
:
createExtId
<
ExtHostEditorsShape
>
(
'
ExtHostEditors
'
,
ProxyType
.
CustomMarshaller
),
ExtHostTreeViews
:
createExtId
<
ExtHostTreeViewsShape
>
(
'
ExtHostTreeViews
'
),
ExtHostTreeViews
:
createExtId
<
ExtHostTreeViewsShape
>
(
'
ExtHostTreeViews
'
),
ExtHostFileSystem
:
createExtId
<
ExtHostFileSystemShape
>
(
'
ExtHostFileSystem
'
,
ProxyType
.
CustomMarshaller
),
ExtHostFileSystem
:
createExtId
<
ExtHostFileSystemShape
>
(
'
ExtHostFileSystem
'
,
ProxyType
.
CustomMarshaller
),
ExtHostFileSystemEventService
:
createExtId
<
ExtHostFileSystemEventServiceShape
>
(
'
ExtHostFileSystemEventService
'
,
ProxyType
.
CustomMarshaller
),
ExtHostFileSystemEventService
:
createExtId
<
ExtHostFileSystemEventServiceShape
>
(
'
ExtHostFileSystemEventService
'
),
ExtHostHeapService
:
createExtId
<
ExtHostHeapServiceShape
>
(
'
ExtHostHeapMonitor
'
),
ExtHostHeapService
:
createExtId
<
ExtHostHeapServiceShape
>
(
'
ExtHostHeapMonitor
'
),
ExtHostLanguageFeatures
:
createExtId
<
ExtHostLanguageFeaturesShape
>
(
'
ExtHostLanguageFeatures
'
,
ProxyType
.
CustomMarshaller
),
ExtHostLanguageFeatures
:
createExtId
<
ExtHostLanguageFeaturesShape
>
(
'
ExtHostLanguageFeatures
'
,
ProxyType
.
CustomMarshaller
),
ExtHostQuickOpen
:
createExtId
<
ExtHostQuickOpenShape
>
(
'
ExtHostQuickOpen
'
),
ExtHostQuickOpen
:
createExtId
<
ExtHostQuickOpenShape
>
(
'
ExtHostQuickOpen
'
),
...
...
src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts
浏览文件 @
d7bb4b5a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
'
use strict
'
;
'
use strict
'
;
import
Event
from
'
vs/base/common/event
'
;
import
Event
from
'
vs/base/common/event
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
URI
,
{
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
sequence
,
always
}
from
'
vs/base/common/async
'
;
import
{
sequence
,
always
}
from
'
vs/base/common/async
'
;
import
{
illegalState
}
from
'
vs/base/common/errors
'
;
import
{
illegalState
}
from
'
vs/base/common/errors
'
;
import
{
ExtHostDocumentSaveParticipantShape
,
MainThreadEditorsShape
,
IWorkspaceResourceEdit
}
from
'
vs/workbench/api/node/extHost.protocol
'
;
import
{
ExtHostDocumentSaveParticipantShape
,
MainThreadEditorsShape
,
IWorkspaceResourceEdit
}
from
'
vs/workbench/api/node/extHost.protocol
'
;
...
@@ -49,7 +49,8 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic
...
@@ -49,7 +49,8 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic
};
};
}
}
$participateInSave
(
resource
:
URI
,
reason
:
SaveReason
):
Thenable
<
boolean
[]
>
{
$participateInSave
(
data
:
UriComponents
,
reason
:
SaveReason
):
Thenable
<
boolean
[]
>
{
const
resource
=
URI
.
revive
(
data
);
const
entries
=
this
.
_callbacks
.
toArray
();
const
entries
=
this
.
_callbacks
.
toArray
();
let
didTimeout
=
false
;
let
didTimeout
=
false
;
...
...
src/vs/workbench/api/node/extHostFileSystemEventService.ts
浏览文件 @
d7bb4b5a
...
@@ -9,6 +9,7 @@ import { Disposable } from './extHostTypes';
...
@@ -9,6 +9,7 @@ import { Disposable } from './extHostTypes';
import
{
parse
,
IRelativePattern
}
from
'
vs/base/common/glob
'
;
import
{
parse
,
IRelativePattern
}
from
'
vs/base/common/glob
'
;
import
{
Uri
,
FileSystemWatcher
as
_FileSystemWatcher
}
from
'
vscode
'
;
import
{
Uri
,
FileSystemWatcher
as
_FileSystemWatcher
}
from
'
vscode
'
;
import
{
FileSystemEvents
,
ExtHostFileSystemEventServiceShape
}
from
'
./extHost.protocol
'
;
import
{
FileSystemEvents
,
ExtHostFileSystemEventServiceShape
}
from
'
./extHost.protocol
'
;
import
URI
from
'
vs/base/common/uri
'
;
class
FileSystemWatcher
implements
_FileSystemWatcher
{
class
FileSystemWatcher
implements
_FileSystemWatcher
{
...
@@ -48,22 +49,25 @@ class FileSystemWatcher implements _FileSystemWatcher {
...
@@ -48,22 +49,25 @@ class FileSystemWatcher implements _FileSystemWatcher {
let
subscription
=
dispatcher
(
events
=>
{
let
subscription
=
dispatcher
(
events
=>
{
if
(
!
ignoreCreateEvents
)
{
if
(
!
ignoreCreateEvents
)
{
for
(
let
created
of
events
.
created
)
{
for
(
let
created
of
events
.
created
)
{
if
(
parsedPattern
(
created
.
fsPath
))
{
let
uri
=
URI
.
revive
(
created
);
this
.
_onDidCreate
.
fire
(
created
);
if
(
parsedPattern
(
uri
.
fsPath
))
{
this
.
_onDidCreate
.
fire
(
uri
);
}
}
}
}
}
}
if
(
!
ignoreChangeEvents
)
{
if
(
!
ignoreChangeEvents
)
{
for
(
let
changed
of
events
.
changed
)
{
for
(
let
changed
of
events
.
changed
)
{
if
(
parsedPattern
(
changed
.
fsPath
))
{
let
uri
=
URI
.
revive
(
changed
);
this
.
_onDidChange
.
fire
(
changed
);
if
(
parsedPattern
(
uri
.
fsPath
))
{
this
.
_onDidChange
.
fire
(
uri
);
}
}
}
}
}
}
if
(
!
ignoreDeleteEvents
)
{
if
(
!
ignoreDeleteEvents
)
{
for
(
let
deleted
of
events
.
deleted
)
{
for
(
let
deleted
of
events
.
deleted
)
{
if
(
parsedPattern
(
deleted
.
fsPath
))
{
let
uri
=
URI
.
revive
(
deleted
);
this
.
_onDidDelete
.
fire
(
deleted
);
if
(
parsedPattern
(
uri
.
fsPath
))
{
this
.
_onDidDelete
.
fire
(
uri
);
}
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录