@codingame/monaco-vscode-search-service-override 9.0.0 → 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 +73 -73
- 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 +12 -12
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +53 -53
- 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 +9 -9
- 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 +2 -2
|
@@ -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; }
|
|
@@ -338,7 +338,7 @@ 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
|
-
const toggleQueryDetailsLabel = ( localize(
|
|
341
|
+
const toggleQueryDetailsLabel = ( localize(8359, "Toggle Search Details"));
|
|
342
342
|
this.toggleQueryDetailsButton = append(this.queryDetails, $('.more' + ThemeIcon.asCSSSelector(searchDetailsIcon), { tabindex: 0, role: 'button', 'aria-label': toggleQueryDetailsLabel }));
|
|
343
343
|
this._register(this.hoverService.setupManagedHover(getDefaultHoverDelegate('element'), this.toggleQueryDetailsButton, toggleQueryDetailsLabel));
|
|
344
344
|
this._register(addDisposableListener(this.toggleQueryDetailsButton, EventType.CLICK, e => {
|
|
@@ -365,11 +365,11 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
365
365
|
}
|
|
366
366
|
}));
|
|
367
367
|
const folderIncludesList = append(this.queryDetails, $('.file-types.includes'));
|
|
368
|
-
const filesToIncludeTitle = ( localize(
|
|
368
|
+
const filesToIncludeTitle = ( localize(8360, "files to include"));
|
|
369
369
|
append(folderIncludesList, $('h4', undefined, filesToIncludeTitle));
|
|
370
370
|
this.inputPatternIncludes = this._register(this.instantiationService.createInstance(IncludePatternInputWidget, folderIncludesList, this.contextViewService, {
|
|
371
371
|
ariaLabel: filesToIncludeTitle,
|
|
372
|
-
placeholder: ( localize(
|
|
372
|
+
placeholder: ( localize(8361, "e.g. *.ts, src/**/include")),
|
|
373
373
|
showPlaceholderOnFocus: true,
|
|
374
374
|
history: patternIncludesHistory,
|
|
375
375
|
inputBoxStyles: defaultInputBoxStyles
|
|
@@ -380,11 +380,11 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
380
380
|
this._register(this.inputPatternIncludes.onChangeSearchInEditorsBox(() => this.triggerQueryChange()));
|
|
381
381
|
this.trackInputBox(this.inputPatternIncludes.inputFocusTracker, this.inputPatternIncludesFocused);
|
|
382
382
|
const excludesList = append(this.queryDetails, $('.file-types.excludes'));
|
|
383
|
-
const excludesTitle = ( localize(
|
|
383
|
+
const excludesTitle = ( localize(8362, "files to exclude"));
|
|
384
384
|
append(excludesList, $('h4', undefined, excludesTitle));
|
|
385
385
|
this.inputPatternExcludes = this._register(this.instantiationService.createInstance(ExcludePatternInputWidget, excludesList, this.contextViewService, {
|
|
386
386
|
ariaLabel: excludesTitle,
|
|
387
|
-
placeholder: ( localize(
|
|
387
|
+
placeholder: ( localize(8363, "e.g. *.ts, src/**/exclude")),
|
|
388
388
|
showPlaceholderOnFocus: true,
|
|
389
389
|
history: patternExclusionsHistory,
|
|
390
390
|
inputBoxStyles: defaultInputBoxStyles
|
|
@@ -647,9 +647,9 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
647
647
|
);
|
|
648
648
|
});
|
|
649
649
|
const confirmation = {
|
|
650
|
-
title: ( localize(
|
|
650
|
+
title: ( localize(8364, "Replace All")),
|
|
651
651
|
message: this.buildReplaceAllConfirmationMessage(occurrences, fileCount, replaceValue),
|
|
652
|
-
primaryButton: ( localize(
|
|
652
|
+
primaryButton: ( localize(8365, "&&Replace"))
|
|
653
653
|
};
|
|
654
654
|
this.dialogService.confirm(confirmation).then(res => {
|
|
655
655
|
if (res.confirmed) {
|
|
@@ -674,96 +674,96 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
674
674
|
if (fileCount === 1) {
|
|
675
675
|
if (replaceValue) {
|
|
676
676
|
return ( localize(
|
|
677
|
-
|
|
677
|
+
8366,
|
|
678
678
|
"Replaced {0} occurrence across {1} file with '{2}'.",
|
|
679
679
|
occurrences,
|
|
680
680
|
fileCount,
|
|
681
681
|
replaceValue
|
|
682
682
|
));
|
|
683
683
|
}
|
|
684
|
-
return ( localize(
|
|
684
|
+
return ( localize(8367, "Replaced {0} occurrence across {1} file.", occurrences, fileCount));
|
|
685
685
|
}
|
|
686
686
|
if (replaceValue) {
|
|
687
687
|
return ( localize(
|
|
688
|
-
|
|
688
|
+
8368,
|
|
689
689
|
"Replaced {0} occurrence across {1} files with '{2}'.",
|
|
690
690
|
occurrences,
|
|
691
691
|
fileCount,
|
|
692
692
|
replaceValue
|
|
693
693
|
));
|
|
694
694
|
}
|
|
695
|
-
return ( localize(
|
|
695
|
+
return ( localize(8369, "Replaced {0} occurrence across {1} files.", occurrences, fileCount));
|
|
696
696
|
}
|
|
697
697
|
if (fileCount === 1) {
|
|
698
698
|
if (replaceValue) {
|
|
699
699
|
return ( localize(
|
|
700
|
-
|
|
700
|
+
8370,
|
|
701
701
|
"Replaced {0} occurrences across {1} file with '{2}'.",
|
|
702
702
|
occurrences,
|
|
703
703
|
fileCount,
|
|
704
704
|
replaceValue
|
|
705
705
|
));
|
|
706
706
|
}
|
|
707
|
-
return ( localize(
|
|
707
|
+
return ( localize(8371, "Replaced {0} occurrences across {1} file.", occurrences, fileCount));
|
|
708
708
|
}
|
|
709
709
|
if (replaceValue) {
|
|
710
710
|
return ( localize(
|
|
711
|
-
|
|
711
|
+
8372,
|
|
712
712
|
"Replaced {0} occurrences across {1} files with '{2}'.",
|
|
713
713
|
occurrences,
|
|
714
714
|
fileCount,
|
|
715
715
|
replaceValue
|
|
716
716
|
));
|
|
717
717
|
}
|
|
718
|
-
return ( localize(
|
|
718
|
+
return ( localize(8373, "Replaced {0} occurrences across {1} files.", occurrences, fileCount));
|
|
719
719
|
}
|
|
720
720
|
buildReplaceAllConfirmationMessage(occurrences, fileCount, replaceValue) {
|
|
721
721
|
if (occurrences === 1) {
|
|
722
722
|
if (fileCount === 1) {
|
|
723
723
|
if (replaceValue) {
|
|
724
724
|
return ( localize(
|
|
725
|
-
|
|
725
|
+
8374,
|
|
726
726
|
"Replace {0} occurrence across {1} file with '{2}'?",
|
|
727
727
|
occurrences,
|
|
728
728
|
fileCount,
|
|
729
729
|
replaceValue
|
|
730
730
|
));
|
|
731
731
|
}
|
|
732
|
-
return ( localize(
|
|
732
|
+
return ( localize(8375, "Replace {0} occurrence across {1} file?", occurrences, fileCount));
|
|
733
733
|
}
|
|
734
734
|
if (replaceValue) {
|
|
735
735
|
return ( localize(
|
|
736
|
-
|
|
736
|
+
8376,
|
|
737
737
|
"Replace {0} occurrence across {1} files with '{2}'?",
|
|
738
738
|
occurrences,
|
|
739
739
|
fileCount,
|
|
740
740
|
replaceValue
|
|
741
741
|
));
|
|
742
742
|
}
|
|
743
|
-
return ( localize(
|
|
743
|
+
return ( localize(8377, "Replace {0} occurrence across {1} files?", occurrences, fileCount));
|
|
744
744
|
}
|
|
745
745
|
if (fileCount === 1) {
|
|
746
746
|
if (replaceValue) {
|
|
747
747
|
return ( localize(
|
|
748
|
-
|
|
748
|
+
8378,
|
|
749
749
|
"Replace {0} occurrences across {1} file with '{2}'?",
|
|
750
750
|
occurrences,
|
|
751
751
|
fileCount,
|
|
752
752
|
replaceValue
|
|
753
753
|
));
|
|
754
754
|
}
|
|
755
|
-
return ( localize(
|
|
755
|
+
return ( localize(8379, "Replace {0} occurrences across {1} file?", occurrences, fileCount));
|
|
756
756
|
}
|
|
757
757
|
if (replaceValue) {
|
|
758
758
|
return ( localize(
|
|
759
|
-
|
|
759
|
+
8380,
|
|
760
760
|
"Replace {0} occurrences across {1} files with '{2}'?",
|
|
761
761
|
occurrences,
|
|
762
762
|
fileCount,
|
|
763
763
|
replaceValue
|
|
764
764
|
));
|
|
765
765
|
}
|
|
766
|
-
return ( localize(
|
|
766
|
+
return ( localize(8381, "Replace {0} occurrences across {1} files?", occurrences, fileCount));
|
|
767
767
|
}
|
|
768
768
|
clearMessage() {
|
|
769
769
|
this.searchWithoutFolderMessageElement = undefined;
|
|
@@ -1128,7 +1128,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1128
1128
|
this.searchWidget.clear();
|
|
1129
1129
|
}
|
|
1130
1130
|
this.viewModel.cancelSearch();
|
|
1131
|
-
this.tree.ariaLabel = ( localize(
|
|
1131
|
+
this.tree.ariaLabel = ( localize(8382, "Empty Search"));
|
|
1132
1132
|
this.accessibilitySignalService.playSignal(AccessibilitySignal.clear);
|
|
1133
1133
|
this.reLayout();
|
|
1134
1134
|
}
|
|
@@ -1372,7 +1372,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1372
1372
|
}
|
|
1373
1373
|
else {
|
|
1374
1374
|
const nonExistantPath = query.folderQueries[0].folder.fsPath;
|
|
1375
|
-
const searchPathNotFoundError = ( localize(
|
|
1375
|
+
const searchPathNotFoundError = ( localize(8383, "Search path not found: {0}", nonExistantPath));
|
|
1376
1376
|
return Promise.reject(( (new Error(searchPathNotFoundError))));
|
|
1377
1377
|
}
|
|
1378
1378
|
return undefined;
|
|
@@ -1430,7 +1430,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1430
1430
|
else if (this.inputPatternIncludes.onlySearchInOpenEditors()) {
|
|
1431
1431
|
if (hasIncludes && hasExcludes) {
|
|
1432
1432
|
message = ( localize(
|
|
1433
|
-
|
|
1433
|
+
8384,
|
|
1434
1434
|
"No results found in open editors matching '{0}' excluding '{1}' - ",
|
|
1435
1435
|
includePatternText,
|
|
1436
1436
|
excludePatternText
|
|
@@ -1438,21 +1438,21 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
else if (hasIncludes) {
|
|
1440
1440
|
message = ( localize(
|
|
1441
|
-
|
|
1441
|
+
8385,
|
|
1442
1442
|
"No results found in open editors matching '{0}' - ",
|
|
1443
1443
|
includePatternText
|
|
1444
1444
|
));
|
|
1445
1445
|
}
|
|
1446
1446
|
else if (hasExcludes) {
|
|
1447
1447
|
message = ( localize(
|
|
1448
|
-
|
|
1448
|
+
8386,
|
|
1449
1449
|
"No results found in open editors excluding '{0}' - ",
|
|
1450
1450
|
excludePatternText
|
|
1451
1451
|
));
|
|
1452
1452
|
}
|
|
1453
1453
|
else {
|
|
1454
1454
|
message = ( localize(
|
|
1455
|
-
|
|
1455
|
+
8387,
|
|
1456
1456
|
"No results found in open editors. Review your settings for configured exclusions and check your gitignore files - "
|
|
1457
1457
|
));
|
|
1458
1458
|
}
|
|
@@ -1460,21 +1460,21 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1460
1460
|
else {
|
|
1461
1461
|
if (hasIncludes && hasExcludes) {
|
|
1462
1462
|
message = ( localize(
|
|
1463
|
-
|
|
1463
|
+
8388,
|
|
1464
1464
|
"No results found in '{0}' excluding '{1}' - ",
|
|
1465
1465
|
includePatternText,
|
|
1466
1466
|
excludePatternText
|
|
1467
1467
|
));
|
|
1468
1468
|
}
|
|
1469
1469
|
else if (hasIncludes) {
|
|
1470
|
-
message = ( localize(
|
|
1470
|
+
message = ( localize(8389, "No results found in '{0}' - ", includePatternText));
|
|
1471
1471
|
}
|
|
1472
1472
|
else if (hasExcludes) {
|
|
1473
|
-
message = ( localize(
|
|
1473
|
+
message = ( localize(8390, "No results found excluding '{0}' - ", excludePatternText));
|
|
1474
1474
|
}
|
|
1475
1475
|
else {
|
|
1476
1476
|
message = ( localize(
|
|
1477
|
-
|
|
1477
|
+
8391,
|
|
1478
1478
|
"No results found. Review your settings for configured exclusions and check your gitignore files - "
|
|
1479
1479
|
));
|
|
1480
1480
|
}
|
|
@@ -1483,20 +1483,20 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1483
1483
|
const messageEl = this.clearMessage();
|
|
1484
1484
|
append(messageEl, message);
|
|
1485
1485
|
if (!completed) {
|
|
1486
|
-
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))));
|
|
1487
1487
|
append(messageEl, searchAgainButton.element);
|
|
1488
1488
|
}
|
|
1489
1489
|
else if (hasIncludes || hasExcludes) {
|
|
1490
|
-
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))));
|
|
1491
1491
|
append(messageEl, searchAgainButton.element);
|
|
1492
1492
|
}
|
|
1493
1493
|
else {
|
|
1494
|
-
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))));
|
|
1495
1495
|
append(messageEl, openSettingsButton.element);
|
|
1496
1496
|
}
|
|
1497
1497
|
if (completed) {
|
|
1498
1498
|
append(messageEl, $('span', undefined, ' - '));
|
|
1499
|
-
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))));
|
|
1500
1500
|
append(messageEl, learnMoreButton.element);
|
|
1501
1501
|
}
|
|
1502
1502
|
if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) {
|
|
@@ -1507,7 +1507,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1507
1507
|
else {
|
|
1508
1508
|
this.viewModel.searchResult.toggleHighlights(this.isVisible());
|
|
1509
1509
|
status(( localize(
|
|
1510
|
-
|
|
1510
|
+
8396,
|
|
1511
1511
|
"Search returned {0} results in {1} files",
|
|
1512
1512
|
this.viewModel.searchResult.count(this.aiResultsVisible),
|
|
1513
1513
|
this.viewModel.searchResult.fileCount()
|
|
@@ -1515,7 +1515,7 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1515
1515
|
}
|
|
1516
1516
|
if (completed && completed.limitHit) {
|
|
1517
1517
|
completed.messages.push({ type: TextSearchCompleteMessageType.Warning, text: ( localize(
|
|
1518
|
-
|
|
1518
|
+
8397,
|
|
1519
1519
|
"The result set only contains a subset of all matches. Be more specific in your search to narrow down the results."
|
|
1520
1520
|
)) });
|
|
1521
1521
|
}
|
|
@@ -1611,25 +1611,25 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1611
1611
|
const messageEl = this.clearMessage();
|
|
1612
1612
|
const resultMsg = clear ? '' : this.buildResultCountMessage(resultCount, fileCount);
|
|
1613
1613
|
this.tree.ariaLabel = resultMsg + ( localize(
|
|
1614
|
-
|
|
1614
|
+
8398,
|
|
1615
1615
|
" - Search: {0}",
|
|
1616
1616
|
this.searchResult.query?.contentPattern.pattern ?? ''
|
|
1617
1617
|
));
|
|
1618
1618
|
append(messageEl, resultMsg);
|
|
1619
1619
|
if (fileCount > 0) {
|
|
1620
1620
|
if (disregardExcludesAndIgnores) {
|
|
1621
|
-
const excludesDisabledMessage = ' - ' + ( localize(
|
|
1622
|
-
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"))))));
|
|
1623
1623
|
append(messageEl, $('span', undefined, excludesDisabledMessage, '(', enableExcludesButton.element, ')'));
|
|
1624
1624
|
}
|
|
1625
1625
|
if (onlyOpenEditors) {
|
|
1626
|
-
const searchingInOpenMessage = ' - ' + ( localize(
|
|
1627
|
-
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"))))));
|
|
1628
1628
|
append(messageEl, $('span', undefined, searchingInOpenMessage, '(', disableOpenEditorsButton.element, ')'));
|
|
1629
1629
|
}
|
|
1630
1630
|
append(messageEl, ' - ');
|
|
1631
|
-
const openInEditorTooltip = appendKeyBindingLabel(( localize(
|
|
1632
|
-
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))));
|
|
1633
1633
|
append(messageEl, openInEditorButton.element);
|
|
1634
1634
|
this.reLayout();
|
|
1635
1635
|
}
|
|
@@ -1646,25 +1646,25 @@ let SearchView = class SearchView extends ViewPane {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
buildResultCountMessage(resultCount, fileCount) {
|
|
1648
1648
|
if (resultCount === 1 && fileCount === 1) {
|
|
1649
|
-
return ( localize(
|
|
1649
|
+
return ( localize(8407, "{0} result in {1} file", resultCount, fileCount));
|
|
1650
1650
|
}
|
|
1651
1651
|
else if (resultCount === 1) {
|
|
1652
|
-
return ( localize(
|
|
1652
|
+
return ( localize(8408, "{0} result in {1} files", resultCount, fileCount));
|
|
1653
1653
|
}
|
|
1654
1654
|
else if (fileCount === 1) {
|
|
1655
|
-
return ( localize(
|
|
1655
|
+
return ( localize(8409, "{0} results in {1} file", resultCount, fileCount));
|
|
1656
1656
|
}
|
|
1657
1657
|
else {
|
|
1658
|
-
return ( localize(
|
|
1658
|
+
return ( localize(8410, "{0} results in {1} files", resultCount, fileCount));
|
|
1659
1659
|
}
|
|
1660
1660
|
}
|
|
1661
1661
|
showSearchWithoutFolderMessage() {
|
|
1662
1662
|
this.searchWithoutFolderMessageElement = this.clearMessage();
|
|
1663
1663
|
const textEl = append(this.searchWithoutFolderMessageElement, $('p', undefined, ( localize(
|
|
1664
|
-
|
|
1664
|
+
8411,
|
|
1665
1665
|
"You have not opened or specified a folder. Only open files are currently searched - "
|
|
1666
1666
|
))));
|
|
1667
|
-
const openFolderButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(
|
|
1667
|
+
const openFolderButton = this.messageDisposables.add(( (new SearchLinkButton(( localize(8412, "Open Folder")), () => {
|
|
1668
1668
|
this.commandService.executeCommand(isMacintosh && isNative ? OpenFileFolderAction.ID : OpenFolderAction.ID).catch(err => onUnexpectedError(err));
|
|
1669
1669
|
}, this.hoverService))));
|
|
1670
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: [{
|