@codingame/monaco-vscode-search-service-override 8.0.4 → 9.0.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/patternInputWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js +7 -7
- package/vscode/src/vs/workbench/contrib/search/browser/replaceService.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/search.contribution.js +80 -72
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsCopy.js +3 -3
- 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/searchActionsSymbol.js +3 -3
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTextQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +8 -8
- package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +20 -20
- package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +14 -14
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +58 -57
- package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.js +23 -13
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +5 -5
- package/vscode/src/vs/workbench/services/search/browser/searchService.js +17 -16
- package/vscode/src/vs/workbench/services/search/common/getFileResults.js +9 -6
- package/vscode/src/vs/workbench/services/search/common/localFileSearchWorkerTypes.js +11 -0
- package/vscode/src/vs/workbench/services/search/common/searchService.js +3 -0
- package/vscode/src/vs/workbench/services/search/worker/localFileSearch.js +20 -17
|
@@ -84,7 +84,7 @@ import { TextSearchCompleteMessageType } from 'vscode/vscode/vs/workbench/servic
|
|
|
84
84
|
|
|
85
85
|
var SearchView_1;
|
|
86
86
|
const $ = $$1;
|
|
87
|
-
const SEARCH_CANCELLED_MESSAGE = ( localize(
|
|
87
|
+
const SEARCH_CANCELLED_MESSAGE = ( localize(8358, "Search was canceled before any results could be found - "));
|
|
88
88
|
const DEBOUNCE_DELAY = 75;
|
|
89
89
|
let SearchView = class SearchView extends ViewPane {
|
|
90
90
|
static { SearchView_1 = this; }
|
|
@@ -113,7 +113,6 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
113
113
|
this.isDisposed = false;
|
|
114
114
|
this.lastFocusState = 'input';
|
|
115
115
|
this.messageDisposables = ( (new DisposableStore()));
|
|
116
|
-
this.changedWhileHidden = false;
|
|
117
116
|
this.currentSearchQ = Promise.resolve();
|
|
118
117
|
this.pauseSearching = false;
|
|
119
118
|
this._visibleMatches = 0;
|
|
@@ -161,7 +160,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
161
160
|
this.refreshHasAISetting();
|
|
162
161
|
}
|
|
163
162
|
}));
|
|
164
|
-
this.viewModel = this.
|
|
163
|
+
this.viewModel = this.searchViewModelWorkbenchService.searchModel;
|
|
165
164
|
this.queryBuilder = this.instantiationService.createInstance(QueryBuilder);
|
|
166
165
|
this.memento = ( (new Memento(this.id, storageService)));
|
|
167
166
|
this.viewletState = this.memento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
|
@@ -195,6 +194,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
195
194
|
this.searchWidget.prependReplaceHistory(restoredHistory.replace);
|
|
196
195
|
}
|
|
197
196
|
}));
|
|
197
|
+
this.changedWhileHidden = this.hasSearchResults();
|
|
198
198
|
}
|
|
199
199
|
get isTreeLayoutViewVisible() {
|
|
200
200
|
return this.treeViewKey.get() ?? false;
|
|
@@ -338,8 +338,9 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
338
338
|
const useExcludesAndIgnoreFiles = typeof this.viewletState['query.useExcludesAndIgnoreFiles'] === 'boolean' ?
|
|
339
339
|
this.viewletState['query.useExcludesAndIgnoreFiles'] : true;
|
|
340
340
|
this.queryDetails = append(this.searchWidgetsContainerElement, $('.query-details'));
|
|
341
|
-
|
|
342
|
-
this.
|
|
341
|
+
const toggleQueryDetailsLabel = ( localize(8359, "Toggle Search Details"));
|
|
342
|
+
this.toggleQueryDetailsButton = append(this.queryDetails, $('.more' + ThemeIcon.asCSSSelector(searchDetailsIcon), { tabindex: 0, role: 'button', 'aria-label': toggleQueryDetailsLabel }));
|
|
343
|
+
this._register(this.hoverService.setupManagedHover(getDefaultHoverDelegate('element'), this.toggleQueryDetailsButton, toggleQueryDetailsLabel));
|
|
343
344
|
this._register(addDisposableListener(this.toggleQueryDetailsButton, EventType.CLICK, e => {
|
|
344
345
|
EventHelper.stop(e);
|
|
345
346
|
this.toggleQueryDetails(!this.accessibilityService.isScreenReaderOptimized());
|
|
@@ -364,11 +365,11 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
364
365
|
}
|
|
365
366
|
}));
|
|
366
367
|
const folderIncludesList = append(this.queryDetails, $('.file-types.includes'));
|
|
367
|
-
const filesToIncludeTitle = ( localize(
|
|
368
|
+
const filesToIncludeTitle = ( localize(8360, "files to include"));
|
|
368
369
|
append(folderIncludesList, $('h4', undefined, filesToIncludeTitle));
|
|
369
370
|
this.inputPatternIncludes = this._register(this.instantiationService.createInstance(IncludePatternInputWidget, folderIncludesList, this.contextViewService, {
|
|
370
371
|
ariaLabel: filesToIncludeTitle,
|
|
371
|
-
placeholder: ( localize(
|
|
372
|
+
placeholder: ( localize(8361, "e.g. *.ts, src/**/include")),
|
|
372
373
|
showPlaceholderOnFocus: true,
|
|
373
374
|
history: patternIncludesHistory,
|
|
374
375
|
inputBoxStyles: defaultInputBoxStyles
|
|
@@ -379,11 +380,11 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
379
380
|
this._register(this.inputPatternIncludes.onChangeSearchInEditorsBox(() => this.triggerQueryChange()));
|
|
380
381
|
this.trackInputBox(this.inputPatternIncludes.inputFocusTracker, this.inputPatternIncludesFocused);
|
|
381
382
|
const excludesList = append(this.queryDetails, $('.file-types.excludes'));
|
|
382
|
-
const excludesTitle = ( localize(
|
|
383
|
+
const excludesTitle = ( localize(8362, "files to exclude"));
|
|
383
384
|
append(excludesList, $('h4', undefined, excludesTitle));
|
|
384
385
|
this.inputPatternExcludes = this._register(this.instantiationService.createInstance(ExcludePatternInputWidget, excludesList, this.contextViewService, {
|
|
385
386
|
ariaLabel: excludesTitle,
|
|
386
|
-
placeholder: ( localize(
|
|
387
|
+
placeholder: ( localize(8363, "e.g. *.ts, src/**/exclude")),
|
|
387
388
|
showPlaceholderOnFocus: true,
|
|
388
389
|
history: patternExclusionsHistory,
|
|
389
390
|
inputBoxStyles: defaultInputBoxStyles
|
|
@@ -646,9 +647,9 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
646
647
|
);
|
|
647
648
|
});
|
|
648
649
|
const confirmation = {
|
|
649
|
-
title: ( localize(
|
|
650
|
+
title: ( localize(8364, "Replace All")),
|
|
650
651
|
message: this.buildReplaceAllConfirmationMessage(occurrences, fileCount, replaceValue),
|
|
651
|
-
primaryButton: ( localize(
|
|
652
|
+
primaryButton: ( localize(8365, "&&Replace"))
|
|
652
653
|
};
|
|
653
654
|
this.dialogService.confirm(confirmation).then(res => {
|
|
654
655
|
if (res.confirmed) {
|
|
@@ -673,96 +674,96 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
673
674
|
if (fileCount === 1) {
|
|
674
675
|
if (replaceValue) {
|
|
675
676
|
return ( localize(
|
|
676
|
-
|
|
677
|
+
8366,
|
|
677
678
|
"Replaced {0} occurrence across {1} file with '{2}'.",
|
|
678
679
|
occurrences,
|
|
679
680
|
fileCount,
|
|
680
681
|
replaceValue
|
|
681
682
|
));
|
|
682
683
|
}
|
|
683
|
-
return ( localize(
|
|
684
|
+
return ( localize(8367, "Replaced {0} occurrence across {1} file.", occurrences, fileCount));
|
|
684
685
|
}
|
|
685
686
|
if (replaceValue) {
|
|
686
687
|
return ( localize(
|
|
687
|
-
|
|
688
|
+
8368,
|
|
688
689
|
"Replaced {0} occurrence across {1} files with '{2}'.",
|
|
689
690
|
occurrences,
|
|
690
691
|
fileCount,
|
|
691
692
|
replaceValue
|
|
692
693
|
));
|
|
693
694
|
}
|
|
694
|
-
return ( localize(
|
|
695
|
+
return ( localize(8369, "Replaced {0} occurrence across {1} files.", occurrences, fileCount));
|
|
695
696
|
}
|
|
696
697
|
if (fileCount === 1) {
|
|
697
698
|
if (replaceValue) {
|
|
698
699
|
return ( localize(
|
|
699
|
-
|
|
700
|
+
8370,
|
|
700
701
|
"Replaced {0} occurrences across {1} file with '{2}'.",
|
|
701
702
|
occurrences,
|
|
702
703
|
fileCount,
|
|
703
704
|
replaceValue
|
|
704
705
|
));
|
|
705
706
|
}
|
|
706
|
-
return ( localize(
|
|
707
|
+
return ( localize(8371, "Replaced {0} occurrences across {1} file.", occurrences, fileCount));
|
|
707
708
|
}
|
|
708
709
|
if (replaceValue) {
|
|
709
710
|
return ( localize(
|
|
710
|
-
|
|
711
|
+
8372,
|
|
711
712
|
"Replaced {0} occurrences across {1} files with '{2}'.",
|
|
712
713
|
occurrences,
|
|
713
714
|
fileCount,
|
|
714
715
|
replaceValue
|
|
715
716
|
));
|
|
716
717
|
}
|
|
717
|
-
return ( localize(
|
|
718
|
+
return ( localize(8373, "Replaced {0} occurrences across {1} files.", occurrences, fileCount));
|
|
718
719
|
}
|
|
719
720
|
buildReplaceAllConfirmationMessage(occurrences, fileCount, replaceValue) {
|
|
720
721
|
if (occurrences === 1) {
|
|
721
722
|
if (fileCount === 1) {
|
|
722
723
|
if (replaceValue) {
|
|
723
724
|
return ( localize(
|
|
724
|
-
|
|
725
|
+
8374,
|
|
725
726
|
"Replace {0} occurrence across {1} file with '{2}'?",
|
|
726
727
|
occurrences,
|
|
727
728
|
fileCount,
|
|
728
729
|
replaceValue
|
|
729
730
|
));
|
|
730
731
|
}
|
|
731
|
-
return ( localize(
|
|
732
|
+
return ( localize(8375, "Replace {0} occurrence across {1} file?", occurrences, fileCount));
|
|
732
733
|
}
|
|
733
734
|
if (replaceValue) {
|
|
734
735
|
return ( localize(
|
|
735
|
-
|
|
736
|
+
8376,
|
|
736
737
|
"Replace {0} occurrence across {1} files with '{2}'?",
|
|
737
738
|
occurrences,
|
|
738
739
|
fileCount,
|
|
739
740
|
replaceValue
|
|
740
741
|
));
|
|
741
742
|
}
|
|
742
|
-
return ( localize(
|
|
743
|
+
return ( localize(8377, "Replace {0} occurrence across {1} files?", occurrences, fileCount));
|
|
743
744
|
}
|
|
744
745
|
if (fileCount === 1) {
|
|
745
746
|
if (replaceValue) {
|
|
746
747
|
return ( localize(
|
|
747
|
-
|
|
748
|
+
8378,
|
|
748
749
|
"Replace {0} occurrences across {1} file with '{2}'?",
|
|
749
750
|
occurrences,
|
|
750
751
|
fileCount,
|
|
751
752
|
replaceValue
|
|
752
753
|
));
|
|
753
754
|
}
|
|
754
|
-
return ( localize(
|
|
755
|
+
return ( localize(8379, "Replace {0} occurrences across {1} file?", occurrences, fileCount));
|
|
755
756
|
}
|
|
756
757
|
if (replaceValue) {
|
|
757
758
|
return ( localize(
|
|
758
|
-
|
|
759
|
+
8380,
|
|
759
760
|
"Replace {0} occurrences across {1} files with '{2}'?",
|
|
760
761
|
occurrences,
|
|
761
762
|
fileCount,
|
|
762
763
|
replaceValue
|
|
763
764
|
));
|
|
764
765
|
}
|
|
765
|
-
return ( localize(
|
|
766
|
+
return ( localize(8381, "Replace {0} occurrences across {1} files?", occurrences, fileCount));
|
|
766
767
|
}
|
|
767
768
|
clearMessage() {
|
|
768
769
|
this.searchWithoutFolderMessageElement = undefined;
|
|
@@ -1127,7 +1128,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1127
1128
|
this.searchWidget.clear();
|
|
1128
1129
|
}
|
|
1129
1130
|
this.viewModel.cancelSearch();
|
|
1130
|
-
this.tree.ariaLabel = ( localize(
|
|
1131
|
+
this.tree.ariaLabel = ( localize(8382, "Empty Search"));
|
|
1131
1132
|
this.accessibilitySignalService.playSignal(AccessibilitySignal.clear);
|
|
1132
1133
|
this.reLayout();
|
|
1133
1134
|
}
|
|
@@ -1321,7 +1322,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1321
1322
|
isInNotebookCellOutput
|
|
1322
1323
|
}
|
|
1323
1324
|
};
|
|
1324
|
-
const excludePattern = this.inputPatternExcludes.getValue();
|
|
1325
|
+
const excludePattern = [{ pattern: this.inputPatternExcludes.getValue() }];
|
|
1325
1326
|
const includePattern = this.inputPatternIncludes.getValue();
|
|
1326
1327
|
const charsPerLine = content.isRegExp ? 10000 : 1000;
|
|
1327
1328
|
const options = {
|
|
@@ -1371,7 +1372,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1371
1372
|
}
|
|
1372
1373
|
else {
|
|
1373
1374
|
const nonExistantPath = query.folderQueries[0].folder.fsPath;
|
|
1374
|
-
const searchPathNotFoundError = ( localize(
|
|
1375
|
+
const searchPathNotFoundError = ( localize(8383, "Search path not found: {0}", nonExistantPath));
|
|
1375
1376
|
return Promise.reject(( (new Error(searchPathNotFoundError))));
|
|
1376
1377
|
}
|
|
1377
1378
|
return undefined;
|
|
@@ -1429,7 +1430,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1429
1430
|
else if (this.inputPatternIncludes.onlySearchInOpenEditors()) {
|
|
1430
1431
|
if (hasIncludes && hasExcludes) {
|
|
1431
1432
|
message = ( localize(
|
|
1432
|
-
|
|
1433
|
+
8384,
|
|
1433
1434
|
"No results found in open editors matching '{0}' excluding '{1}' - ",
|
|
1434
1435
|
includePatternText,
|
|
1435
1436
|
excludePatternText
|
|
@@ -1437,21 +1438,21 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1437
1438
|
}
|
|
1438
1439
|
else if (hasIncludes) {
|
|
1439
1440
|
message = ( localize(
|
|
1440
|
-
|
|
1441
|
+
8385,
|
|
1441
1442
|
"No results found in open editors matching '{0}' - ",
|
|
1442
1443
|
includePatternText
|
|
1443
1444
|
));
|
|
1444
1445
|
}
|
|
1445
1446
|
else if (hasExcludes) {
|
|
1446
1447
|
message = ( localize(
|
|
1447
|
-
|
|
1448
|
+
8386,
|
|
1448
1449
|
"No results found in open editors excluding '{0}' - ",
|
|
1449
1450
|
excludePatternText
|
|
1450
1451
|
));
|
|
1451
1452
|
}
|
|
1452
1453
|
else {
|
|
1453
1454
|
message = ( localize(
|
|
1454
|
-
|
|
1455
|
+
8387,
|
|
1455
1456
|
"No results found in open editors. Review your settings for configured exclusions and check your gitignore files - "
|
|
1456
1457
|
));
|
|
1457
1458
|
}
|
|
@@ -1459,21 +1460,21 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1459
1460
|
else {
|
|
1460
1461
|
if (hasIncludes && hasExcludes) {
|
|
1461
1462
|
message = ( localize(
|
|
1462
|
-
|
|
1463
|
+
8388,
|
|
1463
1464
|
"No results found in '{0}' excluding '{1}' - ",
|
|
1464
1465
|
includePatternText,
|
|
1465
1466
|
excludePatternText
|
|
1466
1467
|
));
|
|
1467
1468
|
}
|
|
1468
1469
|
else if (hasIncludes) {
|
|
1469
|
-
message = ( localize(
|
|
1470
|
+
message = ( localize(8389, "No results found in '{0}' - ", includePatternText));
|
|
1470
1471
|
}
|
|
1471
1472
|
else if (hasExcludes) {
|
|
1472
|
-
message = ( localize(
|
|
1473
|
+
message = ( localize(8390, "No results found excluding '{0}' - ", excludePatternText));
|
|
1473
1474
|
}
|
|
1474
1475
|
else {
|
|
1475
1476
|
message = ( localize(
|
|
1476
|
-
|
|
1477
|
+
8391,
|
|
1477
1478
|
"No results found. Review your settings for configured exclusions and check your gitignore files - "
|
|
1478
1479
|
));
|
|
1479
1480
|
}
|
|
@@ -1482,20 +1483,20 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1482
1483
|
const messageEl = this.clearMessage();
|
|
1483
1484
|
append(messageEl, message);
|
|
1484
1485
|
if (!completed) {
|
|
1485
|
-
const searchAgainButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(
|
|
1486
|
+
const searchAgainButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(8392, "Search again")), () => this.triggerQueryChange({ preserveFocus: false }), this.hoverService))));
|
|
1486
1487
|
append(messageEl, searchAgainButton.element);
|
|
1487
1488
|
}
|
|
1488
1489
|
else if (hasIncludes || hasExcludes) {
|
|
1489
|
-
const searchAgainButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(
|
|
1490
|
+
const searchAgainButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(8393, "Search again in all files")), this.onSearchAgain.bind(this), this.hoverService))));
|
|
1490
1491
|
append(messageEl, searchAgainButton.element);
|
|
1491
1492
|
}
|
|
1492
1493
|
else {
|
|
1493
|
-
const openSettingsButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(
|
|
1494
|
+
const openSettingsButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(8394, "Open Settings")), this.onOpenSettings.bind(this), this.hoverService))));
|
|
1494
1495
|
append(messageEl, openSettingsButton.element);
|
|
1495
1496
|
}
|
|
1496
1497
|
if (completed) {
|
|
1497
1498
|
append(messageEl, $('span', undefined, ' - '));
|
|
1498
|
-
const learnMoreButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(
|
|
1499
|
+
const learnMoreButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(8395, "Learn More")), this.onLearnMore.bind(this), this.hoverService))));
|
|
1499
1500
|
append(messageEl, learnMoreButton.element);
|
|
1500
1501
|
}
|
|
1501
1502
|
if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) {
|
|
@@ -1506,7 +1507,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1506
1507
|
else {
|
|
1507
1508
|
this.viewModel.searchResult.toggleHighlights(this.isVisible());
|
|
1508
1509
|
status(( localize(
|
|
1509
|
-
|
|
1510
|
+
8396,
|
|
1510
1511
|
"Search returned {0} results in {1} files",
|
|
1511
1512
|
this.viewModel.searchResult.count(this.aiResultsVisible),
|
|
1512
1513
|
this.viewModel.searchResult.fileCount()
|
|
@@ -1514,7 +1515,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1514
1515
|
}
|
|
1515
1516
|
if (completed && completed.limitHit) {
|
|
1516
1517
|
completed.messages.push({ type: TextSearchCompleteMessageType.Warning, text: ( localize(
|
|
1517
|
-
|
|
1518
|
+
8397,
|
|
1518
1519
|
"The result set only contains a subset of all matches. Be more specific in your search to narrow down the results."
|
|
1519
1520
|
)) });
|
|
1520
1521
|
}
|
|
@@ -1610,25 +1611,25 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1610
1611
|
const messageEl = this.clearMessage();
|
|
1611
1612
|
const resultMsg = clear ? '' : this.buildResultCountMessage(resultCount, fileCount);
|
|
1612
1613
|
this.tree.ariaLabel = resultMsg + ( localize(
|
|
1613
|
-
|
|
1614
|
+
8398,
|
|
1614
1615
|
" - Search: {0}",
|
|
1615
1616
|
this.searchResult.query?.contentPattern.pattern ?? ''
|
|
1616
1617
|
));
|
|
1617
1618
|
append(messageEl, resultMsg);
|
|
1618
1619
|
if (fileCount > 0) {
|
|
1619
1620
|
if (disregardExcludesAndIgnores) {
|
|
1620
|
-
const excludesDisabledMessage = ' - ' + ( localize(
|
|
1621
|
-
const enableExcludesButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(
|
|
1621
|
+
const excludesDisabledMessage = ' - ' + ( localize(8399, "exclude settings and ignore files are disabled")) + ' ';
|
|
1622
|
+
const enableExcludesButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(8400, "enable")), this.onEnableExcludes.bind(this), this.hoverService, ( localize(8401, "Use Exclude Settings and Ignore Files"))))));
|
|
1622
1623
|
append(messageEl, $('span', undefined, excludesDisabledMessage, '(', enableExcludesButton.element, ')'));
|
|
1623
1624
|
}
|
|
1624
1625
|
if (onlyOpenEditors) {
|
|
1625
|
-
const searchingInOpenMessage = ' - ' + ( localize(
|
|
1626
|
-
const disableOpenEditorsButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(
|
|
1626
|
+
const searchingInOpenMessage = ' - ' + ( localize(8402, "searching only in open files")) + ' ';
|
|
1627
|
+
const disableOpenEditorsButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(8403, "disable")), this.onDisableSearchInOpenEditors.bind(this), this.hoverService, ( localize(8404, "Search in entire workspace"))))));
|
|
1627
1628
|
append(messageEl, $('span', undefined, searchingInOpenMessage, '(', disableOpenEditorsButton.element, ')'));
|
|
1628
1629
|
}
|
|
1629
1630
|
append(messageEl, ' - ');
|
|
1630
|
-
const openInEditorTooltip = appendKeyBindingLabel(( localize(
|
|
1631
|
-
const openInEditorButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(
|
|
1631
|
+
const openInEditorTooltip = appendKeyBindingLabel(( localize(8405, "Copy current search results to an editor")), this.keybindingService.lookupKeybinding(SearchCommandIds.OpenInEditorCommandId));
|
|
1632
|
+
const openInEditorButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(8406, "Open in editor")), () => this.instantiationService.invokeFunction(createEditorFromSearchResult, this.searchResult, this.searchIncludePattern.getValue(), this.searchExcludePattern.getValue(), this.searchIncludePattern.onlySearchInOpenEditors()), this.hoverService, openInEditorTooltip))));
|
|
1632
1633
|
append(messageEl, openInEditorButton.element);
|
|
1633
1634
|
this.reLayout();
|
|
1634
1635
|
}
|
|
@@ -1645,25 +1646,25 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1645
1646
|
}
|
|
1646
1647
|
buildResultCountMessage(resultCount, fileCount) {
|
|
1647
1648
|
if (resultCount === 1 && fileCount === 1) {
|
|
1648
|
-
return ( localize(
|
|
1649
|
+
return ( localize(8407, "{0} result in {1} file", resultCount, fileCount));
|
|
1649
1650
|
}
|
|
1650
1651
|
else if (resultCount === 1) {
|
|
1651
|
-
return ( localize(
|
|
1652
|
+
return ( localize(8408, "{0} result in {1} files", resultCount, fileCount));
|
|
1652
1653
|
}
|
|
1653
1654
|
else if (fileCount === 1) {
|
|
1654
|
-
return ( localize(
|
|
1655
|
+
return ( localize(8409, "{0} results in {1} file", resultCount, fileCount));
|
|
1655
1656
|
}
|
|
1656
1657
|
else {
|
|
1657
|
-
return ( localize(
|
|
1658
|
+
return ( localize(8410, "{0} results in {1} files", resultCount, fileCount));
|
|
1658
1659
|
}
|
|
1659
1660
|
}
|
|
1660
1661
|
showSearchWithoutFolderMessage() {
|
|
1661
1662
|
this.searchWithoutFolderMessageElement = this.clearMessage();
|
|
1662
1663
|
const textEl = append(this.searchWithoutFolderMessageElement, $('p', undefined, ( localize(
|
|
1663
|
-
|
|
1664
|
+
8411,
|
|
1664
1665
|
"You have not opened or specified a folder. Only open files are currently searched - "
|
|
1665
1666
|
))));
|
|
1666
|
-
const openFolderButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(
|
|
1667
|
+
const openFolderButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(8412, "Open Folder")), () => {
|
|
1667
1668
|
this.commandService.executeCommand(isMacintosh && isNative ? OpenFileFolderAction.ID : OpenFolderAction.ID).catch(err => onUnexpectedError(err));
|
|
1668
1669
|
}, this.hoverService))));
|
|
1669
1670
|
append(textEl, openFolderButton.element);
|
|
@@ -75,10 +75,10 @@ function stopPropagationForMultiLineDownwards(event, value, textarea) {
|
|
|
75
75
|
let SearchWidget = class SearchWidget extends Widget {
|
|
76
76
|
static { SearchWidget_1 = this; }
|
|
77
77
|
static { this.INPUT_MAX_HEIGHT = 134; }
|
|
78
|
-
static { this.REPLACE_ALL_DISABLED_LABEL = ( localize(
|
|
78
|
+
static { this.REPLACE_ALL_DISABLED_LABEL = ( localize(8413, "Replace All (Submit Search to Enable)")); }
|
|
79
79
|
static { this.REPLACE_ALL_ENABLED_LABEL = (keyBindingService2) => {
|
|
80
80
|
const kb = keyBindingService2.lookupKeybinding(ReplaceAllAction.ID);
|
|
81
|
-
return appendKeyBindingLabel(( localize(
|
|
81
|
+
return appendKeyBindingLabel(( localize(8414, "Replace All")), kb);
|
|
82
82
|
}; }
|
|
83
83
|
constructor(container, options, contextViewService, contextKeyService, keybindingService, clipboardServce, configurationService, accessibilityService, contextMenuService, instantiationService, editorService) {
|
|
84
84
|
super();
|
|
@@ -274,7 +274,7 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
274
274
|
buttonSecondaryForeground: undefined,
|
|
275
275
|
buttonSecondaryHoverBackground: undefined,
|
|
276
276
|
buttonSeparator: undefined,
|
|
277
|
-
title: ( localize(
|
|
277
|
+
title: ( localize(8415, "Toggle Replace")),
|
|
278
278
|
hoverDelegate: getDefaultHoverDelegate('element'),
|
|
279
279
|
};
|
|
280
280
|
this.toggleReplaceButton = this._register(( (new Button(parent, opts))));
|
|
@@ -285,9 +285,9 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
285
285
|
}
|
|
286
286
|
renderSearchInput(parent, options) {
|
|
287
287
|
const inputOptions = {
|
|
288
|
-
label: ( localize(
|
|
288
|
+
label: ( localize(8416, 'Search: Type Search Term and press Enter to search')),
|
|
289
289
|
validation: (value) => this.validateSearchInput(value),
|
|
290
|
-
placeholder: ( localize(
|
|
290
|
+
placeholder: ( localize(8417, "Search")),
|
|
291
291
|
appendCaseSensitiveLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding(SearchCommandIds.ToggleCaseSensitiveCommandId)),
|
|
292
292
|
appendWholeWordsLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding(SearchCommandIds.ToggleWholeWordCommandId)),
|
|
293
293
|
appendRegexLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding(SearchCommandIds.ToggleRegexCommandId)),
|
|
@@ -341,7 +341,7 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
341
341
|
this._register(this.searchInputFocusTracker.onDidBlur(() => this.searchInputBoxFocused.set(false)));
|
|
342
342
|
this.showContextToggle = ( (new Toggle({
|
|
343
343
|
isChecked: false,
|
|
344
|
-
title: appendKeyBindingLabel(( localize(
|
|
344
|
+
title: appendKeyBindingLabel(( localize(8418, "Toggle Context Lines")), this.keybindingService.lookupKeybinding(ToggleSearchEditorContextLinesCommandId)),
|
|
345
345
|
icon: searchShowContextIcon,
|
|
346
346
|
hoverDelegate: getDefaultHoverDelegate('element'),
|
|
347
347
|
...defaultToggleStyles
|
|
@@ -387,8 +387,8 @@ let SearchWidget = class SearchWidget extends Widget {
|
|
|
387
387
|
this.replaceContainer = append(parent, $('.replace-container.disabled'));
|
|
388
388
|
const replaceBox = append(this.replaceContainer, $('.replace-input'));
|
|
389
389
|
this.replaceInput = this._register(( (new ContextScopedReplaceInput(replaceBox, this.contextViewService, {
|
|
390
|
-
label: ( localize(
|
|
391
|
-
placeholder: ( localize(
|
|
390
|
+
label: ( localize(8419, 'Replace: Type replace term and press Enter to preview')),
|
|
391
|
+
placeholder: ( localize(8420, "Replace")),
|
|
392
392
|
appendPreserveCaseLabel: appendKeyBindingLabel('', this.keybindingService.lookupKeybinding(SearchCommandIds.TogglePreserveCaseId)),
|
|
393
393
|
history: options.replaceHistory,
|
|
394
394
|
showHistoryHint: () => showHistoryKeybindingHint(this.keybindingService),
|
|
@@ -45,7 +45,7 @@ const DecreaseSearchEditorContextLinesCommandId = 'decreaseSearchEditorContextLi
|
|
|
45
45
|
const RerunSearchEditorSearchCommandId = 'rerunSearchEditorSearch';
|
|
46
46
|
const CleanSearchEditorStateCommandId = 'cleanSearchEditorState';
|
|
47
47
|
const SelectAllSearchEditorMatchesCommandId = 'selectAllSearchEditorMatches';
|
|
48
|
-
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(SearchEditor, SearchEditor.ID, ( localize(
|
|
48
|
+
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(SearchEditor, SearchEditor.ID, ( localize(3440, "Search Editor"))), [
|
|
49
49
|
( (new SyncDescriptor(SearchEditorInput)))
|
|
50
50
|
]);
|
|
51
51
|
let SearchEditorContribution = class SearchEditorContribution {
|
|
@@ -53,7 +53,7 @@ let SearchEditorContribution = class SearchEditorContribution {
|
|
|
53
53
|
constructor(editorResolverService, instantiationService) {
|
|
54
54
|
editorResolverService.registerEditor('*' + SEARCH_EDITOR_EXT, {
|
|
55
55
|
id: SearchEditorInput.ID,
|
|
56
|
-
label: ( localize(
|
|
56
|
+
label: ( localize(3441, "Search Editor")),
|
|
57
57
|
detail: DEFAULT_EDITOR_ASSOCIATION.providerDisplayName,
|
|
58
58
|
priority: RegisteredEditorPriority.default,
|
|
59
59
|
}, {
|
|
@@ -120,7 +120,7 @@ CommandsRegistry.registerCommand(CleanSearchEditorStateCommandId, (accessor) =>
|
|
|
120
120
|
activeEditorPane.cleanState();
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
|
-
const category = ( localize2(
|
|
123
|
+
const category = ( localize2(3442, 'Search Editor'));
|
|
124
124
|
const translateLegacyConfig = (legacyConfig = {}) => {
|
|
125
125
|
const config = {};
|
|
126
126
|
const overrides = {
|
|
@@ -162,7 +162,7 @@ registerAction2(class extends Action2 {
|
|
|
162
162
|
constructor() {
|
|
163
163
|
super({
|
|
164
164
|
id: 'search.searchEditor.action.deleteFileResults',
|
|
165
|
-
title: ( localize2(
|
|
165
|
+
title: ( localize2(3443, 'Delete File Results')),
|
|
166
166
|
keybinding: {
|
|
167
167
|
weight: KeybindingWeight.EditorContrib,
|
|
168
168
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backspace,
|
|
@@ -183,7 +183,7 @@ registerAction2(class extends Action2 {
|
|
|
183
183
|
constructor() {
|
|
184
184
|
super({
|
|
185
185
|
id: OpenNewEditorCommandId,
|
|
186
|
-
title: ( localize2(
|
|
186
|
+
title: ( localize2(3444, 'New Search Editor')),
|
|
187
187
|
category,
|
|
188
188
|
f1: true,
|
|
189
189
|
metadata: openArgMetadata
|
|
@@ -197,7 +197,7 @@ registerAction2(class extends Action2 {
|
|
|
197
197
|
constructor() {
|
|
198
198
|
super({
|
|
199
199
|
id: OpenEditorCommandId,
|
|
200
|
-
title: ( localize2(
|
|
200
|
+
title: ( localize2(3445, 'Open Search Editor')),
|
|
201
201
|
category,
|
|
202
202
|
f1: true,
|
|
203
203
|
metadata: openArgMetadata
|
|
@@ -211,7 +211,7 @@ registerAction2(class extends Action2 {
|
|
|
211
211
|
constructor() {
|
|
212
212
|
super({
|
|
213
213
|
id: OpenNewEditorToSideCommandId,
|
|
214
|
-
title: ( localize2(
|
|
214
|
+
title: ( localize2(3446, 'Open New Search Editor to the Side')),
|
|
215
215
|
category,
|
|
216
216
|
f1: true,
|
|
217
217
|
metadata: openArgMetadata
|
|
@@ -225,7 +225,7 @@ registerAction2(class extends Action2 {
|
|
|
225
225
|
constructor() {
|
|
226
226
|
super({
|
|
227
227
|
id: OpenInEditorCommandId,
|
|
228
|
-
title: ( localize2(
|
|
228
|
+
title: ( localize2(3447, 'Open Results in Editor')),
|
|
229
229
|
category,
|
|
230
230
|
f1: true,
|
|
231
231
|
keybinding: {
|
|
@@ -251,7 +251,7 @@ registerAction2(class extends Action2 {
|
|
|
251
251
|
constructor() {
|
|
252
252
|
super({
|
|
253
253
|
id: RerunSearchEditorSearchCommandId,
|
|
254
|
-
title: ( localize2(
|
|
254
|
+
title: ( localize2(3448, 'Search Again')),
|
|
255
255
|
category,
|
|
256
256
|
keybinding: {
|
|
257
257
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyR,
|
|
@@ -282,7 +282,7 @@ registerAction2(class extends Action2 {
|
|
|
282
282
|
constructor() {
|
|
283
283
|
super({
|
|
284
284
|
id: FocusQueryEditorWidgetCommandId,
|
|
285
|
-
title: ( localize2(
|
|
285
|
+
title: ( localize2(3449, 'Focus Search Editor Input')),
|
|
286
286
|
category,
|
|
287
287
|
f1: true,
|
|
288
288
|
precondition: InSearchEditor,
|
|
@@ -304,7 +304,7 @@ registerAction2(class extends Action2 {
|
|
|
304
304
|
constructor() {
|
|
305
305
|
super({
|
|
306
306
|
id: FocusQueryEditorFilesToIncludeCommandId,
|
|
307
|
-
title: ( localize2(
|
|
307
|
+
title: ( localize2(3450, 'Focus Search Editor Files to Include')),
|
|
308
308
|
category,
|
|
309
309
|
f1: true,
|
|
310
310
|
precondition: InSearchEditor,
|
|
@@ -322,7 +322,7 @@ registerAction2(class extends Action2 {
|
|
|
322
322
|
constructor() {
|
|
323
323
|
super({
|
|
324
324
|
id: FocusQueryEditorFilesToExcludeCommandId,
|
|
325
|
-
title: ( localize2(
|
|
325
|
+
title: ( localize2(3451, 'Focus Search Editor Files to Exclude')),
|
|
326
326
|
category,
|
|
327
327
|
f1: true,
|
|
328
328
|
precondition: InSearchEditor,
|
|
@@ -340,7 +340,7 @@ registerAction2(class extends Action2 {
|
|
|
340
340
|
constructor() {
|
|
341
341
|
super({
|
|
342
342
|
id: ToggleSearchEditorCaseSensitiveCommandId,
|
|
343
|
-
title: ( localize2(
|
|
343
|
+
title: ( localize2(3452, 'Toggle Match Case')),
|
|
344
344
|
category,
|
|
345
345
|
f1: true,
|
|
346
346
|
precondition: InSearchEditor,
|
|
@@ -358,7 +358,7 @@ registerAction2(class extends Action2 {
|
|
|
358
358
|
constructor() {
|
|
359
359
|
super({
|
|
360
360
|
id: ToggleSearchEditorWholeWordCommandId,
|
|
361
|
-
title: ( localize2(
|
|
361
|
+
title: ( localize2(3453, 'Toggle Match Whole Word')),
|
|
362
362
|
category,
|
|
363
363
|
f1: true,
|
|
364
364
|
precondition: InSearchEditor,
|
|
@@ -376,7 +376,7 @@ registerAction2(class extends Action2 {
|
|
|
376
376
|
constructor() {
|
|
377
377
|
super({
|
|
378
378
|
id: ToggleSearchEditorRegexCommandId,
|
|
379
|
-
title: ( localize2(
|
|
379
|
+
title: ( localize2(3454, "Toggle Use Regular Expression")),
|
|
380
380
|
category,
|
|
381
381
|
f1: true,
|
|
382
382
|
precondition: InSearchEditor,
|
|
@@ -394,7 +394,7 @@ registerAction2(class extends Action2 {
|
|
|
394
394
|
constructor() {
|
|
395
395
|
super({
|
|
396
396
|
id: ToggleSearchEditorContextLinesCommandId,
|
|
397
|
-
title: ( localize2(
|
|
397
|
+
title: ( localize2(3455, "Toggle Context Lines")),
|
|
398
398
|
category,
|
|
399
399
|
f1: true,
|
|
400
400
|
precondition: InSearchEditor,
|
|
@@ -413,7 +413,7 @@ registerAction2(class extends Action2 {
|
|
|
413
413
|
constructor() {
|
|
414
414
|
super({
|
|
415
415
|
id: IncreaseSearchEditorContextLinesCommandId,
|
|
416
|
-
title: ( localize2(
|
|
416
|
+
title: ( localize2(3456, "Increase Context Lines")),
|
|
417
417
|
category,
|
|
418
418
|
f1: true,
|
|
419
419
|
precondition: InSearchEditor,
|
|
@@ -429,7 +429,7 @@ registerAction2(class extends Action2 {
|
|
|
429
429
|
constructor() {
|
|
430
430
|
super({
|
|
431
431
|
id: DecreaseSearchEditorContextLinesCommandId,
|
|
432
|
-
title: ( localize2(
|
|
432
|
+
title: ( localize2(3457, "Decrease Context Lines")),
|
|
433
433
|
category,
|
|
434
434
|
f1: true,
|
|
435
435
|
precondition: InSearchEditor,
|
|
@@ -445,7 +445,7 @@ registerAction2(class extends Action2 {
|
|
|
445
445
|
constructor() {
|
|
446
446
|
super({
|
|
447
447
|
id: SelectAllSearchEditorMatchesCommandId,
|
|
448
|
-
title: ( localize2(
|
|
448
|
+
title: ( localize2(3458, "Select All Matches")),
|
|
449
449
|
category,
|
|
450
450
|
f1: true,
|
|
451
451
|
precondition: InSearchEditor,
|
|
@@ -463,7 +463,7 @@ registerAction2(class OpenSearchEditorAction extends Action2 {
|
|
|
463
463
|
constructor() {
|
|
464
464
|
super({
|
|
465
465
|
id: 'search.action.openNewEditorFromView',
|
|
466
|
-
title: ( localize(
|
|
466
|
+
title: ( localize(3459, "Open New Search Editor")),
|
|
467
467
|
category,
|
|
468
468
|
icon: searchNewEditorIcon,
|
|
469
469
|
menu: [{
|