@codingame/monaco-vscode-search-service-override 4.5.1 → 4.5.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.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +82 -120
- package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +29 -40
- package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js +21 -44
- package/vscode/src/vs/workbench/contrib/search/browser/replaceService.js +34 -35
- package/vscode/src/vs/workbench/contrib/search/browser/search.contribution.js +132 -217
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsCopy.js +8 -19
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsNav.js +46 -131
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsRemoveReplace.js +24 -42
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsSymbol.js +4 -15
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTextQuickAccess.js +2 -5
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +52 -61
- package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +6 -13
- package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +22 -97
- package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +5 -9
- package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +53 -104
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +168 -282
- package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +52 -81
- package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +14 -25
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +38 -120
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.js +50 -79
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +30 -40
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +21 -42
- package/vscode/src/vs/workbench/services/search/browser/searchService.js +29 -36
- package/vscode/src/vs/workbench/services/search/common/searchService.js +3 -3
|
@@ -37,6 +37,7 @@ import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/
|
|
|
37
37
|
import { MutableDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
38
38
|
|
|
39
39
|
var SearchWidget_1;
|
|
40
|
+
const _moduleId = "vs/workbench/contrib/search/browser/searchWidget";
|
|
40
41
|
const SingleLineInputHeight = 26;
|
|
41
42
|
class ReplaceAllAction extends Action {
|
|
42
43
|
static { this.ID = 'search.action.replaceAll'; }
|
|
@@ -72,18 +73,10 @@ function stopPropagationForMultiLineDownwards(event, value, textarea) {
|
|
|
72
73
|
let SearchWidget = class SearchWidget extends Widget {
|
|
73
74
|
static { SearchWidget_1 = this; }
|
|
74
75
|
static { this.INPUT_MAX_HEIGHT = 134; }
|
|
75
|
-
static { this.REPLACE_ALL_DISABLED_LABEL = ( localizeWithPath(
|
|
76
|
-
'vs/workbench/contrib/search/browser/searchWidget',
|
|
77
|
-
'search.action.replaceAll.disabled.label',
|
|
78
|
-
"Replace All (Submit Search to Enable)"
|
|
79
|
-
)); }
|
|
76
|
+
static { this.REPLACE_ALL_DISABLED_LABEL = ( localizeWithPath(_moduleId, 0, "Replace All (Submit Search to Enable)")); }
|
|
80
77
|
static { this.REPLACE_ALL_ENABLED_LABEL = (keyBindingService2) => {
|
|
81
78
|
const kb = keyBindingService2.lookupKeybinding(ReplaceAllAction.ID);
|
|
82
|
-
return appendKeyBindingLabel(( localizeWithPath(
|
|
83
|
-
'vs/workbench/contrib/search/browser/searchWidget',
|
|
84
|
-
'search.action.replaceAll.enabled.label',
|
|
85
|
-
"Replace All"
|
|
86
|
-
)), kb);
|
|
79
|
+
return appendKeyBindingLabel(( localizeWithPath(_moduleId, 1, "Replace All")), kb);
|
|
87
80
|
}; }
|
|
88
81
|
constructor(container, options, contextViewService, contextKeyService, keybindingService, clipboardServce, configurationService, accessibilityService, contextMenuService, instantiationService, editorService) {
|
|
89
82
|
super();
|
|
@@ -98,25 +91,25 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
98
91
|
this.editorService = editorService;
|
|
99
92
|
this.ignoreGlobalFindBufferOnNextFocus = false;
|
|
100
93
|
this.previousGlobalFindBufferValue = null;
|
|
101
|
-
this._onSearchSubmit = this._register(( new Emitter()));
|
|
94
|
+
this._onSearchSubmit = this._register(( (new Emitter())));
|
|
102
95
|
this.onSearchSubmit = this._onSearchSubmit.event;
|
|
103
|
-
this._onSearchCancel = this._register(( new Emitter()));
|
|
96
|
+
this._onSearchCancel = this._register(( (new Emitter())));
|
|
104
97
|
this.onSearchCancel = this._onSearchCancel.event;
|
|
105
|
-
this._onReplaceToggled = this._register(( new Emitter()));
|
|
98
|
+
this._onReplaceToggled = this._register(( (new Emitter())));
|
|
106
99
|
this.onReplaceToggled = this._onReplaceToggled.event;
|
|
107
|
-
this._onReplaceStateChange = this._register(( new Emitter()));
|
|
100
|
+
this._onReplaceStateChange = this._register(( (new Emitter())));
|
|
108
101
|
this.onReplaceStateChange = this._onReplaceStateChange.event;
|
|
109
|
-
this._onPreserveCaseChange = this._register(( new Emitter()));
|
|
102
|
+
this._onPreserveCaseChange = this._register(( (new Emitter())));
|
|
110
103
|
this.onPreserveCaseChange = this._onPreserveCaseChange.event;
|
|
111
|
-
this._onReplaceValueChanged = this._register(( new Emitter()));
|
|
104
|
+
this._onReplaceValueChanged = this._register(( (new Emitter())));
|
|
112
105
|
this.onReplaceValueChanged = this._onReplaceValueChanged.event;
|
|
113
|
-
this._onReplaceAll = this._register(( new Emitter()));
|
|
106
|
+
this._onReplaceAll = this._register(( (new Emitter())));
|
|
114
107
|
this.onReplaceAll = this._onReplaceAll.event;
|
|
115
|
-
this._onBlur = this._register(( new Emitter()));
|
|
108
|
+
this._onBlur = this._register(( (new Emitter())));
|
|
116
109
|
this.onBlur = this._onBlur.event;
|
|
117
|
-
this._onDidHeightChange = this._register(( new Emitter()));
|
|
110
|
+
this._onDidHeightChange = this._register(( (new Emitter())));
|
|
118
111
|
this.onDidHeightChange = this._onDidHeightChange.event;
|
|
119
|
-
this._onDidToggleContext = ( new Emitter());
|
|
112
|
+
this._onDidToggleContext = ( (new Emitter()));
|
|
120
113
|
this.onDidToggleContext = this._onDidToggleContext.event;
|
|
121
114
|
this.replaceActive = SearchContext.ReplaceActiveKey.bindTo(this.contextKeyService);
|
|
122
115
|
this.searchInputBoxFocused = SearchContext.SearchInputBoxFocusedKey.bindTo(this.contextKeyService);
|
|
@@ -128,12 +121,12 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
128
121
|
isInNotebookCellInput: true,
|
|
129
122
|
isInNotebookCellOutput: true
|
|
130
123
|
};
|
|
131
|
-
this._notebookFilters = this._register(( new NotebookFindFilters(
|
|
124
|
+
this._notebookFilters = this._register(( (new NotebookFindFilters(
|
|
132
125
|
notebookOptions.isInNotebookMarkdownInput,
|
|
133
126
|
notebookOptions.isInNotebookMarkdownPreview,
|
|
134
127
|
notebookOptions.isInNotebookCellInput,
|
|
135
128
|
notebookOptions.isInNotebookCellOutput
|
|
136
|
-
)));
|
|
129
|
+
))));
|
|
137
130
|
this._register(this._notebookFilters.onDidChange(() => {
|
|
138
131
|
if (this.searchInput) {
|
|
139
132
|
this.searchInput.updateStyles();
|
|
@@ -146,8 +139,8 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
146
139
|
this.searchInput.filterVisible = this._hasNotebookOpen();
|
|
147
140
|
}
|
|
148
141
|
}));
|
|
149
|
-
this._replaceHistoryDelayer = ( new Delayer(500));
|
|
150
|
-
this._toggleReplaceButtonListener = this._register(( new MutableDisposable()));
|
|
142
|
+
this._replaceHistoryDelayer = ( (new Delayer(500)));
|
|
143
|
+
this._toggleReplaceButtonListener = this._register(( (new MutableDisposable())));
|
|
151
144
|
this.render(container, options);
|
|
152
145
|
this.configurationService.onDidChangeConfiguration(e => {
|
|
153
146
|
if (e.affectsConfiguration('editor.accessibilitySupport')) {
|
|
@@ -159,7 +152,9 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
159
152
|
}
|
|
160
153
|
_hasNotebookOpen() {
|
|
161
154
|
const editors = this.editorService.editors;
|
|
162
|
-
return (
|
|
155
|
+
return (
|
|
156
|
+
(editors.some(editor => editor instanceof NotebookEditorInput))
|
|
157
|
+
);
|
|
163
158
|
}
|
|
164
159
|
getNotebookFilters() {
|
|
165
160
|
return this._notebookFilters;
|
|
@@ -271,14 +266,10 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
271
266
|
buttonSecondaryForeground: undefined,
|
|
272
267
|
buttonSecondaryHoverBackground: undefined,
|
|
273
268
|
buttonSeparator: undefined,
|
|
274
|
-
title: ( localizeWithPath(
|
|
275
|
-
'vs/workbench/contrib/search/browser/searchWidget',
|
|
276
|
-
'search.replace.toggle.button.title',
|
|
277
|
-
"Toggle Replace"
|
|
278
|
-
)),
|
|
269
|
+
title: ( localizeWithPath(_moduleId, 2, "Toggle Replace")),
|
|
279
270
|
hoverDelegate: getDefaultHoverDelegate('element'),
|
|
280
271
|
};
|
|
281
|
-
this.toggleReplaceButton = this._register(( new Button(parent, opts)));
|
|
272
|
+
this.toggleReplaceButton = this._register(( (new Button(parent, opts))));
|
|
282
273
|
this.toggleReplaceButton.element.setAttribute('aria-expanded', 'false');
|
|
283
274
|
this.toggleReplaceButton.element.classList.add('toggle-replace-button');
|
|
284
275
|
this.toggleReplaceButton.icon = searchHideReplaceIcon;
|
|
@@ -286,17 +277,9 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
286
277
|
}
|
|
287
278
|
renderSearchInput(parent, options) {
|
|
288
279
|
const inputOptions = {
|
|
289
|
-
label: ( localizeWithPath(
|
|
290
|
-
'vs/workbench/contrib/search/browser/searchWidget',
|
|
291
|
-
'label.Search',
|
|
292
|
-
'Search: Type Search Term and press Enter to search'
|
|
293
|
-
)),
|
|
280
|
+
label: ( localizeWithPath(_moduleId, 3, 'Search: Type Search Term and press Enter to search')),
|
|
294
281
|
validation: (value) => this.validateSearchInput(value),
|
|
295
|
-
placeholder: ( localizeWithPath(
|
|
296
|
-
'vs/workbench/contrib/search/browser/searchWidget',
|
|
297
|
-
'search.placeHolder',
|
|
298
|
-
"Search"
|
|
299
|
-
)),
|
|
282
|
+
placeholder: ( localizeWithPath(_moduleId, 4, "Search")),
|
|
300
283
|
appendCaseSensitiveLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding("toggleSearchCaseSensitive" )),
|
|
301
284
|
appendWholeWordsLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding("toggleSearchWholeWord" )),
|
|
302
285
|
appendRegexLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding("toggleSearchRegex" )),
|
|
@@ -309,7 +292,7 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
309
292
|
toggleStyles: options.toggleStyles
|
|
310
293
|
};
|
|
311
294
|
const searchInputContainer = append(parent, $('.search-container.input-box'));
|
|
312
|
-
this.searchInput = this._register(( new SearchFindInput(
|
|
295
|
+
this.searchInput = this._register(( (new SearchFindInput(
|
|
313
296
|
searchInputContainer,
|
|
314
297
|
this.contextViewService,
|
|
315
298
|
inputOptions,
|
|
@@ -319,7 +302,7 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
319
302
|
this._notebookFilters,
|
|
320
303
|
options.initialAIButtonVisibility ?? false,
|
|
321
304
|
this._hasNotebookOpen()
|
|
322
|
-
)));
|
|
305
|
+
))));
|
|
323
306
|
this.searchInput.onKeyDown((keyboardEvent) => this.onSearchInputKeyDown(keyboardEvent));
|
|
324
307
|
this.searchInput.setValue(options.value || '');
|
|
325
308
|
this.searchInput.setRegex(!!options.isRegex);
|
|
@@ -348,24 +331,20 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
348
331
|
this.ignoreGlobalFindBufferOnNextFocus = false;
|
|
349
332
|
}));
|
|
350
333
|
this._register(this.searchInputFocusTracker.onDidBlur(() => this.searchInputBoxFocused.set(false)));
|
|
351
|
-
this.showContextToggle = ( new Toggle({
|
|
334
|
+
this.showContextToggle = ( (new Toggle({
|
|
352
335
|
isChecked: false,
|
|
353
|
-
title: appendKeyBindingLabel(( localizeWithPath(
|
|
354
|
-
'vs/workbench/contrib/search/browser/searchWidget',
|
|
355
|
-
'showContext',
|
|
356
|
-
"Toggle Context Lines"
|
|
357
|
-
)), this.keybindingService.lookupKeybinding(ToggleSearchEditorContextLinesCommandId)),
|
|
336
|
+
title: appendKeyBindingLabel(( localizeWithPath(_moduleId, 5, "Toggle Context Lines")), this.keybindingService.lookupKeybinding(ToggleSearchEditorContextLinesCommandId)),
|
|
358
337
|
icon: searchShowContextIcon,
|
|
359
338
|
hoverDelegate: getDefaultHoverDelegate('element'),
|
|
360
339
|
...defaultToggleStyles
|
|
361
|
-
}));
|
|
340
|
+
})));
|
|
362
341
|
this._register(this.showContextToggle.onChange(() => this.onContextLinesChanged()));
|
|
363
342
|
if (options.showContextToggle) {
|
|
364
|
-
this.contextLinesInput = ( new InputBox(
|
|
343
|
+
this.contextLinesInput = ( (new InputBox(
|
|
365
344
|
searchInputContainer,
|
|
366
345
|
this.contextViewService,
|
|
367
346
|
{ type: 'number', inputBoxStyles: defaultInputBoxStyles }
|
|
368
|
-
));
|
|
347
|
+
)));
|
|
369
348
|
this.contextLinesInput.element.classList.add('context-lines-input');
|
|
370
349
|
this.contextLinesInput.value = '' + (this.configurationService.getValue('search').searchEditor.defaultNumberOfContextLines ?? 1);
|
|
371
350
|
this._register(this.contextLinesInput.onDidChange((value) => {
|
|
@@ -399,17 +378,9 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
399
378
|
renderReplaceInput(parent, options) {
|
|
400
379
|
this.replaceContainer = append(parent, $('.replace-container.disabled'));
|
|
401
380
|
const replaceBox = append(this.replaceContainer, $('.replace-input'));
|
|
402
|
-
this.replaceInput = this._register(( new ContextScopedReplaceInput(replaceBox, this.contextViewService, {
|
|
403
|
-
label: ( localizeWithPath(
|
|
404
|
-
|
|
405
|
-
'label.Replace',
|
|
406
|
-
'Replace: Type replace term and press Enter to preview'
|
|
407
|
-
)),
|
|
408
|
-
placeholder: ( localizeWithPath(
|
|
409
|
-
'vs/workbench/contrib/search/browser/searchWidget',
|
|
410
|
-
'search.replace.placeHolder',
|
|
411
|
-
"Replace"
|
|
412
|
-
)),
|
|
381
|
+
this.replaceInput = this._register(( (new ContextScopedReplaceInput(replaceBox, this.contextViewService, {
|
|
382
|
+
label: ( localizeWithPath(_moduleId, 6, 'Replace: Type replace term and press Enter to preview')),
|
|
383
|
+
placeholder: ( localizeWithPath(_moduleId, 7, "Replace")),
|
|
413
384
|
appendPreserveCaseLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding("toggleSearchPreserveCase" )),
|
|
414
385
|
history: options.replaceHistory,
|
|
415
386
|
showHistoryHint: () => showHistoryKeybindingHint(this.keybindingService),
|
|
@@ -417,7 +388,7 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
417
388
|
flexibleMaxHeight: SearchWidget_1.INPUT_MAX_HEIGHT,
|
|
418
389
|
inputBoxStyles: options.inputBoxStyles,
|
|
419
390
|
toggleStyles: options.toggleStyles
|
|
420
|
-
}, this.contextKeyService, true)));
|
|
391
|
+
}, this.contextKeyService, true))));
|
|
421
392
|
this._register(this.replaceInput.onDidOptionChange(viaKeyboard => {
|
|
422
393
|
if (!viaKeyboard) {
|
|
423
394
|
if (this.replaceInput) {
|
|
@@ -429,9 +400,9 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
429
400
|
this.replaceInput.setValue(options.replaceValue || '');
|
|
430
401
|
this._register(this.replaceInput.inputBox.onDidChange(() => this._onReplaceValueChanged.fire()));
|
|
431
402
|
this._register(this.replaceInput.inputBox.onDidHeightChange(() => this._onDidHeightChange.fire()));
|
|
432
|
-
this.replaceAllAction = ( new ReplaceAllAction(this));
|
|
403
|
+
this.replaceAllAction = ( (new ReplaceAllAction(this)));
|
|
433
404
|
this.replaceAllAction.label = SearchWidget_1.REPLACE_ALL_DISABLED_LABEL;
|
|
434
|
-
this.replaceActionBar = this._register(( new ActionBar(this.replaceContainer)));
|
|
405
|
+
this.replaceActionBar = this._register(( (new ActionBar(this.replaceContainer))));
|
|
435
406
|
this.replaceActionBar.push([this.replaceAllAction], { icon: true, label: false });
|
|
436
407
|
this.onkeydown(this.replaceActionBar.domNode, (keyboardEvent) => this.onReplaceActionbarKeyDown(keyboardEvent));
|
|
437
408
|
this.replaceInputFocusTracker = this._register(trackFocus(this.replaceInput.inputBox.inputElement));
|
|
@@ -492,7 +463,7 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
492
463
|
const delayMultiplierFromAISearch = (this.searchInput && this.searchInput.isAIEnabled) ? 5 : 1;
|
|
493
464
|
if (this.searchInput?.getRegex()) {
|
|
494
465
|
try {
|
|
495
|
-
const regex = ( new RegExp(this.searchInput.getValue(), 'ug'));
|
|
466
|
+
const regex = ( (new RegExp(this.searchInput.getValue(), 'ug')));
|
|
496
467
|
const matchienessHeuristic = `
|
|
497
468
|
~!@#$%^&*()_+
|
|
498
469
|
\`1234567890-=
|
|
@@ -639,33 +610,33 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
639
610
|
return this.configurationService.getValue('search');
|
|
640
611
|
}
|
|
641
612
|
};
|
|
642
|
-
SearchWidget = SearchWidget_1 = ( __decorate([
|
|
643
|
-
( __param(2, IContextViewService)),
|
|
644
|
-
( __param(3, IContextKeyService)),
|
|
645
|
-
( __param(4, IKeybindingService)),
|
|
646
|
-
( __param(5, IClipboardService)),
|
|
647
|
-
( __param(6, IConfigurationService)),
|
|
648
|
-
( __param(7, IAccessibilityService)),
|
|
649
|
-
( __param(8, IContextMenuService)),
|
|
650
|
-
( __param(9, IInstantiationService)),
|
|
651
|
-
( __param(10, IEditorService))
|
|
652
|
-
], SearchWidget));
|
|
613
|
+
SearchWidget = SearchWidget_1 = ( (__decorate([
|
|
614
|
+
( (__param(2, IContextViewService))),
|
|
615
|
+
( (__param(3, IContextKeyService))),
|
|
616
|
+
( (__param(4, IKeybindingService))),
|
|
617
|
+
( (__param(5, IClipboardService))),
|
|
618
|
+
( (__param(6, IConfigurationService))),
|
|
619
|
+
( (__param(7, IAccessibilityService))),
|
|
620
|
+
( (__param(8, IContextMenuService))),
|
|
621
|
+
( (__param(9, IInstantiationService))),
|
|
622
|
+
( (__param(10, IEditorService)))
|
|
623
|
+
], SearchWidget)));
|
|
653
624
|
function registerContributions() {
|
|
654
625
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
655
626
|
id: ReplaceAllAction.ID,
|
|
656
627
|
weight: 200 ,
|
|
657
|
-
when: ( ContextKeyExpr.and(
|
|
628
|
+
when: ( (ContextKeyExpr.and(
|
|
658
629
|
SearchContext.SearchViewVisibleKey,
|
|
659
630
|
SearchContext.ReplaceActiveKey,
|
|
660
631
|
CONTEXT_FIND_WIDGET_NOT_VISIBLE
|
|
661
|
-
)),
|
|
632
|
+
))),
|
|
662
633
|
primary: 512 | 2048 | 3 ,
|
|
663
634
|
handler: accessor => {
|
|
664
635
|
const viewsService = accessor.get(IViewsService);
|
|
665
636
|
if (isSearchViewFocused(viewsService)) {
|
|
666
637
|
const searchView = getSearchView(viewsService);
|
|
667
638
|
if (searchView) {
|
|
668
|
-
( new ReplaceAllAction(searchView.searchAndReplaceWidget)).run();
|
|
639
|
+
( (new ReplaceAllAction(searchView.searchAndReplaceWidget))).run();
|
|
669
640
|
}
|
|
670
641
|
}
|
|
671
642
|
}
|
|
@@ -18,11 +18,12 @@ import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
|
18
18
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
19
19
|
|
|
20
20
|
var SymbolsQuickAccessProvider_1;
|
|
21
|
+
const _moduleId = "vs/workbench/contrib/search/browser/symbolsQuickAccess";
|
|
21
22
|
let SymbolsQuickAccessProvider = class SymbolsQuickAccessProvider extends PickerQuickAccessProvider {
|
|
22
23
|
static { SymbolsQuickAccessProvider_1 = this; }
|
|
23
24
|
static { this.PREFIX = '#'; }
|
|
24
25
|
static { this.TYPING_SEARCH_DELAY = 200; }
|
|
25
|
-
static { this.TREAT_AS_GLOBAL_SYMBOL_TYPES = ( new Set([
|
|
26
|
+
static { this.TREAT_AS_GLOBAL_SYMBOL_TYPES = ( (new Set([
|
|
26
27
|
4 ,
|
|
27
28
|
9 ,
|
|
28
29
|
0 ,
|
|
@@ -30,7 +31,7 @@ let SymbolsQuickAccessProvider = class SymbolsQuickAccessProvider extends Picker
|
|
|
30
31
|
2 ,
|
|
31
32
|
3 ,
|
|
32
33
|
1
|
|
33
|
-
])); }
|
|
34
|
+
]))); }
|
|
34
35
|
get defaultFilterValue() {
|
|
35
36
|
const editor = this.codeEditorService.getFocusedCodeEditor();
|
|
36
37
|
if (editor) {
|
|
@@ -42,11 +43,7 @@ let SymbolsQuickAccessProvider = class SymbolsQuickAccessProvider extends Picker
|
|
|
42
43
|
super(SymbolsQuickAccessProvider_1.PREFIX, {
|
|
43
44
|
canAcceptInBackground: true,
|
|
44
45
|
noResultsPick: {
|
|
45
|
-
label: ( localizeWithPath(
|
|
46
|
-
'vs/workbench/contrib/search/browser/symbolsQuickAccess',
|
|
47
|
-
'noSymbolResults',
|
|
48
|
-
"No matching workspace symbols"
|
|
49
|
-
))
|
|
46
|
+
label: ( localizeWithPath(_moduleId, 0, "No matching workspace symbols"))
|
|
50
47
|
}
|
|
51
48
|
});
|
|
52
49
|
this.labelService = labelService;
|
|
@@ -54,7 +51,7 @@ let SymbolsQuickAccessProvider = class SymbolsQuickAccessProvider extends Picker
|
|
|
54
51
|
this.editorService = editorService;
|
|
55
52
|
this.configurationService = configurationService;
|
|
56
53
|
this.codeEditorService = codeEditorService;
|
|
57
|
-
this.delayer = this._register(( new ThrottledDelayer(SymbolsQuickAccessProvider_1.TYPING_SEARCH_DELAY)));
|
|
54
|
+
this.delayer = this._register(( (new ThrottledDelayer(SymbolsQuickAccessProvider_1.TYPING_SEARCH_DELAY))));
|
|
58
55
|
}
|
|
59
56
|
get configuration() {
|
|
60
57
|
const editorConfig = this.configurationService.getValue().workbench?.editor;
|
|
@@ -91,7 +88,7 @@ let SymbolsQuickAccessProvider = class SymbolsQuickAccessProvider extends Picker
|
|
|
91
88
|
const symbolPicks = [];
|
|
92
89
|
const openSideBySideDirection = this.configuration.openSideBySideDirection;
|
|
93
90
|
for (const { symbol, provider } of workspaceSymbols) {
|
|
94
|
-
if (options?.skipLocal && !( SymbolsQuickAccessProvider_1.TREAT_AS_GLOBAL_SYMBOL_TYPES.has(symbol.kind)) && !!symbol.containerName) {
|
|
91
|
+
if (options?.skipLocal && !( (SymbolsQuickAccessProvider_1.TREAT_AS_GLOBAL_SYMBOL_TYPES.has(symbol.kind))) && !!symbol.containerName) {
|
|
95
92
|
continue;
|
|
96
93
|
}
|
|
97
94
|
const symbolLabel = symbol.name;
|
|
@@ -154,15 +151,7 @@ let SymbolsQuickAccessProvider = class SymbolsQuickAccessProvider extends Picker
|
|
|
154
151
|
buttons: [
|
|
155
152
|
{
|
|
156
153
|
iconClass: openSideBySideDirection === 'right' ? ThemeIcon.asClassName(Codicon.splitHorizontal) : ThemeIcon.asClassName(Codicon.splitVertical),
|
|
157
|
-
tooltip: openSideBySideDirection === 'right' ? ( localizeWithPath(
|
|
158
|
-
'vs/workbench/contrib/search/browser/symbolsQuickAccess',
|
|
159
|
-
'openToSide',
|
|
160
|
-
"Open to the Side"
|
|
161
|
-
)) : ( localizeWithPath(
|
|
162
|
-
'vs/workbench/contrib/search/browser/symbolsQuickAccess',
|
|
163
|
-
'openToBottom',
|
|
164
|
-
"Open to the Bottom"
|
|
165
|
-
))
|
|
154
|
+
tooltip: openSideBySideDirection === 'right' ? ( localizeWithPath(_moduleId, 1, "Open to the Side")) : ( localizeWithPath(_moduleId, 2, "Open to the Bottom"))
|
|
166
155
|
}
|
|
167
156
|
],
|
|
168
157
|
trigger: (buttonIndex, keyMods) => {
|
|
@@ -224,12 +213,12 @@ let SymbolsQuickAccessProvider = class SymbolsQuickAccessProvider extends Picker
|
|
|
224
213
|
return 0;
|
|
225
214
|
}
|
|
226
215
|
};
|
|
227
|
-
SymbolsQuickAccessProvider = SymbolsQuickAccessProvider_1 = ( __decorate([
|
|
228
|
-
( __param(0, ILabelService)),
|
|
229
|
-
( __param(1, IOpenerService)),
|
|
230
|
-
( __param(2, IEditorService)),
|
|
231
|
-
( __param(3, IConfigurationService)),
|
|
232
|
-
( __param(4, ICodeEditorService))
|
|
233
|
-
], SymbolsQuickAccessProvider));
|
|
216
|
+
SymbolsQuickAccessProvider = SymbolsQuickAccessProvider_1 = ( (__decorate([
|
|
217
|
+
( (__param(0, ILabelService))),
|
|
218
|
+
( (__param(1, IOpenerService))),
|
|
219
|
+
( (__param(2, IEditorService))),
|
|
220
|
+
( (__param(3, IConfigurationService))),
|
|
221
|
+
( (__param(4, ICodeEditorService)))
|
|
222
|
+
], SymbolsQuickAccessProvider)));
|
|
234
223
|
|
|
235
224
|
export { SymbolsQuickAccessProvider };
|