Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
0bcaf897
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,发现更多精彩内容 >>
提交
0bcaf897
编写于
2月 22, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - search history service should not be a core workbench service
上级
56e81f7c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
28 addition
and
25 deletion
+28
-25
src/tsconfig.strictNullChecks.json
src/tsconfig.strictNullChecks.json
+1
-1
src/vs/workbench/contrib/search/browser/search.contribution.ts
...s/workbench/contrib/search/browser/search.contribution.ts
+3
-0
src/vs/workbench/contrib/search/browser/searchActions.ts
src/vs/workbench/contrib/search/browser/searchActions.ts
+2
-1
src/vs/workbench/contrib/search/browser/searchView.ts
src/vs/workbench/contrib/search/browser/searchView.ts
+2
-1
src/vs/workbench/contrib/search/common/searchHistoryService.ts
...s/workbench/contrib/search/common/searchHistoryService.ts
+18
-1
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+2
-4
src/vs/workbench/services/search/common/search.ts
src/vs/workbench/services/search/common/search.ts
+0
-17
未找到文件。
src/tsconfig.strictNullChecks.json
浏览文件 @
0bcaf897
...
...
@@ -252,6 +252,7 @@
"./vs/workbench/contrib/search/common/replace.ts"
,
"./vs/workbench/contrib/search/common/search.ts"
,
"./vs/workbench/contrib/search/common/searchModel.ts"
,
"./vs/workbench/contrib/search/common/searchHistoryService.ts"
,
"./vs/workbench/contrib/search/test/browser/mockSearchTree.ts"
,
"./vs/workbench/contrib/search/test/browser/openFileHandler.test.ts"
,
"./vs/workbench/contrib/search/test/common/searchModel.test.ts"
,
...
...
@@ -384,7 +385,6 @@
"./vs/workbench/services/search/common/replace.ts"
,
"./vs/workbench/services/search/common/search.ts"
,
"./vs/workbench/services/search/common/searchHelpers.ts"
,
"./vs/workbench/services/search/common/searchHistoryService.ts"
,
"./vs/workbench/services/search/node/fileSearch.ts"
,
"./vs/workbench/services/search/node/fileSearchManager.ts"
,
"./vs/workbench/services/search/node/rawSearchService.ts"
,
...
...
src/vs/workbench/contrib/search/browser/search.contribution.ts
浏览文件 @
0bcaf897
...
...
@@ -54,8 +54,11 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import
{
PanelRegistry
,
Extensions
as
PanelExtensions
,
PanelDescriptor
}
from
'
vs/workbench/browser/panel
'
;
import
{
ViewletDescriptor
,
ViewletRegistry
,
Extensions
as
ViewletExtensions
}
from
'
vs/workbench/browser/viewlet
'
;
import
{
SearchView
}
from
'
vs/workbench/contrib/search/browser/searchView
'
;
import
{
ISearchHistoryService
,
SearchHistoryService
}
from
'
vs/workbench/contrib/search/common/searchHistoryService
'
;
registerSingleton
(
ISearchWorkbenchService
,
SearchWorkbenchService
,
true
);
registerSingleton
(
ISearchHistoryService
,
SearchHistoryService
,
true
);
replaceContributions
();
searchWidgetContributions
();
...
...
src/vs/workbench/contrib/search/browser/searchActions.ts
浏览文件 @
0bcaf897
...
...
@@ -27,7 +27,8 @@ import { BaseFolderMatch, FileMatch, FileMatchOrMatch, FolderMatch, Match, Rende
import
{
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
ISearchConfiguration
,
ISearchHistoryService
,
VIEW_ID
}
from
'
vs/workbench/services/search/common/search
'
;
import
{
ISearchConfiguration
,
VIEW_ID
}
from
'
vs/workbench/services/search/common/search
'
;
import
{
ISearchHistoryService
}
from
'
vs/workbench/contrib/search/common/searchHistoryService
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
export
function
isSearchViewFocused
(
viewletService
:
IViewletService
,
panelService
:
IPanelService
):
boolean
{
...
...
src/vs/workbench/contrib/search/browser/searchView.ts
浏览文件 @
0bcaf897
...
...
@@ -34,7 +34,8 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
TreeResourceNavigator2
,
WorkbenchObjectTree
,
getSelectionKeyboardEvent
}
from
'
vs/platform/list/browser/listService
'
;
import
{
INotificationService
,
Severity
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IProgressService
}
from
'
vs/platform/progress/common/progress
'
;
import
{
IPatternInfo
,
ISearchComplete
,
ISearchConfiguration
,
ISearchConfigurationProperties
,
ISearchHistoryService
,
ISearchHistoryValues
,
ITextQuery
,
SearchErrorCode
,
VIEW_ID
}
from
'
vs/workbench/services/search/common/search
'
;
import
{
IPatternInfo
,
ISearchComplete
,
ISearchConfiguration
,
ISearchConfigurationProperties
,
ITextQuery
,
SearchErrorCode
,
VIEW_ID
}
from
'
vs/workbench/services/search/common/search
'
;
import
{
ISearchHistoryService
,
ISearchHistoryValues
}
from
'
vs/workbench/contrib/search/common/searchHistoryService
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
diffInserted
,
diffInsertedOutline
,
diffRemoved
,
diffRemovedOutline
,
editorFindMatchHighlight
,
editorFindMatchHighlightBorder
,
listActiveSelectionForeground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
...
...
src/vs/workbench/
services
/search/common/searchHistoryService.ts
→
src/vs/workbench/
contrib
/search/common/searchHistoryService.ts
浏览文件 @
0bcaf897
...
...
@@ -4,9 +4,26 @@
*--------------------------------------------------------------------------------------------*/
import
{
Emitter
,
Event
}
from
'
vs/base/common/event
'
;
import
{
ISearchHistoryValues
,
ISearchHistoryService
}
from
'
vs/workbench/services/search/common/search
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
isEmptyObject
}
from
'
vs/base/common/types
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
export
interface
ISearchHistoryService
{
_serviceBrand
:
any
;
onDidClearHistory
:
Event
<
void
>
;
clearHistory
():
void
;
load
():
ISearchHistoryValues
;
save
(
history
:
ISearchHistoryValues
):
void
;
}
export
const
ISearchHistoryService
=
createDecorator
<
ISearchHistoryService
>
(
'
searchHistoryService
'
);
export
interface
ISearchHistoryValues
{
search
?:
string
[];
replace
?:
string
[];
include
?:
string
[];
exclude
?:
string
[];
}
export
class
SearchHistoryService
implements
ISearchHistoryService
{
_serviceBrand
:
any
;
...
...
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
0bcaf897
...
...
@@ -123,8 +123,7 @@ import { MarkerDecorationsService } from 'vs/editor/common/services/markerDecora
import
{
IEditorWorkerService
}
from
'
vs/editor/common/services/editorWorkerService
'
;
import
{
EditorWorkerServiceImpl
}
from
'
vs/editor/common/services/editorWorkerServiceImpl
'
;
import
{
IUntitledEditorService
,
UntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
ISearchService
,
ISearchHistoryService
}
from
'
vs/workbench/services/search/common/search
'
;
import
{
SearchHistoryService
}
from
'
vs/workbench/services/search/common/searchHistoryService
'
;
import
{
ISearchService
}
from
'
vs/workbench/services/search/common/search
'
;
import
{
ICodeEditorService
}
from
'
vs/editor/browser/services/codeEditorService
'
;
import
{
CodeEditorService
}
from
'
vs/workbench/services/editor/browser/codeEditorService
'
;
import
{
IOpenerService
}
from
'
vs/platform/opener/common/opener
'
;
...
...
@@ -599,9 +598,8 @@ export class Workbench extends Disposable implements IPartService {
// Text Mate
serviceCollection
.
set
(
ITextMateService
,
new
SyncDescriptor
(
TextMateService
));
// Search
!!
// Search
serviceCollection
.
set
(
ISearchService
,
new
SyncDescriptor
(
SearchService
));
serviceCollection
.
set
(
ISearchHistoryService
,
new
SyncDescriptor
(
SearchHistoryService
));
// Code Editor
serviceCollection
.
set
(
ICodeEditorService
,
new
SyncDescriptor
(
CodeEditorService
,
undefined
,
true
));
...
...
src/vs/workbench/services/search/common/search.ts
浏览文件 @
0bcaf897
...
...
@@ -5,7 +5,6 @@
import
{
mapArrayOrNot
}
from
'
vs/base/common/arrays
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
import
*
as
glob
from
'
vs/base/common/glob
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
*
as
objects
from
'
vs/base/common/objects
'
;
...
...
@@ -17,7 +16,6 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
export
const
VIEW_ID
=
'
workbench.view.search
'
;
export
const
ISearchHistoryService
=
createDecorator
<
ISearchHistoryService
>
(
'
searchHistoryService
'
);
export
const
ISearchService
=
createDecorator
<
ISearchService
>
(
'
searchService
'
);
/**
...
...
@@ -31,21 +29,6 @@ export interface ISearchService {
registerSearchResultProvider
(
scheme
:
string
,
type
:
SearchProviderType
,
provider
:
ISearchResultProvider
):
IDisposable
;
}
export
interface
ISearchHistoryValues
{
search
?:
string
[];
replace
?:
string
[];
include
?:
string
[];
exclude
?:
string
[];
}
export
interface
ISearchHistoryService
{
_serviceBrand
:
any
;
onDidClearHistory
:
Event
<
void
>
;
clearHistory
():
void
;
load
():
ISearchHistoryValues
;
save
(
history
:
ISearchHistoryValues
):
void
;
}
/**
* TODO@roblou - split text from file search entirely, or share code in a more natural way.
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录