@codingame/monaco-vscode-search-service-override 2.2.2 → 3.1.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.
@@ -54,7 +54,7 @@ import { searchDetailsIcon } from './searchIcons.js';
54
54
  import { renderSearchMessage } from './searchMessage.js';
55
55
  import { SearchAccessibilityProvider, SearchDelegate, FolderMatchRenderer, FileMatchRenderer, MatchRenderer } from './searchResultsView.js';
56
56
  import { SearchWidget } from './searchWidget.js';
57
- import { SearchViewVisibleKey, FirstMatchFocusKey, FileMatchOrMatchFocusKey, FileMatchOrFolderMatchFocusKey, FileMatchOrFolderMatchWithResourceFocusKey, FileFocusKey, FolderFocusKey, ResourceFolderFocusKey, HasSearchResults, MatchFocusKey, ViewHasSearchPatternKey, ViewHasReplacePatternKey, ViewHasFilePatternKey, ViewHasSomeCollapsibleKey, InTreeViewKey, SearchViewFocusedKey, InputBoxFocusedKey, PatternIncludesFocusedKey, PatternExcludesFocusedKey, IsEditableItemKey, OpenInEditorCommandId } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
57
+ import { SearchContext } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
58
58
  import { IReplaceService } from 'vscode/vscode/vs/workbench/contrib/search/browser/replace';
59
59
  import { SearchStateKey, SearchUIState, getOutOfWorkspaceEditorResources } from 'vscode/vscode/vs/workbench/contrib/search/common/search';
60
60
  import { SearchHistoryService, ISearchHistoryService } from 'vscode/vscode/vs/workbench/contrib/search/common/searchHistoryService';
@@ -67,7 +67,7 @@ import 'vscode/vscode/vs/workbench/services/search/common/search';
67
67
  import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles';
68
68
  import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
69
69
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
70
- import { AudioCue, IAudioCueService } from 'vscode/vscode/vs/platform/audioCues/browser/audioCueService';
70
+ import { AccessibilitySignal, IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
71
71
  import { TextSearchCompleteMessageType } from 'vscode/vscode/vs/workbench/services/search/common/searchExtTypes';
72
72
  import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
73
73
 
@@ -82,7 +82,7 @@ const DEBOUNCE_DELAY = 75;
82
82
  let SearchView = class SearchView extends ViewPane {
83
83
  static { SearchView_1 = this; }
84
84
  static { this.ACTIONS_RIGHT_CLASS_NAME = 'actions-right'; }
85
- constructor(options, fileService, editorService, codeEditorService, progressService, notificationService, dialogService, commandService, contextViewService, instantiationService, viewDescriptorService, configurationService, contextService, searchViewModelWorkbenchService, contextKeyService, replaceService, textFileService, preferencesService, themeService, searchHistoryService, contextMenuService, accessibilityService, keybindingService, storageService, openerService, telemetryService, notebookService, logService, audioCueService) {
85
+ constructor(options, fileService, editorService, codeEditorService, progressService, notificationService, dialogService, commandService, contextViewService, instantiationService, viewDescriptorService, configurationService, contextService, searchViewModelWorkbenchService, contextKeyService, replaceService, textFileService, preferencesService, themeService, searchHistoryService, contextMenuService, accessibilityService, keybindingService, storageService, openerService, telemetryService, notebookService, logService, accessibilitySignalService) {
86
86
  super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
87
87
  this.fileService = fileService;
88
88
  this.editorService = editorService;
@@ -102,7 +102,7 @@ let SearchView = class SearchView extends ViewPane {
102
102
  this.storageService = storageService;
103
103
  this.notebookService = notebookService;
104
104
  this.logService = logService;
105
- this.audioCueService = audioCueService;
105
+ this.accessibilitySignalService = accessibilitySignalService;
106
106
  this.isDisposed = false;
107
107
  this.lastFocusState = 'input';
108
108
  this.messageDisposables = ( new DisposableStore());
@@ -111,28 +111,28 @@ let SearchView = class SearchView extends ViewPane {
111
111
  this.pauseSearching = false;
112
112
  this._visibleMatches = 0;
113
113
  this.container = $$1('.search-view');
114
- this.viewletVisible = SearchViewVisibleKey.bindTo(this.contextKeyService);
115
- this.firstMatchFocused = FirstMatchFocusKey.bindTo(this.contextKeyService);
116
- this.fileMatchOrMatchFocused = FileMatchOrMatchFocusKey.bindTo(this.contextKeyService);
117
- this.fileMatchOrFolderMatchFocus = FileMatchOrFolderMatchFocusKey.bindTo(this.contextKeyService);
118
- this.fileMatchOrFolderMatchWithResourceFocus = FileMatchOrFolderMatchWithResourceFocusKey.bindTo(this.contextKeyService);
119
- this.fileMatchFocused = FileFocusKey.bindTo(this.contextKeyService);
120
- this.folderMatchFocused = FolderFocusKey.bindTo(this.contextKeyService);
121
- this.folderMatchWithResourceFocused = ResourceFolderFocusKey.bindTo(this.contextKeyService);
122
- this.hasSearchResultsKey = HasSearchResults.bindTo(this.contextKeyService);
123
- this.matchFocused = MatchFocusKey.bindTo(this.contextKeyService);
114
+ this.viewletVisible = SearchContext.SearchViewVisibleKey.bindTo(this.contextKeyService);
115
+ this.firstMatchFocused = SearchContext.FirstMatchFocusKey.bindTo(this.contextKeyService);
116
+ this.fileMatchOrMatchFocused = SearchContext.FileMatchOrMatchFocusKey.bindTo(this.contextKeyService);
117
+ this.fileMatchOrFolderMatchFocus = SearchContext.FileMatchOrFolderMatchFocusKey.bindTo(this.contextKeyService);
118
+ this.fileMatchOrFolderMatchWithResourceFocus = SearchContext.FileMatchOrFolderMatchWithResourceFocusKey.bindTo(this.contextKeyService);
119
+ this.fileMatchFocused = SearchContext.FileFocusKey.bindTo(this.contextKeyService);
120
+ this.folderMatchFocused = SearchContext.FolderFocusKey.bindTo(this.contextKeyService);
121
+ this.folderMatchWithResourceFocused = SearchContext.ResourceFolderFocusKey.bindTo(this.contextKeyService);
122
+ this.hasSearchResultsKey = SearchContext.HasSearchResults.bindTo(this.contextKeyService);
123
+ this.matchFocused = SearchContext.MatchFocusKey.bindTo(this.contextKeyService);
124
124
  this.searchStateKey = SearchStateKey.bindTo(this.contextKeyService);
125
- this.hasSearchPatternKey = ViewHasSearchPatternKey.bindTo(this.contextKeyService);
126
- this.hasReplacePatternKey = ViewHasReplacePatternKey.bindTo(this.contextKeyService);
127
- this.hasFilePatternKey = ViewHasFilePatternKey.bindTo(this.contextKeyService);
128
- this.hasSomeCollapsibleResultKey = ViewHasSomeCollapsibleKey.bindTo(this.contextKeyService);
129
- this.treeViewKey = InTreeViewKey.bindTo(this.contextKeyService);
125
+ this.hasSearchPatternKey = SearchContext.ViewHasSearchPatternKey.bindTo(this.contextKeyService);
126
+ this.hasReplacePatternKey = SearchContext.ViewHasReplacePatternKey.bindTo(this.contextKeyService);
127
+ this.hasFilePatternKey = SearchContext.ViewHasFilePatternKey.bindTo(this.contextKeyService);
128
+ this.hasSomeCollapsibleResultKey = SearchContext.ViewHasSomeCollapsibleKey.bindTo(this.contextKeyService);
129
+ this.treeViewKey = SearchContext.InTreeViewKey.bindTo(this.contextKeyService);
130
130
  this.contextKeyService = this._register(this.contextKeyService.createScoped(this.container));
131
- SearchViewFocusedKey.bindTo(this.contextKeyService).set(true);
132
- this.inputBoxFocused = InputBoxFocusedKey.bindTo(this.contextKeyService);
133
- this.inputPatternIncludesFocused = PatternIncludesFocusedKey.bindTo(this.contextKeyService);
134
- this.inputPatternExclusionsFocused = PatternExcludesFocusedKey.bindTo(this.contextKeyService);
135
- this.isEditableItem = IsEditableItemKey.bindTo(this.contextKeyService);
131
+ SearchContext.SearchViewFocusedKey.bindTo(this.contextKeyService).set(true);
132
+ this.inputBoxFocused = SearchContext.InputBoxFocusedKey.bindTo(this.contextKeyService);
133
+ this.inputPatternIncludesFocused = SearchContext.PatternIncludesFocusedKey.bindTo(this.contextKeyService);
134
+ this.inputPatternExclusionsFocused = SearchContext.PatternExcludesFocusedKey.bindTo(this.contextKeyService);
135
+ this.isEditableItem = SearchContext.IsEditableItemKey.bindTo(this.contextKeyService);
136
136
  this.instantiationService = this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, this.contextKeyService])));
137
137
  this.configurationService.onDidChangeConfiguration(e => {
138
138
  if (e.affectsConfiguration('search.sortOrder')) {
@@ -805,6 +805,7 @@ let SearchView = class SearchView extends ViewPane {
805
805
  const updateHasSomeCollapsible = () => this.toggleCollapseStateDelayer.trigger(() => this.hasSomeCollapsibleResultKey.set(this.hasSomeCollapsible()));
806
806
  updateHasSomeCollapsible();
807
807
  this._register(this.tree.onDidChangeCollapseState(() => updateHasSomeCollapsible()));
808
+ this._register(this.tree.onDidChangeModel(() => updateHasSomeCollapsible()));
808
809
  this._register(Event.debounce(this.tree.onDidOpen, (last, event) => event, DEBOUNCE_DELAY, true)(options => {
809
810
  if (options.element instanceof Match) {
810
811
  const selectedMatch = options.element;
@@ -991,7 +992,7 @@ let SearchView = class SearchView extends ViewPane {
991
992
  }
992
993
  updateTextFromSelection({ allowUnselectedWord = true, allowSearchOnType = true }, editor) {
993
994
  const seedSearchStringFromSelection = this.configurationService.getValue('editor').find.seedSearchStringFromSelection;
994
- if (!seedSearchStringFromSelection) {
995
+ if (!seedSearchStringFromSelection || seedSearchStringFromSelection === 'never') {
995
996
  return false;
996
997
  }
997
998
  let selectedText = this.getSearchTextFromEditor(allowUnselectedWord, editor);
@@ -1126,7 +1127,7 @@ let SearchView = class SearchView extends ViewPane {
1126
1127
  'emptySearch',
1127
1128
  "Empty Search"
1128
1129
  ));
1129
- this.audioCueService.playAudioCue(AudioCue.clear);
1130
+ this.accessibilitySignalService.playSignal(AccessibilitySignal.clear);
1130
1131
  this.reLayout();
1131
1132
  }
1132
1133
  clearFilePatternFields() {
@@ -1676,7 +1677,7 @@ let SearchView = class SearchView extends ViewPane {
1676
1677
  'vs/workbench/contrib/search/browser/searchView',
1677
1678
  'openInEditor.tooltip',
1678
1679
  "Copy current search results to an editor"
1679
- )), this.keybindingService.lookupKeybinding(OpenInEditorCommandId));
1680
+ )), this.keybindingService.lookupKeybinding("search.action.openInEditor" ));
1680
1681
  const openInEditorButton = this.messageDisposables.add(( new SearchLinkButton(( localizeWithPath(
1681
1682
  'vs/workbench/contrib/search/browser/searchView',
1682
1683
  'openInEditor.message',
@@ -2002,7 +2003,7 @@ SearchView = SearchView_1 = ( __decorate([
2002
2003
  ( __param(25, ITelemetryService)),
2003
2004
  ( __param(26, INotebookService)),
2004
2005
  ( __param(27, ILogService)),
2005
- ( __param(28, IAudioCueService))
2006
+ ( __param(28, IAccessibilitySignalService))
2006
2007
  ], SearchView));
2007
2008
  class SearchLinkButton extends Disposable {
2008
2009
  constructor(label, handler, tooltip) {
@@ -18,7 +18,7 @@ import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common
18
18
  import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
19
19
  import { ContextScopedReplaceInput } from 'vscode/vscode/vs/platform/history/browser/contextScopedHistoryWidget';
20
20
  import { appendKeyBindingLabel, isSearchViewFocused, getSearchView } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchActionsBase';
21
- import { ReplaceActiveKey, SearchInputBoxFocusedKey, ReplaceInputBoxFocusedKey, ToggleCaseSensitiveCommandId, ToggleWholeWordCommandId, ToggleRegexCommandId, TogglePreserveCaseId, SearchViewVisibleKey } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
21
+ import { SearchContext } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
22
22
  import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility';
23
23
  import { isMacintosh } from 'vscode/vscode/vs/base/common/platform';
24
24
  import { Toggle } from 'vscode/vscode/vs/base/browser/ui/toggle/toggle';
@@ -115,9 +115,9 @@ let SearchWidget = class SearchWidget extends Widget {
115
115
  this.onDidHeightChange = this._onDidHeightChange.event;
116
116
  this._onDidToggleContext = ( new Emitter());
117
117
  this.onDidToggleContext = this._onDidToggleContext.event;
118
- this.replaceActive = ReplaceActiveKey.bindTo(this.contextKeyService);
119
- this.searchInputBoxFocused = SearchInputBoxFocusedKey.bindTo(this.contextKeyService);
120
- this.replaceInputBoxFocused = ReplaceInputBoxFocusedKey.bindTo(this.contextKeyService);
118
+ this.replaceActive = SearchContext.ReplaceActiveKey.bindTo(this.contextKeyService);
119
+ this.searchInputBoxFocused = SearchContext.SearchInputBoxFocusedKey.bindTo(this.contextKeyService);
120
+ this.replaceInputBoxFocused = SearchContext.ReplaceInputBoxFocusedKey.bindTo(this.contextKeyService);
121
121
  const notebookOptions = options.notebookOptions ??
122
122
  {
123
123
  isInNotebookMarkdownInput: true,
@@ -292,9 +292,9 @@ let SearchWidget = class SearchWidget extends Widget {
292
292
  'search.placeHolder',
293
293
  "Search"
294
294
  )),
295
- appendCaseSensitiveLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding(ToggleCaseSensitiveCommandId)),
296
- appendWholeWordsLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding(ToggleWholeWordCommandId)),
297
- appendRegexLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding(ToggleRegexCommandId)),
295
+ appendCaseSensitiveLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding("toggleSearchCaseSensitive" )),
296
+ appendWholeWordsLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding("toggleSearchWholeWord" )),
297
+ appendRegexLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding("toggleSearchRegex" )),
298
298
  history: options.searchHistory,
299
299
  showHistoryHint: () => showHistoryKeybindingHint(this.keybindingService),
300
300
  flexibleHeight: true,
@@ -403,7 +403,7 @@ let SearchWidget = class SearchWidget extends Widget {
403
403
  'search.replace.placeHolder',
404
404
  "Replace"
405
405
  )),
406
- appendPreserveCaseLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding(TogglePreserveCaseId)),
406
+ appendPreserveCaseLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding("toggleSearchPreserveCase" )),
407
407
  history: options.replaceHistory,
408
408
  showHistoryHint: () => showHistoryKeybindingHint(this.keybindingService),
409
409
  flexibleHeight: true,
@@ -647,8 +647,8 @@ function registerContributions() {
647
647
  id: ReplaceAllAction.ID,
648
648
  weight: 200 ,
649
649
  when: ( ContextKeyExpr.and(
650
- SearchViewVisibleKey,
651
- ReplaceActiveKey,
650
+ SearchContext.SearchViewVisibleKey,
651
+ SearchContext.ReplaceActiveKey,
652
652
  CONTEXT_FIND_WIDGET_NOT_VISIBLE
653
653
  )),
654
654
  primary: 512 | 2048 | 3 ,
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { extname, isEqual } from 'vscode/vscode/vs/base/common/resources';
2
+ import { isEqual, extname } from 'vscode/vscode/vs/base/common/resources';
3
3
  import { URI } from 'vscode/vscode/vs/base/common/uri';
4
4
  import { ToggleCaseSensitiveKeybinding, ToggleWholeWordKeybinding, ToggleRegexKeybinding } from 'vscode/vscode/vs/editor/contrib/find/browser/findModel';
5
5
  import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
@@ -10,17 +10,17 @@ import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/d
10
10
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
11
11
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
12
12
  import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
13
- import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
13
+ import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
14
14
  import { EditorExtensions, DEFAULT_EDITOR_ASSOCIATION } from 'vscode/vscode/vs/workbench/common/editor';
15
15
  import { ActiveEditorContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
16
16
  import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
17
17
  import { getSearchView } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchActionsBase';
18
18
  import { searchRefreshIcon, searchNewEditorIcon } from '../../search/browser/searchIcons.js';
19
- import { HasSearchResults, SearchViewFocusedKey, SearchInputBoxFocusedKey } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
19
+ import { SearchContext } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
20
20
  import { InSearchEditor, OpenNewEditorCommandId, OpenEditorCommandId, SearchEditorID, ToggleSearchEditorContextLinesCommandId, SearchEditorScheme } from 'vscode/vscode/vs/workbench/contrib/searchEditor/browser/constants';
21
21
  import { SearchEditor } from './searchEditor.js';
22
22
  import { openNewSearchEditor, createEditorFromSearchResult, toggleSearchEditorCaseSensitiveCommand, toggleSearchEditorWholeWordCommand, toggleSearchEditorRegexCommand, toggleSearchEditorContextLinesCommand, modifySearchEditorContextLinesCommand, selectAllSearchEditorMatchesCommand, openSearchEditor } from './searchEditorActions.js';
23
- import { SearchEditorInput, SEARCH_EDITOR_EXT, getOrMakeSearchEditorInput } from './searchEditorInput.js';
23
+ import { SearchEditorInput, getOrMakeSearchEditorInput, SEARCH_EDITOR_EXT } from './searchEditorInput.js';
24
24
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
25
25
  import { VIEW_ID } from 'vscode/vscode/vs/workbench/services/search/common/search';
26
26
  import { RegisteredEditorPriority, IEditorResolverService } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
@@ -49,6 +49,7 @@ const SelectAllSearchEditorMatchesCommandId = 'selectAllSearchEditorMatches';
49
49
  ( new SyncDescriptor(SearchEditorInput))
50
50
  ]);
51
51
  let SearchEditorContribution = class SearchEditorContribution {
52
+ static { this.ID = 'workbench.contrib.searchEditor'; }
52
53
  constructor(editorResolverService, instantiationService) {
53
54
  editorResolverService.registerEditor('*' + SEARCH_EDITOR_EXT, {
54
55
  id: SearchEditorInput.ID,
@@ -73,13 +74,15 @@ SearchEditorContribution = ( __decorate([
73
74
  ( __param(0, IEditorResolverService)),
74
75
  ( __param(1, IInstantiationService))
75
76
  ], SearchEditorContribution));
76
- const workbenchContributionsRegistry = ( Registry.as(Extensions.Workbench));
77
- workbenchContributionsRegistry.registerWorkbenchContribution(SearchEditorContribution, 1 );
77
+ registerWorkbenchContribution2(SearchEditorContribution.ID, SearchEditorContribution, 1 );
78
78
  class SearchEditorInputSerializer {
79
79
  canSerialize(input) {
80
80
  return !!input.tryReadConfigSync();
81
81
  }
82
82
  serialize(input) {
83
+ if (!this.canSerialize(input)) {
84
+ return undefined;
85
+ }
83
86
  if (input.isDisposed()) {
84
87
  return JSON.stringify({ modelUri: undefined, dirty: false, config: input.tryReadConfigSync(), name: input.getName(), matchRanges: [], backingUri: input.backingUri?.toString() });
85
88
  }
@@ -255,7 +258,10 @@ registerAction2(class extends Action2 {
255
258
  f1: true,
256
259
  keybinding: {
257
260
  primary: 512 | 3 ,
258
- when: ( ContextKeyExpr.and(HasSearchResults, SearchViewFocusedKey)),
261
+ when: ( ContextKeyExpr.and(
262
+ SearchContext.HasSearchResults,
263
+ SearchContext.SearchViewFocusedKey
264
+ )),
259
265
  weight: 200 ,
260
266
  mac: {
261
267
  primary: 2048 | 3
@@ -391,7 +397,7 @@ registerAction2(class extends Action2 {
391
397
  precondition: InSearchEditor,
392
398
  keybinding: Object.assign({
393
399
  weight: 200 ,
394
- when: SearchInputBoxFocusedKey,
400
+ when: SearchContext.SearchInputBoxFocusedKey,
395
401
  }, ToggleCaseSensitiveKeybinding)
396
402
  });
397
403
  }
@@ -413,7 +419,7 @@ registerAction2(class extends Action2 {
413
419
  precondition: InSearchEditor,
414
420
  keybinding: Object.assign({
415
421
  weight: 200 ,
416
- when: SearchInputBoxFocusedKey,
422
+ when: SearchContext.SearchInputBoxFocusedKey,
417
423
  }, ToggleWholeWordKeybinding)
418
424
  });
419
425
  }
@@ -425,17 +431,17 @@ registerAction2(class extends Action2 {
425
431
  constructor() {
426
432
  super({
427
433
  id: ToggleSearchEditorRegexCommandId,
428
- title: { value: ( localizeWithPath(
434
+ title: ( localize2WithPath(
429
435
  'vs/workbench/contrib/searchEditor/browser/searchEditor.contribution',
430
436
  'searchEditor.action.toggleSearchEditorRegex',
431
437
  "Toggle Use Regular Expression"
432
- )), original: 'Toggle Use Regular Expression"' },
438
+ )),
433
439
  category,
434
440
  f1: true,
435
441
  precondition: InSearchEditor,
436
442
  keybinding: Object.assign({
437
443
  weight: 200 ,
438
- when: SearchInputBoxFocusedKey,
444
+ when: SearchContext.SearchInputBoxFocusedKey,
439
445
  }, ToggleRegexKeybinding)
440
446
  });
441
447
  }
@@ -447,11 +453,11 @@ registerAction2(class extends Action2 {
447
453
  constructor() {
448
454
  super({
449
455
  id: ToggleSearchEditorContextLinesCommandId,
450
- title: { value: ( localizeWithPath(
456
+ title: ( localize2WithPath(
451
457
  'vs/workbench/contrib/searchEditor/browser/searchEditor.contribution',
452
458
  'searchEditor.action.toggleSearchEditorContextLines',
453
459
  "Toggle Context Lines"
454
- )), original: 'Toggle Context Lines"' },
460
+ )),
455
461
  category,
456
462
  f1: true,
457
463
  precondition: InSearchEditor,
@@ -470,11 +476,11 @@ registerAction2(class extends Action2 {
470
476
  constructor() {
471
477
  super({
472
478
  id: IncreaseSearchEditorContextLinesCommandId,
473
- title: { original: 'Increase Context Lines', value: ( localizeWithPath(
479
+ title: ( localize2WithPath(
474
480
  'vs/workbench/contrib/searchEditor/browser/searchEditor.contribution',
475
481
  'searchEditor.action.increaseSearchEditorContextLines',
476
482
  "Increase Context Lines"
477
- )) },
483
+ )),
478
484
  category,
479
485
  f1: true,
480
486
  precondition: InSearchEditor,
@@ -490,11 +496,11 @@ registerAction2(class extends Action2 {
490
496
  constructor() {
491
497
  super({
492
498
  id: DecreaseSearchEditorContextLinesCommandId,
493
- title: { original: 'Decrease Context Lines', value: ( localizeWithPath(
499
+ title: ( localize2WithPath(
494
500
  'vs/workbench/contrib/searchEditor/browser/searchEditor.contribution',
495
501
  'searchEditor.action.decreaseSearchEditorContextLines',
496
502
  "Decrease Context Lines"
497
- )) },
503
+ )),
498
504
  category,
499
505
  f1: true,
500
506
  precondition: InSearchEditor,
@@ -510,11 +516,11 @@ registerAction2(class extends Action2 {
510
516
  constructor() {
511
517
  super({
512
518
  id: SelectAllSearchEditorMatchesCommandId,
513
- title: { original: 'Select All Matches', value: ( localizeWithPath(
519
+ title: ( localize2WithPath(
514
520
  'vs/workbench/contrib/searchEditor/browser/searchEditor.contribution',
515
521
  'searchEditor.action.selectAllSearchEditorMatches',
516
522
  "Select All Matches"
517
- )) },
523
+ )),
518
524
  category,
519
525
  f1: true,
520
526
  precondition: InSearchEditor,
@@ -552,6 +558,7 @@ registerAction2(class OpenSearchEditorAction extends Action2 {
552
558
  }
553
559
  });
554
560
  let SearchEditorWorkingCopyEditorHandler = class SearchEditorWorkingCopyEditorHandler extends Disposable {
561
+ static { this.ID = 'workbench.contrib.searchEditorWorkingCopyEditorHandler'; }
555
562
  constructor(instantiationService, workingCopyEditorService) {
556
563
  super();
557
564
  this.instantiationService = instantiationService;
@@ -576,4 +583,4 @@ SearchEditorWorkingCopyEditorHandler = ( __decorate([
576
583
  ( __param(0, IInstantiationService)),
577
584
  ( __param(1, IWorkingCopyEditorService))
578
585
  ], SearchEditorWorkingCopyEditorHandler));
579
- workbenchContributionsRegistry.registerWorkbenchContribution(SearchEditorWorkingCopyEditorHandler, 2 );
586
+ registerWorkbenchContribution2(SearchEditorWorkingCopyEditorHandler.ID, SearchEditorWorkingCopyEditorHandler, 2 );
@@ -30,7 +30,6 @@ import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/co
30
30
  import { AbstractTextCodeEditor } from 'vscode/vscode/vs/workbench/browser/parts/editor/textCodeEditor';
31
31
  import { IncludePatternInputWidget, ExcludePatternInputWidget } from '../../search/browser/patternInputWidget.js';
32
32
  import { SearchWidget } from '../../search/browser/searchWidget.js';
33
- import { InputBoxFocusedKey } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
34
33
  import { QueryBuilder } from 'vscode/vscode/vs/workbench/services/search/common/queryBuilder';
35
34
  import { getOutOfWorkspaceEditorResources } from 'vscode/vscode/vs/workbench/contrib/search/common/search';
36
35
  import { SearchModel } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchModel';
@@ -47,6 +46,7 @@ import { EditorExtensionsRegistry } from 'vscode/vscode/vs/editor/browser/editor
47
46
  import { UnusualLineTerminatorsDetector } from 'vscode/vscode/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators';
48
47
  import { getInputBoxStyle, defaultToggleStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
49
48
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
49
+ import { SearchContext } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
50
50
 
51
51
  var SearchEditor_1;
52
52
  const RESULT_LINE_REGEX = /^(\s+)(\d+)(: | )(\s*)(.*)$/;
@@ -86,7 +86,7 @@ let SearchEditor = class SearchEditor extends AbstractTextCodeEditor {
86
86
  this.registerEditorListeners();
87
87
  const scopedContextKeyService = assertIsDefined(this.scopedContextKeyService);
88
88
  InSearchEditor.bindTo(scopedContextKeyService).set(true);
89
- this.createQueryEditor(this.queryEditorContainer, this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, scopedContextKeyService]))), InputBoxFocusedKey.bindTo(scopedContextKeyService));
89
+ this.createQueryEditor(this.queryEditorContainer, this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, scopedContextKeyService]))), SearchContext.InputBoxFocusedKey.bindTo(scopedContextKeyService));
90
90
  }
91
91
  createQueryEditor(container, scopedInstantiationService, inputBoxFocusedContextKey) {
92
92
  const searchEditorInputboxStyles = getInputBoxStyle({ inputBorder: searchEditorTextInputBorder });
@@ -1,9 +0,0 @@
1
- import { ReplacePreviewContentProvider } from '../replaceService.js';
2
- import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
3
- import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
4
-
5
- function registerContributions() {
6
- ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(ReplacePreviewContentProvider, 1 );
7
- }
8
-
9
- export { registerContributions };