@codingame/monaco-vscode-search-service-override 37.1.0 → 37.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common.d.ts +2 -0
- package/common.js +84 -0
- package/index.js +3 -76
- package/package.json +10 -2
- package/session.d.ts +2 -0
- package/session.js +10 -0
- package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js +13 -9
- package/vscode/src/vs/workbench/contrib/search/browser/search.contribution.js +39 -39
- package/vscode/src/vs/workbench/contrib/search/browser/searchAccessibilityHelp.js +55 -55
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsCopy.js +7 -7
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +17 -17
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsNav.js +17 -17
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsRemoveReplace.js +4 -4
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTextQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchResult.js +3 -6
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.js +16 -16
- package/vscode/src/vs/workbench/services/search/browser/searchService.js +6 -6
- package/vscode/src/vs/workbench/services/search/common/searchService.js +4 -4
- package/vscode/src/vs/workbench/services/search/worker/localFileSearch.js +12 -10
- package/vscode/src/vs/workbench/contrib/search/browser/replaceContributions.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/search/browser/replaceContributions.js +0 -15
- package/vscode/src/vs/workbench/contrib/search/browser/replaceService.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/search/browser/replaceService.js +0 -264
- package/vscode/src/vs/workbench/contrib/search/browser/search.common.contribution.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/search/browser/search.common.contribution.js +0 -148
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsSymbol.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsSymbol.js +0 -41
- package/vscode/src/vs/workbench/contrib/search/browser/searchQuickAccess.contribution.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchQuickAccess.contribution.js +0 -38
package/common.d.ts
ADDED
package/common.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
4
|
+
import { ISearchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/search/common/search.service';
|
|
5
|
+
import { SearchService } from './vscode/src/vs/workbench/services/search/common/searchService.js';
|
|
6
|
+
import { SearchHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/common/searchHistoryService';
|
|
7
|
+
import { ISearchHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/common/searchHistoryService.service';
|
|
8
|
+
import { IReplaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/browser/replace.service';
|
|
9
|
+
import { ReplaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/browser/replaceService';
|
|
10
|
+
import { LocalFileSearchWorkerClient } from './vscode/src/vs/workbench/services/search/browser/searchService.js';
|
|
11
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
12
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
13
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
14
|
+
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
15
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
16
|
+
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
17
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
18
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
19
|
+
import { SearchProviderType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/search/common/search';
|
|
20
|
+
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
21
|
+
import '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
22
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/charCode';
|
|
23
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
24
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
25
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
26
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
27
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
28
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
29
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
30
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
31
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
32
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/files/browser/webFileSystemAccess';
|
|
33
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log';
|
|
34
|
+
import { WorkspaceSearchProvider } from './service-override/tools/search-providers/workspace-search-provider.js';
|
|
35
|
+
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
36
|
+
import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
37
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
38
|
+
import './vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js';
|
|
39
|
+
|
|
40
|
+
function isHTMLFileSystemProvider(provider) {
|
|
41
|
+
return provider.directories != null;
|
|
42
|
+
}
|
|
43
|
+
let CustomSearchService = class CustomSearchService extends SearchService {
|
|
44
|
+
constructor(modelService, editorService, telemetryService, logService, extensionService, fileService, instantiationService, uriIdentityService, workspaceContextService, remoteAgentService, configurationService) {
|
|
45
|
+
super(modelService, editorService, telemetryService, logService, extensionService, fileService, uriIdentityService);
|
|
46
|
+
this.instantiationService = instantiationService;
|
|
47
|
+
const hasRemoteConnection = remoteAgentService.getConnection() !== null;
|
|
48
|
+
if (hasRemoteConnection) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (isHTMLFileSystemProvider(fileService.getProvider(Schemas.file))) {
|
|
52
|
+
const searchProvider = this.instantiationService.createInstance(LocalFileSearchWorkerClient);
|
|
53
|
+
this.registerSearchResultProvider(Schemas.file, SearchProviderType.file, searchProvider);
|
|
54
|
+
this.registerSearchResultProvider(Schemas.file, SearchProviderType.text, searchProvider);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
const workspaceSearchProvider = new WorkspaceSearchProvider(fileService, logService, workspaceContextService, undefined, configurationService);
|
|
58
|
+
this.registerSearchResultProvider(Schemas.file, SearchProviderType.file, workspaceSearchProvider);
|
|
59
|
+
this.registerSearchResultProvider(Schemas.file, SearchProviderType.text, workspaceSearchProvider);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
CustomSearchService = __decorate([
|
|
64
|
+
__param(0, IModelService),
|
|
65
|
+
__param(1, IEditorService),
|
|
66
|
+
__param(2, ITelemetryService),
|
|
67
|
+
__param(3, ILogService),
|
|
68
|
+
__param(4, IExtensionService),
|
|
69
|
+
__param(5, IFileService),
|
|
70
|
+
__param(6, IInstantiationService),
|
|
71
|
+
__param(7, IUriIdentityService),
|
|
72
|
+
__param(8, IWorkspaceContextService),
|
|
73
|
+
__param(9, IRemoteAgentService),
|
|
74
|
+
__param(10, IConfigurationService)
|
|
75
|
+
], CustomSearchService);
|
|
76
|
+
function getServiceOverride() {
|
|
77
|
+
return {
|
|
78
|
+
[ISearchService.toString()]: new SyncDescriptor(CustomSearchService, [], true),
|
|
79
|
+
[ISearchHistoryService.toString()]: new SyncDescriptor(SearchHistoryService, [], true),
|
|
80
|
+
[IReplaceService.toString()]: new SyncDescriptor(ReplaceService, [], true)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { getServiceOverride as default };
|
package/index.js
CHANGED
|
@@ -1,87 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
2
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
4
|
-
import { ISearchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/search/common/search.service';
|
|
5
|
-
import { SearchService } from './vscode/src/vs/workbench/services/search/common/searchService.js';
|
|
6
3
|
import { SearchViewModelWorkbenchService } from './vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchModel.js';
|
|
7
4
|
import { ISearchViewModelWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/browser/searchTreeModel/searchViewModelWorkbenchService.service';
|
|
8
|
-
import
|
|
9
|
-
import { ISearchHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/common/searchHistoryService.service';
|
|
10
|
-
import { IReplaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/browser/replace.service';
|
|
11
|
-
import { ReplaceService } from './vscode/src/vs/workbench/contrib/search/browser/replaceService.js';
|
|
12
|
-
import { LocalFileSearchWorkerClient } from './vscode/src/vs/workbench/services/search/browser/searchService.js';
|
|
5
|
+
import getServiceOverride$1 from './common.js';
|
|
13
6
|
import './vscode/src/vs/workbench/contrib/search/browser/search.contribution.js';
|
|
14
|
-
import './vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js';
|
|
15
|
-
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
16
|
-
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
17
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
18
|
-
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
19
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
20
|
-
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
21
|
-
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
22
|
-
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
23
|
-
import { SearchProviderType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/search/common/search';
|
|
24
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
25
|
-
import '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
26
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/charCode';
|
|
27
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
28
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
29
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
30
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
31
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
32
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
33
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
34
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
35
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
36
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/files/browser/webFileSystemAccess';
|
|
37
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log';
|
|
38
|
-
import { WorkspaceSearchProvider } from './service-override/tools/search-providers/workspace-search-provider.js';
|
|
39
|
-
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
40
|
-
import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
41
|
-
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
42
7
|
|
|
43
|
-
function isHTMLFileSystemProvider(provider) {
|
|
44
|
-
return provider.directories != null;
|
|
45
|
-
}
|
|
46
|
-
let CustomSearchService = class CustomSearchService extends SearchService {
|
|
47
|
-
constructor(modelService, editorService, telemetryService, logService, extensionService, fileService, instantiationService, uriIdentityService, workspaceContextService, remoteAgentService, configurationService) {
|
|
48
|
-
super(modelService, editorService, telemetryService, logService, extensionService, fileService, uriIdentityService);
|
|
49
|
-
this.instantiationService = instantiationService;
|
|
50
|
-
const hasRemoteConnection = remoteAgentService.getConnection() !== null;
|
|
51
|
-
if (hasRemoteConnection) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
if (isHTMLFileSystemProvider(fileService.getProvider(Schemas.file))) {
|
|
55
|
-
const searchProvider = this.instantiationService.createInstance(LocalFileSearchWorkerClient);
|
|
56
|
-
this.registerSearchResultProvider(Schemas.file, SearchProviderType.file, searchProvider);
|
|
57
|
-
this.registerSearchResultProvider(Schemas.file, SearchProviderType.text, searchProvider);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
const workspaceSearchProvider = new WorkspaceSearchProvider(fileService, logService, workspaceContextService, undefined, configurationService);
|
|
61
|
-
this.registerSearchResultProvider(Schemas.file, SearchProviderType.file, workspaceSearchProvider);
|
|
62
|
-
this.registerSearchResultProvider(Schemas.file, SearchProviderType.text, workspaceSearchProvider);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
CustomSearchService = __decorate([
|
|
67
|
-
__param(0, IModelService),
|
|
68
|
-
__param(1, IEditorService),
|
|
69
|
-
__param(2, ITelemetryService),
|
|
70
|
-
__param(3, ILogService),
|
|
71
|
-
__param(4, IExtensionService),
|
|
72
|
-
__param(5, IFileService),
|
|
73
|
-
__param(6, IInstantiationService),
|
|
74
|
-
__param(7, IUriIdentityService),
|
|
75
|
-
__param(8, IWorkspaceContextService),
|
|
76
|
-
__param(9, IRemoteAgentService),
|
|
77
|
-
__param(10, IConfigurationService)
|
|
78
|
-
], CustomSearchService);
|
|
79
8
|
function getServiceOverride() {
|
|
80
9
|
return {
|
|
81
|
-
|
|
82
|
-
[ISearchViewModelWorkbenchService.toString()]: new SyncDescriptor(SearchViewModelWorkbenchService, [], true)
|
|
83
|
-
[ISearchHistoryService.toString()]: new SyncDescriptor(SearchHistoryService, [], true),
|
|
84
|
-
[IReplaceService.toString()]: new SyncDescriptor(ReplaceService, [], true)
|
|
10
|
+
...getServiceOverride$1(),
|
|
11
|
+
[ISearchViewModelWorkbenchService.toString()]: new SyncDescriptor(SearchViewModelWorkbenchService, [], true)
|
|
85
12
|
};
|
|
86
13
|
}
|
|
87
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-search-service-override",
|
|
3
|
-
"version": "37.
|
|
3
|
+
"version": "37.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - search service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "37.
|
|
18
|
+
"@codingame/monaco-vscode-api": "37.3.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -34,6 +34,14 @@
|
|
|
34
34
|
"./worker": {
|
|
35
35
|
"default": "./worker.js"
|
|
36
36
|
},
|
|
37
|
+
"./session": {
|
|
38
|
+
"types": "./session.d.ts",
|
|
39
|
+
"default": "./session.js"
|
|
40
|
+
},
|
|
41
|
+
"./common": {
|
|
42
|
+
"types": "./common.d.ts",
|
|
43
|
+
"default": "./common.js"
|
|
44
|
+
},
|
|
37
45
|
"./*": {
|
|
38
46
|
"types": "./*.d.ts",
|
|
39
47
|
"default": "./*.js"
|
package/session.d.ts
ADDED
package/session.js
ADDED
package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js
CHANGED
|
@@ -96,7 +96,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
96
96
|
picker.buttons = [{
|
|
97
97
|
location: QuickInputButtonLocation.Inline,
|
|
98
98
|
iconClass: ThemeIcon.asClassName(Codicon.goToSearch),
|
|
99
|
-
tooltip: ( localize(
|
|
99
|
+
tooltip: ( localize(18019, "Open in Search View"))
|
|
100
100
|
}];
|
|
101
101
|
this.editorViewState.reset();
|
|
102
102
|
disposables.add(picker.onDidTriggerButton(async () => {
|
|
@@ -173,12 +173,16 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
173
173
|
};
|
|
174
174
|
this.searchModel.searchResult.toggleHighlights(false);
|
|
175
175
|
const charsPerLine = content.isRegExp ? 10000 : 1000;
|
|
176
|
-
const query = this.queryBuilder.text(
|
|
176
|
+
const query = this.queryBuilder.text(
|
|
177
|
+
content,
|
|
178
|
+
folderResources.map(folder => folder.uri),
|
|
179
|
+
this._getTextQueryBuilderOptions(charsPerLine)
|
|
180
|
+
);
|
|
177
181
|
const result = this.searchModel.search(query, undefined, token);
|
|
178
182
|
const getAsyncResults = async () => {
|
|
179
183
|
this.currentAsyncSearch = result.asyncResults;
|
|
180
184
|
await result.asyncResults;
|
|
181
|
-
const syncResultURIs = ( new ResourceSet(
|
|
185
|
+
const syncResultURIs = ( new ResourceSet(result.syncResults.map(e => e.resource)));
|
|
182
186
|
return this.searchModel.searchResult.matches(false).filter(e => !( syncResultURIs.has(e.resource)));
|
|
183
187
|
};
|
|
184
188
|
return {
|
|
@@ -220,7 +224,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
220
224
|
type: "separator"
|
|
221
225
|
});
|
|
222
226
|
picks.push({
|
|
223
|
-
label: ( localize(
|
|
227
|
+
label: ( localize(18020, "See More Files")),
|
|
224
228
|
iconClass: ThemeIcon.asClassName(searchDetailsIcon),
|
|
225
229
|
accept: async () => {
|
|
226
230
|
await this.moveToSearchViewlet(matches[limit]);
|
|
@@ -239,7 +243,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
239
243
|
description,
|
|
240
244
|
buttons: [{
|
|
241
245
|
iconClass: ThemeIcon.asClassName(searchOpenInFileIcon),
|
|
242
|
-
tooltip: ( localize(
|
|
246
|
+
tooltip: ( localize(18021, "Open File"))
|
|
243
247
|
}],
|
|
244
248
|
trigger: async () => {
|
|
245
249
|
await this.handleAccept(iFileInstanceMatch, {});
|
|
@@ -251,7 +255,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
251
255
|
const element = results[matchIndex];
|
|
252
256
|
if (matchIndex === MAX_RESULTS_PER_FILE) {
|
|
253
257
|
picks.push({
|
|
254
|
-
label: ( localize(
|
|
258
|
+
label: ( localize(18022, "More")),
|
|
255
259
|
iconClass: ThemeIcon.asClassName(searchDetailsIcon),
|
|
256
260
|
accept: async () => {
|
|
257
261
|
await this.moveToSearchViewlet(element);
|
|
@@ -272,7 +276,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
272
276
|
},
|
|
273
277
|
buttons: [{
|
|
274
278
|
iconClass: ThemeIcon.asClassName(searchActivityBarIcon),
|
|
275
|
-
tooltip: ( localize(
|
|
279
|
+
tooltip: ( localize(18023, "Open in Search View"))
|
|
276
280
|
}],
|
|
277
281
|
ariaLabel: `Match at location ${element.range().startLineNumber}:${element.range().startColumn} - ${previewText}`,
|
|
278
282
|
accept: async (keyMods, event) => {
|
|
@@ -310,7 +314,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
310
314
|
if (contentPattern === "") {
|
|
311
315
|
this.searchModel.searchResult.clear();
|
|
312
316
|
return [{
|
|
313
|
-
label: ( localize(
|
|
317
|
+
label: ( localize(18024, "Enter a term to search for across your files."))
|
|
314
318
|
}];
|
|
315
319
|
}
|
|
316
320
|
const conditionalTokenCts = disposables.add(( new CancellationTokenSource()));
|
|
@@ -334,7 +338,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
334
338
|
return {
|
|
335
339
|
picks: syncResult,
|
|
336
340
|
additionalPicks: allMatches.asyncResults.then(asyncResults => (asyncResults.length + syncResult.length === 0) ? [{
|
|
337
|
-
label: ( localize(
|
|
341
|
+
label: ( localize(18025, "No matching results"))
|
|
338
342
|
}] : this._getPicksFromMatches(asyncResults, MAX_FILES_SHOWN - matches.length)).then(picks => {
|
|
339
343
|
if (picks.length > 0) {
|
|
340
344
|
this.searchModel.searchResult.toggleHighlights(true);
|
|
@@ -27,8 +27,8 @@ import './searchActionsNav.js';
|
|
|
27
27
|
import './searchActionsRemoveReplace.js';
|
|
28
28
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/browser/searchActionsTopBar';
|
|
29
29
|
import './searchActionsTextQuickAccess.js';
|
|
30
|
-
import '
|
|
31
|
-
import '
|
|
30
|
+
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/browser/searchQuickAccess.contribution';
|
|
31
|
+
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/browser/search.common.contribution';
|
|
32
32
|
import { TEXT_SEARCH_QUICK_ACCESS_PREFIX, TextSearchQuickAccess } from './quickTextSearch/textSearchQuickAccess.js';
|
|
33
33
|
import { Extensions as Extensions$3 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/configuration';
|
|
34
34
|
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
@@ -45,7 +45,7 @@ AccessibleViewRegistry.register(( new SearchAccessibilityHelp()));
|
|
|
45
45
|
const SEARCH_MODE_CONFIG = "search.mode";
|
|
46
46
|
const viewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
47
47
|
id: VIEWLET_ID,
|
|
48
|
-
title: ( localize2(
|
|
48
|
+
title: ( localize2(18047, "Search")),
|
|
49
49
|
ctorDescriptor: ( new SyncDescriptor(ViewPaneContainer, [VIEWLET_ID, {
|
|
50
50
|
mergeViewWithContainerWhenSingleView: true
|
|
51
51
|
}])),
|
|
@@ -58,13 +58,13 @@ const viewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).register
|
|
|
58
58
|
const viewDescriptor = {
|
|
59
59
|
id: VIEW_ID,
|
|
60
60
|
containerIcon: searchViewIcon,
|
|
61
|
-
name: ( localize2(
|
|
61
|
+
name: ( localize2(18047, "Search")),
|
|
62
62
|
ctorDescriptor: ( new SyncDescriptor(SearchView)),
|
|
63
63
|
canToggleVisibility: false,
|
|
64
64
|
canMoveView: true,
|
|
65
65
|
openCommandActionDescriptor: {
|
|
66
66
|
id: viewContainer.id,
|
|
67
|
-
mnemonicTitle: ( localize(
|
|
67
|
+
mnemonicTitle: ( localize(18048, "&&Search")),
|
|
68
68
|
keybindings: {
|
|
69
69
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyF,
|
|
70
70
|
when: ( ContextKeyExpr.regex("neverMatch", /doesNotMatch/))
|
|
@@ -78,9 +78,9 @@ quickAccessRegistry.registerQuickAccessProvider({
|
|
|
78
78
|
ctor: TextSearchQuickAccess,
|
|
79
79
|
prefix: TEXT_SEARCH_QUICK_ACCESS_PREFIX,
|
|
80
80
|
contextKey: "inTextSearchPicker",
|
|
81
|
-
placeholder: ( localize(
|
|
81
|
+
placeholder: ( localize(18049, "Search for text in your workspace files.")),
|
|
82
82
|
helpEntries: [{
|
|
83
|
-
description: ( localize(
|
|
83
|
+
description: ( localize(18050, "Search for Text")),
|
|
84
84
|
commandId: SearchCommandIds.QuickTextSearchActionId,
|
|
85
85
|
commandCenterOrder: 25
|
|
86
86
|
}]
|
|
@@ -94,18 +94,18 @@ configurationRegistry.registerConfiguration({
|
|
|
94
94
|
enum: ["view", "reuseEditor", "newEditor"],
|
|
95
95
|
default: "view",
|
|
96
96
|
markdownDescription: ( localize(
|
|
97
|
-
|
|
97
|
+
18051,
|
|
98
98
|
"Controls where new `Search: Find in Files` and `Find in Folder` operations occur: either in the Search view, or in a search editor."
|
|
99
99
|
)),
|
|
100
|
-
enumDescriptions: [( localize(
|
|
101
|
-
|
|
100
|
+
enumDescriptions: [( localize(18052, "Search in the Search view, either in the panel or side bars.")), ( localize(
|
|
101
|
+
18053,
|
|
102
102
|
"Search in an existing search editor if present, otherwise in a new search editor."
|
|
103
|
-
)), ( localize(
|
|
103
|
+
)), ( localize(18054, "Search in a new search editor."))]
|
|
104
104
|
},
|
|
105
105
|
"search.quickOpen.includeSymbols": {
|
|
106
106
|
type: "boolean",
|
|
107
107
|
description: ( localize(
|
|
108
|
-
|
|
108
|
+
18055,
|
|
109
109
|
"Whether to include results from a global symbol search in the file results for Quick Open."
|
|
110
110
|
)),
|
|
111
111
|
default: false
|
|
@@ -113,7 +113,7 @@ configurationRegistry.registerConfiguration({
|
|
|
113
113
|
"search.quickOpen.includeHistory": {
|
|
114
114
|
type: "boolean",
|
|
115
115
|
description: ( localize(
|
|
116
|
-
|
|
116
|
+
18056,
|
|
117
117
|
"Whether to include results from recently opened files in the file results for Quick Open."
|
|
118
118
|
)),
|
|
119
119
|
default: true,
|
|
@@ -126,14 +126,14 @@ configurationRegistry.registerConfiguration({
|
|
|
126
126
|
enum: ["default", "recency"],
|
|
127
127
|
default: "default",
|
|
128
128
|
enumDescriptions: [( localize(
|
|
129
|
-
|
|
129
|
+
18057,
|
|
130
130
|
"History entries are sorted by relevance based on the filter value used. More relevant entries appear first."
|
|
131
131
|
)), ( localize(
|
|
132
|
-
|
|
132
|
+
18058,
|
|
133
133
|
"History entries are sorted by recency. More recently opened entries appear first."
|
|
134
134
|
))],
|
|
135
135
|
description: ( localize(
|
|
136
|
-
|
|
136
|
+
18059,
|
|
137
137
|
"Controls sorting order of editor history in quick open when filtering."
|
|
138
138
|
))
|
|
139
139
|
},
|
|
@@ -141,7 +141,7 @@ configurationRegistry.registerConfiguration({
|
|
|
141
141
|
type: "boolean",
|
|
142
142
|
default: false,
|
|
143
143
|
description: ( localize(
|
|
144
|
-
|
|
144
|
+
18060,
|
|
145
145
|
"Controls whether the Search view should read or modify the shared find clipboard on macOS."
|
|
146
146
|
)),
|
|
147
147
|
included: isMacintosh
|
|
@@ -150,12 +150,12 @@ configurationRegistry.registerConfiguration({
|
|
|
150
150
|
type: "string",
|
|
151
151
|
enum: ["auto", "alwaysCollapse", "alwaysExpand"],
|
|
152
152
|
enumDescriptions: [( localize(
|
|
153
|
-
|
|
153
|
+
18061,
|
|
154
154
|
"Files with less than 10 results are expanded. Others are collapsed."
|
|
155
155
|
)), "", ""],
|
|
156
156
|
default: "alwaysExpand",
|
|
157
157
|
description: ( localize(
|
|
158
|
-
|
|
158
|
+
18062,
|
|
159
159
|
"Controls whether the search results will be collapsed or expanded."
|
|
160
160
|
))
|
|
161
161
|
},
|
|
@@ -163,25 +163,25 @@ configurationRegistry.registerConfiguration({
|
|
|
163
163
|
type: "boolean",
|
|
164
164
|
default: true,
|
|
165
165
|
description: ( localize(
|
|
166
|
-
|
|
166
|
+
18063,
|
|
167
167
|
"Controls whether to open Replace Preview when selecting or replacing a match."
|
|
168
168
|
))
|
|
169
169
|
},
|
|
170
170
|
"search.showLineNumbers": {
|
|
171
171
|
type: "boolean",
|
|
172
172
|
default: false,
|
|
173
|
-
description: ( localize(
|
|
173
|
+
description: ( localize(18064, "Controls whether to show line numbers for search results."))
|
|
174
174
|
},
|
|
175
175
|
"search.actionsPosition": {
|
|
176
176
|
type: "string",
|
|
177
177
|
enum: ["auto", "right"],
|
|
178
178
|
enumDescriptions: [( localize(
|
|
179
|
-
|
|
179
|
+
18065,
|
|
180
180
|
"Position the actionbar to the right when the Search view is narrow, and immediately after the content when the Search view is wide."
|
|
181
|
-
)), ( localize(
|
|
181
|
+
)), ( localize(18066, "Always position the actionbar to the right."))],
|
|
182
182
|
default: "right",
|
|
183
183
|
description: ( localize(
|
|
184
|
-
|
|
184
|
+
18067,
|
|
185
185
|
"Controls the positioning of the actionbar on rows in the Search view."
|
|
186
186
|
))
|
|
187
187
|
},
|
|
@@ -189,7 +189,7 @@ configurationRegistry.registerConfiguration({
|
|
|
189
189
|
type: "boolean",
|
|
190
190
|
default: false,
|
|
191
191
|
description: ( localize(
|
|
192
|
-
|
|
192
|
+
18068,
|
|
193
193
|
"Enable seeding search from the word nearest the cursor when the active editor has no selection."
|
|
194
194
|
))
|
|
195
195
|
},
|
|
@@ -197,31 +197,31 @@ configurationRegistry.registerConfiguration({
|
|
|
197
197
|
type: "boolean",
|
|
198
198
|
default: false,
|
|
199
199
|
markdownDescription: ( localize(
|
|
200
|
-
|
|
200
|
+
18069,
|
|
201
201
|
"Update the search query to the editor's selected text when focusing the Search view. This happens either on click or when triggering the `workbench.views.search.focus` command."
|
|
202
202
|
))
|
|
203
203
|
},
|
|
204
204
|
"search.decorations.colors": {
|
|
205
205
|
type: "boolean",
|
|
206
|
-
description: ( localize(
|
|
206
|
+
description: ( localize(18070, "Controls whether search file decorations should use colors.")),
|
|
207
207
|
default: true
|
|
208
208
|
},
|
|
209
209
|
"search.decorations.badges": {
|
|
210
210
|
type: "boolean",
|
|
211
|
-
description: ( localize(
|
|
211
|
+
description: ( localize(18071, "Controls whether search file decorations should use badges.")),
|
|
212
212
|
default: true
|
|
213
213
|
},
|
|
214
214
|
"search.defaultViewMode": {
|
|
215
215
|
type: "string",
|
|
216
216
|
enum: [ViewMode.Tree, ViewMode.List],
|
|
217
217
|
default: ViewMode.List,
|
|
218
|
-
enumDescriptions: [( localize(
|
|
219
|
-
description: ( localize(
|
|
218
|
+
enumDescriptions: [( localize(18072, "Shows search results as a tree.")), ( localize(18073, "Shows search results as a list."))],
|
|
219
|
+
description: ( localize(18074, "Controls the default search result view mode."))
|
|
220
220
|
},
|
|
221
221
|
"search.quickAccess.preserveInput": {
|
|
222
222
|
type: "boolean",
|
|
223
223
|
description: ( localize(
|
|
224
|
-
|
|
224
|
+
18075,
|
|
225
225
|
"Controls whether the last typed input to Quick Search should be restored when opening it the next time."
|
|
226
226
|
)),
|
|
227
227
|
default: false
|
|
@@ -229,7 +229,7 @@ configurationRegistry.registerConfiguration({
|
|
|
229
229
|
"search.experimental.closedNotebookRichContentResults": {
|
|
230
230
|
type: "boolean",
|
|
231
231
|
description: ( localize(
|
|
232
|
-
|
|
232
|
+
18076,
|
|
233
233
|
"Show notebook editor rich content results for closed notebooks. Please refresh your search results after changing this setting."
|
|
234
234
|
)),
|
|
235
235
|
default: false
|
|
@@ -238,7 +238,7 @@ configurationRegistry.registerConfiguration({
|
|
|
238
238
|
type: "boolean",
|
|
239
239
|
default: false,
|
|
240
240
|
markdownDescription: ( localize(
|
|
241
|
-
|
|
241
|
+
18077,
|
|
242
242
|
"When enabled, the legacy `findFiles` extension API honors the user's `#search.useIgnoreFiles#` setting instead of always ignoring `.gitignore`. Extensions that explicitly pass `null` as the `exclude` argument still get unfiltered results. Telemetry is emitted regardless of this setting to help decide future defaults."
|
|
243
243
|
)),
|
|
244
244
|
tags: ["experimental"]
|
|
@@ -246,7 +246,7 @@ configurationRegistry.registerConfiguration({
|
|
|
246
246
|
"search.searchView.semanticSearchBehavior": {
|
|
247
247
|
type: "string",
|
|
248
248
|
description: ( localize(
|
|
249
|
-
|
|
249
|
+
18078,
|
|
250
250
|
"Controls the behavior of the semantic search results displayed in the Search view."
|
|
251
251
|
)),
|
|
252
252
|
enum: [
|
|
@@ -255,15 +255,15 @@ configurationRegistry.registerConfiguration({
|
|
|
255
255
|
SemanticSearchBehavior.Auto
|
|
256
256
|
],
|
|
257
257
|
default: SemanticSearchBehavior.Manual,
|
|
258
|
-
enumDescriptions: [( localize(
|
|
259
|
-
|
|
258
|
+
enumDescriptions: [( localize(18079, "Only request semantic search results manually.")), ( localize(
|
|
259
|
+
18080,
|
|
260
260
|
"Request semantic results automatically only when text search results are empty."
|
|
261
|
-
)), ( localize(
|
|
261
|
+
)), ( localize(18081, "Request semantic results automatically with every search."))],
|
|
262
262
|
tags: ["preview"]
|
|
263
263
|
},
|
|
264
264
|
"search.searchView.keywordSuggestions": {
|
|
265
265
|
type: "boolean",
|
|
266
|
-
description: ( localize(
|
|
266
|
+
description: ( localize(18082, "Enable keyword suggestions in the Search view.")),
|
|
267
267
|
default: false,
|
|
268
268
|
tags: ["preview"]
|
|
269
269
|
}
|
|
@@ -273,7 +273,7 @@ CommandsRegistry.registerCommand("_executeWorkspaceSymbolProvider", async functi
|
|
|
273
273
|
const [query] = args;
|
|
274
274
|
assertType(typeof query === "string");
|
|
275
275
|
const result = await getWorkspaceSymbols(query);
|
|
276
|
-
return
|
|
276
|
+
return result.map(item => item.symbol);
|
|
277
277
|
});
|
|
278
278
|
( Registry.as(Extensions$3.ConfigurationMigration)).registerConfigurationMigrations([{
|
|
279
279
|
key: "search.experimental.quickAccess.preserveInput",
|