Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
03116df7
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,发现更多精彩内容 >>
提交
03116df7
编写于
10月 23, 2017
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ResourceGlobMatcher is reacting to all configuration change events (fixes #36478)
上级
761b992c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
12 deletion
+25
-12
src/vs/platform/files/common/files.ts
src/vs/platform/files/common/files.ts
+1
-0
src/vs/workbench/common/resources.ts
src/vs/workbench/common/resources.ts
+10
-6
src/vs/workbench/parts/files/browser/views/explorerView.ts
src/vs/workbench/parts/files/browser/views/explorerView.ts
+6
-2
src/vs/workbench/services/history/browser/history.ts
src/vs/workbench/services/history/browser/history.ts
+8
-4
未找到文件。
src/vs/platform/files/common/files.ts
浏览文件 @
03116df7
...
...
@@ -589,6 +589,7 @@ export const HotExitConfiguration = {
export
const
CONTENT_CHANGE_EVENT_BUFFER_DELAY
=
1000
;
export
const
FILES_ASSOCIATIONS_CONFIG
=
'
files.associations
'
;
export
const
FILES_EXCLUDE_CONFIG
=
'
files.exclude
'
;
export
interface
IFilesConfiguration
{
files
:
{
...
...
src/vs/workbench/common/resources.ts
浏览文件 @
03116df7
...
...
@@ -11,8 +11,8 @@ import paths = require('vs/base/common/paths');
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ParsedExpression
,
IExpression
}
from
'
vs/base/common/glob
'
;
import
{
IConfigurationService
,
IConfigurationChangeEvent
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ParsedExpression
,
IExpression
,
parse
}
from
'
vs/base/common/glob
'
;
import
{
basename
}
from
'
vs/base/common/paths
'
;
import
{
RawContextKey
,
IContextKeyService
,
IContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
...
...
@@ -73,7 +73,7 @@ export class ResourceGlobMatcher {
constructor
(
private
globFn
:
(
root
?:
URI
)
=>
IExpression
,
private
parseFn
:
(
expression
:
IExpression
)
=>
ParsedExpressio
n
,
private
shouldUpdate
:
(
event
:
IConfigurationChangeEvent
)
=>
boolea
n
,
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
)
{
...
...
@@ -95,7 +95,11 @@ export class ResourceGlobMatcher {
}
private
registerListeners
():
void
{
this
.
toUnbind
.
push
(
this
.
configurationService
.
onDidChangeConfiguration
(()
=>
this
.
updateExcludes
(
true
)));
this
.
toUnbind
.
push
(
this
.
configurationService
.
onDidChangeConfiguration
(
e
=>
{
if
(
this
.
shouldUpdate
(
e
))
{
this
.
updateExcludes
(
true
);
}
}));
this
.
toUnbind
.
push
(
this
.
contextService
.
onDidChangeWorkspaceFolders
(()
=>
this
.
updateExcludes
(
true
)));
}
...
...
@@ -108,7 +112,7 @@ export class ResourceGlobMatcher {
if
(
!
this
.
mapRootToExpressionConfig
.
has
(
folder
.
uri
.
toString
())
||
!
objects
.
equals
(
this
.
mapRootToExpressionConfig
.
get
(
folder
.
uri
.
toString
()),
rootExcludes
))
{
changed
=
true
;
this
.
mapRootToParsedExpression
.
set
(
folder
.
uri
.
toString
(),
this
.
parseFn
(
rootExcludes
));
this
.
mapRootToParsedExpression
.
set
(
folder
.
uri
.
toString
(),
parse
(
rootExcludes
));
this
.
mapRootToExpressionConfig
.
set
(
folder
.
uri
.
toString
(),
objects
.
clone
(
rootExcludes
));
}
});
...
...
@@ -132,7 +136,7 @@ export class ResourceGlobMatcher {
if
(
!
this
.
mapRootToExpressionConfig
.
has
(
ResourceGlobMatcher
.
NO_ROOT
)
||
!
objects
.
equals
(
this
.
mapRootToExpressionConfig
.
get
(
ResourceGlobMatcher
.
NO_ROOT
),
globalExcludes
))
{
changed
=
true
;
this
.
mapRootToParsedExpression
.
set
(
ResourceGlobMatcher
.
NO_ROOT
,
this
.
parseFn
(
globalExcludes
));
this
.
mapRootToParsedExpression
.
set
(
ResourceGlobMatcher
.
NO_ROOT
,
parse
(
globalExcludes
));
this
.
mapRootToExpressionConfig
.
set
(
ResourceGlobMatcher
.
NO_ROOT
,
objects
.
clone
(
globalExcludes
));
}
...
...
src/vs/workbench/parts/files/browser/views/explorerView.ts
浏览文件 @
03116df7
...
...
@@ -19,7 +19,7 @@ import { memoize } from 'vs/base/common/decorators';
import
{
ITree
}
from
'
vs/base/parts/tree/browser/tree
'
;
import
{
Tree
}
from
'
vs/base/parts/tree/browser/treeImpl
'
;
import
{
IFilesConfiguration
,
ExplorerFolderContext
,
FilesExplorerFocusedContext
,
ExplorerFocusedContext
,
SortOrderConfiguration
,
SortOrder
}
from
'
vs/workbench/parts/files/common/files
'
;
import
{
FileOperation
,
FileOperationEvent
,
IResolveFileOptions
,
FileChangeType
,
FileChangesEvent
,
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
FileOperation
,
FileOperationEvent
,
IResolveFileOptions
,
FileChangeType
,
FileChangesEvent
,
IFileService
,
FILES_EXCLUDE_CONFIG
}
from
'
vs/platform/files/common/files
'
;
import
{
RefreshViewExplorerAction
,
NewFolderAction
,
NewFileAction
}
from
'
vs/workbench/parts/files/browser/fileActions
'
;
import
{
FileDragAndDrop
,
FileFilter
,
FileSorter
,
FileController
,
FileRenderer
,
FileDataSource
,
FileViewletState
,
FileAccessibilityProvider
}
from
'
vs/workbench/parts/files/browser/views/explorerViewer
'
;
import
{
toResource
}
from
'
vs/workbench/common/editor
'
;
...
...
@@ -115,7 +115,11 @@ export class ExplorerView extends ViewsViewletPanel {
this
.
filesExplorerFocusedContext
=
FilesExplorerFocusedContext
.
bindTo
(
contextKeyService
);
this
.
explorerFocusedContext
=
ExplorerFocusedContext
.
bindTo
(
contextKeyService
);
this
.
fileEventsFilter
=
instantiationService
.
createInstance
(
ResourceGlobMatcher
,
(
root
:
URI
)
=>
this
.
getFileEventsExcludes
(
root
),
(
expression
:
glob
.
IExpression
)
=>
glob
.
parse
(
expression
));
this
.
fileEventsFilter
=
instantiationService
.
createInstance
(
ResourceGlobMatcher
,
(
root
:
URI
)
=>
this
.
getFileEventsExcludes
(
root
),
(
event
:
IConfigurationChangeEvent
)
=>
event
.
affectsConfiguration
(
FILES_EXCLUDE_CONFIG
)
);
}
private
getFileEventsExcludes
(
root
?:
URI
):
glob
.
IExpression
{
...
...
src/vs/workbench/services/history/browser/history.ts
浏览文件 @
03116df7
...
...
@@ -13,7 +13,7 @@ import { IEditor as IBaseEditor, IEditorInput, ITextEditorOptions, IResourceInpu
import
{
Extensions
as
EditorExtensions
,
EditorInput
,
IEditorCloseEvent
,
IEditorGroup
,
IEditorInputFactoryRegistry
}
from
'
vs/workbench/common/editor
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IHistoryService
}
from
'
vs/workbench/services/history/common/history
'
;
import
{
FileChangesEvent
,
IFileService
,
FileChangeType
}
from
'
vs/platform/files/common/files
'
;
import
{
FileChangesEvent
,
IFileService
,
FileChangeType
,
FILES_EXCLUDE_CONFIG
}
from
'
vs/platform/files/common/files
'
;
import
{
Selection
}
from
'
vs/editor/common/core/selection
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
...
...
@@ -21,12 +21,12 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag
import
{
ILifecycleService
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
once
,
debounceEvent
}
from
'
vs/base/common/event
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IConfigurationService
,
IConfigurationChangeEvent
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
IWindowsService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
getCodeEditor
}
from
'
vs/editor/common/services/codeEditorService
'
;
import
{
getExcludes
,
ISearchConfiguration
}
from
'
vs/platform/search/common/search
'
;
import
{
parse
,
IExpression
}
from
'
vs/base/common/glob
'
;
import
{
IExpression
}
from
'
vs/base/common/glob
'
;
import
{
ICursorPositionChangedEvent
}
from
'
vs/editor/common/controller/cursorEvents
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ResourceGlobMatcher
}
from
'
vs/workbench/common/resources
'
;
...
...
@@ -211,7 +211,11 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
this
.
recentlyClosedFiles
=
[];
this
.
loaded
=
false
;
this
.
registry
=
Registry
.
as
<
IEditorRegistry
>
(
Extensions
.
Editors
);
this
.
resourceFilter
=
instantiationService
.
createInstance
(
ResourceGlobMatcher
,
(
root
:
URI
)
=>
this
.
getExcludes
(
root
),
(
expression
:
IExpression
)
=>
parse
(
expression
));
this
.
resourceFilter
=
instantiationService
.
createInstance
(
ResourceGlobMatcher
,
(
root
:
URI
)
=>
this
.
getExcludes
(
root
),
(
event
:
IConfigurationChangeEvent
)
=>
event
.
affectsConfiguration
(
FILES_EXCLUDE_CONFIG
)
||
event
.
affectsConfiguration
(
'
search.exclude
'
)
);
this
.
registerListeners
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录