@codingame/monaco-vscode-search-service-override 4.1.0 → 4.1.2

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.
Files changed (35) hide show
  1. package/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
  2. package/external/tslib/tslib.es6.js +11 -0
  3. package/override/vs/platform/dialogs/common/dialogs.js +10 -0
  4. package/package.json +2 -2
  5. package/search.js +4 -4
  6. package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +796 -0
  7. package/vscode/src/vs/workbench/contrib/search/browser/media/anythingQuickAccess.css.js +6 -0
  8. package/vscode/src/vs/workbench/contrib/search/browser/media/searchview.css.js +6 -0
  9. package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +234 -0
  10. package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js +341 -0
  11. package/vscode/src/vs/workbench/contrib/search/browser/replaceContributions.js +9 -0
  12. package/vscode/src/vs/workbench/contrib/search/browser/replaceService.js +232 -0
  13. package/vscode/src/vs/workbench/contrib/search/browser/search.contribution.js +647 -0
  14. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsCopy.js +209 -0
  15. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsNav.js +511 -0
  16. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsRemoveReplace.js +374 -0
  17. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsSymbol.js +43 -0
  18. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTextQuickAccess.js +44 -0
  19. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +323 -0
  20. package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +103 -0
  21. package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +106 -0
  22. package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +66 -0
  23. package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +437 -0
  24. package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +2177 -0
  25. package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +674 -0
  26. package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +234 -0
  27. package/vscode/src/vs/workbench/contrib/search/common/cacheState.js +87 -0
  28. package/vscode/src/vs/workbench/contrib/searchEditor/browser/media/searchEditor.css.js +6 -0
  29. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +586 -0
  30. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.js +760 -0
  31. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +189 -0
  32. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +320 -0
  33. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.js +138 -0
  34. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +293 -0
  35. package/vscode/src/vs/workbench/services/search/common/searchService.js +416 -0
@@ -0,0 +1,437 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { append, $ } from 'vscode/vscode/vs/base/browser/dom';
3
+ import { CountBadge } from 'vscode/vscode/vs/base/browser/ui/countBadge/countBadge';
4
+ import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
5
+ import { dirname } from 'vscode/vscode/vs/base/common/path';
6
+ import { localizeWithPath } from 'vscode/vscode/vs/nls';
7
+ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
8
+ import { FileKind } from 'vscode/vscode/vs/platform/files/common/files';
9
+ import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label';
10
+ import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
11
+ import { FolderMatchWorkspaceRoot, FolderMatchNoRoot, MatchInNotebook, FolderMatch, FileMatch, Match } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchModel';
12
+ import { isEqual } from 'vscode/vscode/vs/base/common/resources';
13
+ import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
14
+ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
15
+ import { MenuWorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
16
+ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
17
+ import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
18
+ import { defaultCountBadgeStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
19
+ import { SearchContext } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
20
+ import { setupCustomHover } from 'vscode/vscode/vs/base/browser/ui/hover/updatableHoverWidget';
21
+ import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
22
+
23
+ var FolderMatchRenderer_1, FileMatchRenderer_1, MatchRenderer_1;
24
+ class SearchDelegate {
25
+ static { this.ITEM_HEIGHT = 22; }
26
+ getHeight(element) {
27
+ return SearchDelegate.ITEM_HEIGHT;
28
+ }
29
+ getTemplateId(element) {
30
+ if (element instanceof FolderMatch) {
31
+ return FolderMatchRenderer.TEMPLATE_ID;
32
+ }
33
+ else if (element instanceof FileMatch) {
34
+ return FileMatchRenderer.TEMPLATE_ID;
35
+ }
36
+ else if (element instanceof Match) {
37
+ return MatchRenderer.TEMPLATE_ID;
38
+ }
39
+ console.error('Invalid search tree element', element);
40
+ throw new Error('Invalid search tree element');
41
+ }
42
+ }
43
+ let FolderMatchRenderer = class FolderMatchRenderer extends Disposable {
44
+ static { FolderMatchRenderer_1 = this; }
45
+ static { this.TEMPLATE_ID = 'folderMatch'; }
46
+ constructor(searchView, labels, contextService, labelService, instantiationService, contextKeyService) {
47
+ super();
48
+ this.searchView = searchView;
49
+ this.labels = labels;
50
+ this.contextService = contextService;
51
+ this.labelService = labelService;
52
+ this.instantiationService = instantiationService;
53
+ this.contextKeyService = contextKeyService;
54
+ this.templateId = FolderMatchRenderer_1.TEMPLATE_ID;
55
+ }
56
+ renderCompressedElements(node, index, templateData, height) {
57
+ const compressed = node.element;
58
+ const folder = compressed.elements[compressed.elements.length - 1];
59
+ const label = ( compressed.elements.map(e => e.name()));
60
+ if (folder.resource) {
61
+ const fileKind = (folder instanceof FolderMatchWorkspaceRoot) ? FileKind.ROOT_FOLDER : FileKind.FOLDER;
62
+ templateData.label.setResource({ resource: folder.resource, name: label }, {
63
+ fileKind,
64
+ separator: this.labelService.getSeparator(folder.resource.scheme),
65
+ });
66
+ }
67
+ else {
68
+ templateData.label.setLabel(( localizeWithPath(
69
+ 'vs/workbench/contrib/search/browser/searchResultsView',
70
+ 'searchFolderMatch.other.label',
71
+ "Other files"
72
+ )));
73
+ }
74
+ this.renderFolderDetails(folder, templateData);
75
+ }
76
+ renderTemplate(container) {
77
+ const disposables = ( new DisposableStore());
78
+ const folderMatchElement = append(container, $('.foldermatch'));
79
+ const label = this.labels.create(folderMatchElement, { supportDescriptionHighlights: true, supportHighlights: true });
80
+ disposables.add(label);
81
+ const badge = ( new CountBadge(
82
+ append(folderMatchElement, $('.badge')),
83
+ {},
84
+ defaultCountBadgeStyles
85
+ ));
86
+ const actionBarContainer = append(folderMatchElement, $('.actionBarContainer'));
87
+ const elementDisposables = ( new DisposableStore());
88
+ disposables.add(elementDisposables);
89
+ const contextKeyServiceMain = disposables.add(this.contextKeyService.createScoped(container));
90
+ SearchContext.MatchFocusKey.bindTo(contextKeyServiceMain).set(false);
91
+ SearchContext.FileFocusKey.bindTo(contextKeyServiceMain).set(false);
92
+ SearchContext.FolderFocusKey.bindTo(contextKeyServiceMain).set(true);
93
+ const instantiationService = this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyServiceMain])));
94
+ const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
95
+ menuOptions: {
96
+ shouldForwardArgs: true
97
+ },
98
+ hiddenItemStrategy: 0 ,
99
+ toolbarOptions: {
100
+ primaryGroup: (g) => /^inline/.test(g),
101
+ },
102
+ }));
103
+ return {
104
+ label,
105
+ badge,
106
+ actions,
107
+ disposables,
108
+ elementDisposables,
109
+ contextKeyService: contextKeyServiceMain
110
+ };
111
+ }
112
+ renderElement(node, index, templateData) {
113
+ const folderMatch = node.element;
114
+ if (folderMatch.resource) {
115
+ const workspaceFolder = this.contextService.getWorkspaceFolder(folderMatch.resource);
116
+ if (workspaceFolder && isEqual(workspaceFolder.uri, folderMatch.resource)) {
117
+ templateData.label.setFile(folderMatch.resource, { fileKind: FileKind.ROOT_FOLDER, hidePath: true });
118
+ }
119
+ else {
120
+ templateData.label.setFile(folderMatch.resource, { fileKind: FileKind.FOLDER, hidePath: this.searchView.isTreeLayoutViewVisible });
121
+ }
122
+ }
123
+ else {
124
+ templateData.label.setLabel(( localizeWithPath(
125
+ 'vs/workbench/contrib/search/browser/searchResultsView',
126
+ 'searchFolderMatch.other.label',
127
+ "Other files"
128
+ )));
129
+ }
130
+ SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!folderMatch.hasOnlyReadOnlyMatches());
131
+ templateData.elementDisposables.add(folderMatch.onChange(() => {
132
+ SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!folderMatch.hasOnlyReadOnlyMatches());
133
+ }));
134
+ this.renderFolderDetails(folderMatch, templateData);
135
+ }
136
+ disposeElement(element, index, templateData) {
137
+ templateData.elementDisposables.clear();
138
+ }
139
+ disposeCompressedElements(node, index, templateData, height) {
140
+ templateData.elementDisposables.clear();
141
+ }
142
+ disposeTemplate(templateData) {
143
+ templateData.disposables.dispose();
144
+ }
145
+ renderFolderDetails(folder, templateData) {
146
+ const count = folder.recursiveMatchCount();
147
+ templateData.badge.setCount(count);
148
+ templateData.badge.setTitleFormat(count > 1 ? ( localizeWithPath(
149
+ 'vs/workbench/contrib/search/browser/searchResultsView',
150
+ 'searchFileMatches',
151
+ "{0} files found",
152
+ count
153
+ )) : ( localizeWithPath(
154
+ 'vs/workbench/contrib/search/browser/searchResultsView',
155
+ 'searchFileMatch',
156
+ "{0} file found",
157
+ count
158
+ )));
159
+ templateData.actions.context = { viewer: this.searchView.getControl(), element: folder };
160
+ }
161
+ };
162
+ FolderMatchRenderer = FolderMatchRenderer_1 = ( __decorate([
163
+ ( __param(2, IWorkspaceContextService)),
164
+ ( __param(3, ILabelService)),
165
+ ( __param(4, IInstantiationService)),
166
+ ( __param(5, IContextKeyService))
167
+ ], FolderMatchRenderer));
168
+ let FileMatchRenderer = class FileMatchRenderer extends Disposable {
169
+ static { FileMatchRenderer_1 = this; }
170
+ static { this.TEMPLATE_ID = 'fileMatch'; }
171
+ constructor(searchView, labels, contextService, configurationService, instantiationService, contextKeyService) {
172
+ super();
173
+ this.searchView = searchView;
174
+ this.labels = labels;
175
+ this.contextService = contextService;
176
+ this.configurationService = configurationService;
177
+ this.instantiationService = instantiationService;
178
+ this.contextKeyService = contextKeyService;
179
+ this.templateId = FileMatchRenderer_1.TEMPLATE_ID;
180
+ }
181
+ renderCompressedElements(node, index, templateData, height) {
182
+ throw new Error('Should never happen since node is incompressible.');
183
+ }
184
+ renderTemplate(container) {
185
+ const disposables = ( new DisposableStore());
186
+ const elementDisposables = ( new DisposableStore());
187
+ disposables.add(elementDisposables);
188
+ const fileMatchElement = append(container, $('.filematch'));
189
+ const label = this.labels.create(fileMatchElement);
190
+ disposables.add(label);
191
+ const badge = ( new CountBadge(append(fileMatchElement, $('.badge')), {}, defaultCountBadgeStyles));
192
+ const actionBarContainer = append(fileMatchElement, $('.actionBarContainer'));
193
+ const contextKeyServiceMain = disposables.add(this.contextKeyService.createScoped(container));
194
+ SearchContext.MatchFocusKey.bindTo(contextKeyServiceMain).set(false);
195
+ SearchContext.FileFocusKey.bindTo(contextKeyServiceMain).set(true);
196
+ SearchContext.FolderFocusKey.bindTo(contextKeyServiceMain).set(false);
197
+ const instantiationService = this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyServiceMain])));
198
+ const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
199
+ menuOptions: {
200
+ shouldForwardArgs: true
201
+ },
202
+ hiddenItemStrategy: 0 ,
203
+ toolbarOptions: {
204
+ primaryGroup: (g) => /^inline/.test(g),
205
+ },
206
+ }));
207
+ return {
208
+ el: fileMatchElement,
209
+ label,
210
+ badge,
211
+ actions,
212
+ disposables,
213
+ elementDisposables,
214
+ contextKeyService: contextKeyServiceMain
215
+ };
216
+ }
217
+ renderElement(node, index, templateData) {
218
+ const fileMatch = node.element;
219
+ templateData.el.setAttribute('data-resource', ( fileMatch.resource.toString()));
220
+ const decorationConfig = this.configurationService.getValue('search').decorations;
221
+ templateData.label.setFile(fileMatch.resource, { hidePath: this.searchView.isTreeLayoutViewVisible && !(fileMatch.parent() instanceof FolderMatchNoRoot), hideIcon: false, fileDecorations: { colors: decorationConfig.colors, badges: decorationConfig.badges } });
222
+ const count = fileMatch.count();
223
+ templateData.badge.setCount(count);
224
+ templateData.badge.setTitleFormat(count > 1 ? ( localizeWithPath(
225
+ 'vs/workbench/contrib/search/browser/searchResultsView',
226
+ 'searchMatches',
227
+ "{0} matches found",
228
+ count
229
+ )) : ( localizeWithPath(
230
+ 'vs/workbench/contrib/search/browser/searchResultsView',
231
+ 'searchMatch',
232
+ "{0} match found",
233
+ count
234
+ )));
235
+ templateData.actions.context = { viewer: this.searchView.getControl(), element: fileMatch };
236
+ SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!fileMatch.hasOnlyReadOnlyMatches());
237
+ templateData.elementDisposables.add(fileMatch.onChange(() => {
238
+ SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!fileMatch.hasOnlyReadOnlyMatches());
239
+ }));
240
+ const twistieContainer = templateData.el.parentElement?.parentElement?.querySelector('.monaco-tl-twistie');
241
+ twistieContainer?.classList.add('force-twistie');
242
+ }
243
+ disposeElement(element, index, templateData) {
244
+ templateData.elementDisposables.clear();
245
+ }
246
+ disposeTemplate(templateData) {
247
+ templateData.disposables.dispose();
248
+ }
249
+ };
250
+ FileMatchRenderer = FileMatchRenderer_1 = ( __decorate([
251
+ ( __param(2, IWorkspaceContextService)),
252
+ ( __param(3, IConfigurationService)),
253
+ ( __param(4, IInstantiationService)),
254
+ ( __param(5, IContextKeyService))
255
+ ], FileMatchRenderer));
256
+ let MatchRenderer = class MatchRenderer extends Disposable {
257
+ static { MatchRenderer_1 = this; }
258
+ static { this.TEMPLATE_ID = 'match'; }
259
+ constructor(searchView, contextService, configurationService, instantiationService, contextKeyService) {
260
+ super();
261
+ this.searchView = searchView;
262
+ this.contextService = contextService;
263
+ this.configurationService = configurationService;
264
+ this.instantiationService = instantiationService;
265
+ this.contextKeyService = contextKeyService;
266
+ this.templateId = MatchRenderer_1.TEMPLATE_ID;
267
+ }
268
+ renderCompressedElements(node, index, templateData, height) {
269
+ throw new Error('Should never happen since node is incompressible.');
270
+ }
271
+ renderTemplate(container) {
272
+ container.classList.add('linematch');
273
+ const lineNumber = append(container, $('span.matchLineNum'));
274
+ const parent = append(container, $('a.plain.match'));
275
+ const before = append(parent, $('span'));
276
+ const match = append(parent, $('span.findInFileMatch'));
277
+ const replace = append(parent, $('span.replaceMatch'));
278
+ const after = append(parent, $('span'));
279
+ const actionBarContainer = append(container, $('span.actionBarContainer'));
280
+ const disposables = ( new DisposableStore());
281
+ const contextKeyServiceMain = disposables.add(this.contextKeyService.createScoped(container));
282
+ SearchContext.MatchFocusKey.bindTo(contextKeyServiceMain).set(true);
283
+ SearchContext.FileFocusKey.bindTo(contextKeyServiceMain).set(false);
284
+ SearchContext.FolderFocusKey.bindTo(contextKeyServiceMain).set(false);
285
+ const instantiationService = this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyServiceMain])));
286
+ const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
287
+ menuOptions: {
288
+ shouldForwardArgs: true
289
+ },
290
+ hiddenItemStrategy: 0 ,
291
+ toolbarOptions: {
292
+ primaryGroup: (g) => /^inline/.test(g),
293
+ },
294
+ }));
295
+ return {
296
+ parent,
297
+ before,
298
+ match,
299
+ replace,
300
+ after,
301
+ lineNumber,
302
+ actions,
303
+ disposables,
304
+ contextKeyService: contextKeyServiceMain
305
+ };
306
+ }
307
+ renderElement(node, index, templateData) {
308
+ const match = node.element;
309
+ const preview = match.preview();
310
+ const replace = this.searchView.model.isReplaceActive() &&
311
+ !!this.searchView.model.replaceString &&
312
+ !(match instanceof MatchInNotebook && match.isReadonly());
313
+ templateData.before.textContent = preview.before;
314
+ templateData.match.textContent = preview.inside;
315
+ templateData.match.classList.toggle('replace', replace);
316
+ templateData.replace.textContent = replace ? match.replaceString : '';
317
+ templateData.after.textContent = preview.after;
318
+ const title = (preview.fullBefore + (replace ? match.replaceString : preview.inside) + preview.after).trim().substr(0, 999);
319
+ templateData.disposables.add(setupCustomHover(getDefaultHoverDelegate('mouse'), templateData.parent, title));
320
+ SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!(match instanceof MatchInNotebook && match.isReadonly()));
321
+ const numLines = match.range().endLineNumber - match.range().startLineNumber;
322
+ const extraLinesStr = numLines > 0 ? `+${numLines}` : '';
323
+ const showLineNumbers = this.configurationService.getValue('search').showLineNumbers;
324
+ const lineNumberStr = showLineNumbers ? `${match.range().startLineNumber}:` : '';
325
+ templateData.lineNumber.classList.toggle('show', (numLines > 0) || showLineNumbers);
326
+ templateData.lineNumber.textContent = lineNumberStr + extraLinesStr;
327
+ templateData.disposables.add(setupCustomHover(getDefaultHoverDelegate('mouse'), templateData.lineNumber, this.getMatchTitle(match, showLineNumbers)));
328
+ templateData.actions.context = { viewer: this.searchView.getControl(), element: match };
329
+ }
330
+ disposeTemplate(templateData) {
331
+ templateData.disposables.dispose();
332
+ }
333
+ getMatchTitle(match, showLineNumbers) {
334
+ const startLine = match.range().startLineNumber;
335
+ const numLines = match.range().endLineNumber - match.range().startLineNumber;
336
+ const lineNumStr = showLineNumbers ?
337
+ ( localizeWithPath(
338
+ 'vs/workbench/contrib/search/browser/searchResultsView',
339
+ 'lineNumStr',
340
+ "From line {0}",
341
+ startLine,
342
+ numLines
343
+ )) + ' ' :
344
+ '';
345
+ const numLinesStr = numLines > 0 ?
346
+ '+ ' + ( localizeWithPath(
347
+ 'vs/workbench/contrib/search/browser/searchResultsView',
348
+ 'numLinesStr',
349
+ "{0} more lines",
350
+ numLines
351
+ )) :
352
+ '';
353
+ return lineNumStr + numLinesStr;
354
+ }
355
+ };
356
+ MatchRenderer = MatchRenderer_1 = ( __decorate([
357
+ ( __param(1, IWorkspaceContextService)),
358
+ ( __param(2, IConfigurationService)),
359
+ ( __param(3, IInstantiationService)),
360
+ ( __param(4, IContextKeyService))
361
+ ], MatchRenderer));
362
+ let SearchAccessibilityProvider = class SearchAccessibilityProvider {
363
+ constructor(searchView, labelService) {
364
+ this.searchView = searchView;
365
+ this.labelService = labelService;
366
+ }
367
+ getWidgetAriaLabel() {
368
+ return ( localizeWithPath(
369
+ 'vs/workbench/contrib/search/browser/searchResultsView',
370
+ 'search',
371
+ "Search"
372
+ ));
373
+ }
374
+ getAriaLabel(element) {
375
+ if (element instanceof FolderMatch) {
376
+ const count = element.allDownstreamFileMatches().reduce((total, current) => total + current.count(), 0);
377
+ return element.resource ?
378
+ ( localizeWithPath(
379
+ 'vs/workbench/contrib/search/browser/searchResultsView',
380
+ 'folderMatchAriaLabel',
381
+ "{0} matches in folder root {1}, Search result",
382
+ count,
383
+ element.name()
384
+ )) :
385
+ ( localizeWithPath(
386
+ 'vs/workbench/contrib/search/browser/searchResultsView',
387
+ 'otherFilesAriaLabel',
388
+ "{0} matches outside of the workspace, Search result",
389
+ count
390
+ ));
391
+ }
392
+ if (element instanceof FileMatch) {
393
+ const path = this.labelService.getUriLabel(element.resource, { relative: true }) || element.resource.fsPath;
394
+ return ( localizeWithPath(
395
+ 'vs/workbench/contrib/search/browser/searchResultsView',
396
+ 'fileMatchAriaLabel',
397
+ "{0} matches in file {1} of folder {2}, Search result",
398
+ element.count(),
399
+ element.name(),
400
+ dirname(path)
401
+ ));
402
+ }
403
+ if (element instanceof Match) {
404
+ const match = element;
405
+ const searchModel = this.searchView.model;
406
+ const replace = searchModel.isReplaceActive() && !!searchModel.replaceString;
407
+ const matchString = match.getMatchString();
408
+ const range = match.range();
409
+ const matchText = match.text().substr(0, range.endColumn + 150);
410
+ if (replace) {
411
+ return ( localizeWithPath(
412
+ 'vs/workbench/contrib/search/browser/searchResultsView',
413
+ 'replacePreviewResultAria',
414
+ "'{0}' at column {1} replace {2} with {3}",
415
+ matchText,
416
+ range.startColumn,
417
+ matchString,
418
+ match.replaceString
419
+ ));
420
+ }
421
+ return ( localizeWithPath(
422
+ 'vs/workbench/contrib/search/browser/searchResultsView',
423
+ 'searchResultAria',
424
+ "'{0}' at column {1} found {2}",
425
+ matchText,
426
+ range.startColumn,
427
+ matchString
428
+ ));
429
+ }
430
+ return null;
431
+ }
432
+ };
433
+ SearchAccessibilityProvider = ( __decorate([
434
+ ( __param(1, ILabelService))
435
+ ], SearchAccessibilityProvider));
436
+
437
+ export { FileMatchRenderer, FolderMatchRenderer, MatchRenderer, SearchAccessibilityProvider, SearchDelegate };