@codingame/monaco-vscode-search-service-override 4.5.1 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +82 -120
- package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +29 -40
- package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js +21 -44
- package/vscode/src/vs/workbench/contrib/search/browser/replaceService.js +34 -35
- package/vscode/src/vs/workbench/contrib/search/browser/search.contribution.js +132 -217
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsCopy.js +8 -19
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsNav.js +46 -131
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsRemoveReplace.js +24 -42
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsSymbol.js +4 -15
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTextQuickAccess.js +2 -5
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +52 -61
- package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +6 -13
- package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +22 -97
- package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +5 -9
- package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +53 -104
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +168 -282
- package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +52 -81
- package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +14 -25
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +38 -120
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.js +50 -79
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +30 -40
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +21 -42
- package/vscode/src/vs/workbench/services/search/browser/searchService.js +29 -36
- package/vscode/src/vs/workbench/services/search/common/searchService.js +3 -3
|
@@ -8,15 +8,12 @@ import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/acti
|
|
|
8
8
|
import { category, getSearchView } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchActionsBase';
|
|
9
9
|
import { isWindows } from 'vscode/vscode/vs/base/common/platform';
|
|
10
10
|
|
|
11
|
+
const _moduleId = "vs/workbench/contrib/search/browser/searchActionsCopy";
|
|
11
12
|
registerAction2(class CopyMatchCommandAction extends Action2 {
|
|
12
13
|
constructor() {
|
|
13
14
|
super({
|
|
14
15
|
id: "search.action.copyMatch" ,
|
|
15
|
-
title: ( localize2WithPath(
|
|
16
|
-
'vs/workbench/contrib/search/browser/searchActionsCopy',
|
|
17
|
-
'copyMatchLabel',
|
|
18
|
-
"Copy"
|
|
19
|
-
)),
|
|
16
|
+
title: ( localize2WithPath(_moduleId, 0, "Copy")),
|
|
20
17
|
category,
|
|
21
18
|
keybinding: {
|
|
22
19
|
weight: 200 ,
|
|
@@ -39,11 +36,7 @@ registerAction2(class CopyPathCommandAction extends Action2 {
|
|
|
39
36
|
constructor() {
|
|
40
37
|
super({
|
|
41
38
|
id: "search.action.copyPath" ,
|
|
42
|
-
title: ( localize2WithPath(
|
|
43
|
-
'vs/workbench/contrib/search/browser/searchActionsCopy',
|
|
44
|
-
'copyPathLabel',
|
|
45
|
-
"Copy Path"
|
|
46
|
-
)),
|
|
39
|
+
title: ( localize2WithPath(_moduleId, 1, "Copy Path")),
|
|
47
40
|
category,
|
|
48
41
|
keybinding: {
|
|
49
42
|
weight: 200 ,
|
|
@@ -69,11 +62,7 @@ registerAction2(class CopyAllCommandAction extends Action2 {
|
|
|
69
62
|
constructor() {
|
|
70
63
|
super({
|
|
71
64
|
id: "search.action.copyAll" ,
|
|
72
|
-
title: ( localize2WithPath(
|
|
73
|
-
'vs/workbench/contrib/search/browser/searchActionsCopy',
|
|
74
|
-
'copyAllLabel',
|
|
75
|
-
"Copy All"
|
|
76
|
-
)),
|
|
65
|
+
title: ( localize2WithPath(_moduleId, 2, "Copy All")),
|
|
77
66
|
category,
|
|
78
67
|
menu: [{
|
|
79
68
|
id: MenuId.SearchContext,
|
|
@@ -146,7 +135,7 @@ function matchToString(match, indent = 0) {
|
|
|
146
135
|
getOtherLinePrefix(i).length;
|
|
147
136
|
return Math.max(thisSize, largest);
|
|
148
137
|
}, 0);
|
|
149
|
-
const formattedLines = ( fullMatchLines
|
|
138
|
+
const formattedLines = ( (fullMatchLines
|
|
150
139
|
.map((line, i) => {
|
|
151
140
|
const prefix = i === 0 ?
|
|
152
141
|
getFirstLinePrefix() :
|
|
@@ -154,7 +143,7 @@ function matchToString(match, indent = 0) {
|
|
|
154
143
|
const paddingStr = ' '.repeat(largestPrefixSize - prefix.length);
|
|
155
144
|
const indentStr = ' '.repeat(indent);
|
|
156
145
|
return `${indentStr}${prefix}: ${paddingStr}${line}`;
|
|
157
|
-
}));
|
|
146
|
+
})));
|
|
158
147
|
return formattedLines.join('\n');
|
|
159
148
|
}
|
|
160
149
|
function fileFolderMatchToString(match, labelService) {
|
|
@@ -166,9 +155,9 @@ function fileFolderMatchToString(match, labelService) {
|
|
|
166
155
|
}
|
|
167
156
|
}
|
|
168
157
|
function fileMatchToString(fileMatch, labelService) {
|
|
169
|
-
const matchTextRows = ( fileMatch.matches()
|
|
158
|
+
const matchTextRows = ( (fileMatch.matches()
|
|
170
159
|
.sort(searchMatchComparer)
|
|
171
|
-
.map(match => matchToString(match, 2)));
|
|
160
|
+
.map(match => matchToString(match, 2))));
|
|
172
161
|
const uriString = labelService.getUriLabel(fileMatch.resource, { noPrefix: true });
|
|
173
162
|
return {
|
|
174
163
|
text: `${uriString}${lineDelimiter}${matchTextRows.join(lineDelimiter)}`,
|
|
@@ -16,22 +16,16 @@ import { category, getSearchView, openSearchView } from 'vscode/vscode/vs/workbe
|
|
|
16
16
|
import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vscode/vscode/vs/platform/accessibility/common/accessibility';
|
|
17
17
|
import { getActiveElement } from 'vscode/vscode/vs/base/browser/dom';
|
|
18
18
|
|
|
19
|
+
const _moduleId = "vs/workbench/contrib/search/browser/searchActionsNav";
|
|
19
20
|
registerAction2(class ToggleQueryDetailsAction extends Action2 {
|
|
20
21
|
constructor() {
|
|
21
22
|
super({
|
|
22
23
|
id: "workbench.action.search.toggleQueryDetails" ,
|
|
23
|
-
title: ( localize2WithPath(
|
|
24
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
25
|
-
'ToggleQueryDetailsAction.label',
|
|
26
|
-
"Toggle Query Details"
|
|
27
|
-
)),
|
|
24
|
+
title: ( localize2WithPath(_moduleId, 0, "Toggle Query Details")),
|
|
28
25
|
category,
|
|
29
26
|
keybinding: {
|
|
30
27
|
weight: 200 ,
|
|
31
|
-
when: ( ContextKeyExpr.or(
|
|
32
|
-
SearchContext.SearchViewFocusedKey,
|
|
33
|
-
InSearchEditor
|
|
34
|
-
)),
|
|
28
|
+
when: ( (ContextKeyExpr.or(SearchContext.SearchViewFocusedKey, InSearchEditor))),
|
|
35
29
|
primary: 2048 | 1024 | 40 ,
|
|
36
30
|
},
|
|
37
31
|
});
|
|
@@ -51,18 +45,14 @@ registerAction2(class CloseReplaceAction extends Action2 {
|
|
|
51
45
|
constructor() {
|
|
52
46
|
super({
|
|
53
47
|
id: "closeReplaceInFilesWidget" ,
|
|
54
|
-
title: ( localize2WithPath(
|
|
55
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
56
|
-
'CloseReplaceWidget.label',
|
|
57
|
-
"Close Replace Widget"
|
|
58
|
-
)),
|
|
48
|
+
title: ( localize2WithPath(_moduleId, 1, "Close Replace Widget")),
|
|
59
49
|
category,
|
|
60
50
|
keybinding: {
|
|
61
51
|
weight: 200 ,
|
|
62
|
-
when: ( ContextKeyExpr.and(
|
|
52
|
+
when: ( (ContextKeyExpr.and(
|
|
63
53
|
SearchContext.SearchViewVisibleKey,
|
|
64
54
|
SearchContext.ReplaceInputBoxFocusedKey
|
|
65
|
-
)),
|
|
55
|
+
))),
|
|
66
56
|
primary: 9 ,
|
|
67
57
|
},
|
|
68
58
|
});
|
|
@@ -80,15 +70,14 @@ registerAction2(class ToggleCaseSensitiveCommandAction extends Action2 {
|
|
|
80
70
|
constructor() {
|
|
81
71
|
super({
|
|
82
72
|
id: "toggleSearchCaseSensitive" ,
|
|
83
|
-
title: ( localize2WithPath(
|
|
84
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
85
|
-
'ToggleCaseSensitiveCommandId.label',
|
|
86
|
-
"Toggle Case Sensitive"
|
|
87
|
-
)),
|
|
73
|
+
title: ( localize2WithPath(_moduleId, 2, "Toggle Case Sensitive")),
|
|
88
74
|
category,
|
|
89
75
|
keybinding: Object.assign({
|
|
90
76
|
weight: 200 ,
|
|
91
|
-
when: isMacintosh ? ( ContextKeyExpr.and(
|
|
77
|
+
when: isMacintosh ? ( (ContextKeyExpr.and(
|
|
78
|
+
SearchContext.SearchViewFocusedKey,
|
|
79
|
+
(SearchContext.FileMatchOrFolderMatchFocusKey.toNegated())
|
|
80
|
+
))) : SearchContext.SearchViewFocusedKey,
|
|
92
81
|
}, ToggleCaseSensitiveKeybinding)
|
|
93
82
|
});
|
|
94
83
|
}
|
|
@@ -100,11 +89,7 @@ registerAction2(class ToggleWholeWordCommandAction extends Action2 {
|
|
|
100
89
|
constructor() {
|
|
101
90
|
super({
|
|
102
91
|
id: "toggleSearchWholeWord" ,
|
|
103
|
-
title: ( localize2WithPath(
|
|
104
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
105
|
-
'ToggleWholeWordCommandId.label',
|
|
106
|
-
"Toggle Whole Word"
|
|
107
|
-
)),
|
|
92
|
+
title: ( localize2WithPath(_moduleId, 3, "Toggle Whole Word")),
|
|
108
93
|
keybinding: Object.assign({
|
|
109
94
|
weight: 200 ,
|
|
110
95
|
when: SearchContext.SearchViewFocusedKey,
|
|
@@ -120,11 +105,7 @@ registerAction2(class ToggleRegexCommandAction extends Action2 {
|
|
|
120
105
|
constructor() {
|
|
121
106
|
super({
|
|
122
107
|
id: "toggleSearchRegex" ,
|
|
123
|
-
title: ( localize2WithPath(
|
|
124
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
125
|
-
'ToggleRegexCommandId.label',
|
|
126
|
-
"Toggle Regex"
|
|
127
|
-
)),
|
|
108
|
+
title: ( localize2WithPath(_moduleId, 4, "Toggle Regex")),
|
|
128
109
|
keybinding: Object.assign({
|
|
129
110
|
weight: 200 ,
|
|
130
111
|
when: SearchContext.SearchViewFocusedKey,
|
|
@@ -140,11 +121,7 @@ registerAction2(class TogglePreserveCaseAction extends Action2 {
|
|
|
140
121
|
constructor() {
|
|
141
122
|
super({
|
|
142
123
|
id: "toggleSearchPreserveCase" ,
|
|
143
|
-
title: ( localize2WithPath(
|
|
144
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
145
|
-
'TogglePreserveCaseId.label',
|
|
146
|
-
"Toggle Preserve Case"
|
|
147
|
-
)),
|
|
124
|
+
title: ( localize2WithPath(_moduleId, 5, "Toggle Preserve Case")),
|
|
148
125
|
keybinding: Object.assign({
|
|
149
126
|
weight: 200 ,
|
|
150
127
|
when: SearchContext.SearchViewFocusedKey,
|
|
@@ -160,18 +137,11 @@ registerAction2(class OpenMatchAction extends Action2 {
|
|
|
160
137
|
constructor() {
|
|
161
138
|
super({
|
|
162
139
|
id: "search.action.openResult" ,
|
|
163
|
-
title: ( localize2WithPath(
|
|
164
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
165
|
-
'OpenMatch.label',
|
|
166
|
-
"Open Match"
|
|
167
|
-
)),
|
|
140
|
+
title: ( localize2WithPath(_moduleId, 6, "Open Match")),
|
|
168
141
|
category,
|
|
169
142
|
keybinding: {
|
|
170
143
|
weight: 200 ,
|
|
171
|
-
when: ( ContextKeyExpr.and(
|
|
172
|
-
SearchContext.SearchViewVisibleKey,
|
|
173
|
-
SearchContext.FileMatchOrMatchFocusKey
|
|
174
|
-
)),
|
|
144
|
+
when: ( (ContextKeyExpr.and(SearchContext.SearchViewVisibleKey, SearchContext.FileMatchOrMatchFocusKey))),
|
|
175
145
|
primary: 3 ,
|
|
176
146
|
mac: {
|
|
177
147
|
primary: 3 ,
|
|
@@ -199,18 +169,11 @@ registerAction2(class OpenMatchToSideAction extends Action2 {
|
|
|
199
169
|
constructor() {
|
|
200
170
|
super({
|
|
201
171
|
id: "search.action.openResultToSide" ,
|
|
202
|
-
title: ( localize2WithPath(
|
|
203
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
204
|
-
'OpenMatchToSide.label',
|
|
205
|
-
"Open Match To Side"
|
|
206
|
-
)),
|
|
172
|
+
title: ( localize2WithPath(_moduleId, 7, "Open Match To Side")),
|
|
207
173
|
category,
|
|
208
174
|
keybinding: {
|
|
209
175
|
weight: 200 ,
|
|
210
|
-
when: ( ContextKeyExpr.and(
|
|
211
|
-
SearchContext.SearchViewVisibleKey,
|
|
212
|
-
SearchContext.FileMatchOrMatchFocusKey
|
|
213
|
-
)),
|
|
176
|
+
when: ( (ContextKeyExpr.and(SearchContext.SearchViewVisibleKey, SearchContext.FileMatchOrMatchFocusKey))),
|
|
214
177
|
primary: 2048 | 3 ,
|
|
215
178
|
mac: {
|
|
216
179
|
primary: 256 | 3
|
|
@@ -230,17 +193,10 @@ registerAction2(class AddCursorsAtSearchResultsAction extends Action2 {
|
|
|
230
193
|
constructor() {
|
|
231
194
|
super({
|
|
232
195
|
id: "addCursorsAtSearchResults" ,
|
|
233
|
-
title: ( localize2WithPath(
|
|
234
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
235
|
-
'AddCursorsAtSearchResults.label',
|
|
236
|
-
"Add Cursors at Search Results"
|
|
237
|
-
)),
|
|
196
|
+
title: ( localize2WithPath(_moduleId, 8, "Add Cursors at Search Results")),
|
|
238
197
|
keybinding: {
|
|
239
198
|
weight: 200 ,
|
|
240
|
-
when: ( ContextKeyExpr.and(
|
|
241
|
-
SearchContext.SearchViewVisibleKey,
|
|
242
|
-
SearchContext.FileMatchOrMatchFocusKey
|
|
243
|
-
)),
|
|
199
|
+
when: ( (ContextKeyExpr.and(SearchContext.SearchViewVisibleKey, SearchContext.FileMatchOrMatchFocusKey))),
|
|
244
200
|
primary: 2048 | 1024 | 42 ,
|
|
245
201
|
},
|
|
246
202
|
category,
|
|
@@ -258,21 +214,14 @@ registerAction2(class FocusNextInputAction extends Action2 {
|
|
|
258
214
|
constructor() {
|
|
259
215
|
super({
|
|
260
216
|
id: "search.focus.nextInputBox" ,
|
|
261
|
-
title: ( localize2WithPath(
|
|
262
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
263
|
-
'FocusNextInputAction.label',
|
|
264
|
-
"Focus Next Input"
|
|
265
|
-
)),
|
|
217
|
+
title: ( localize2WithPath(_moduleId, 9, "Focus Next Input")),
|
|
266
218
|
category,
|
|
267
219
|
keybinding: {
|
|
268
220
|
weight: 200 ,
|
|
269
|
-
when: ( ContextKeyExpr.or(
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
)),
|
|
273
|
-
SearchContext.SearchViewVisibleKey,
|
|
274
|
-
SearchContext.InputBoxFocusedKey
|
|
275
|
-
)))),
|
|
221
|
+
when: ( (ContextKeyExpr.or(
|
|
222
|
+
(ContextKeyExpr.and(InSearchEditor, SearchContext.InputBoxFocusedKey)),
|
|
223
|
+
(ContextKeyExpr.and(SearchContext.SearchViewVisibleKey, SearchContext.InputBoxFocusedKey))
|
|
224
|
+
))),
|
|
276
225
|
primary: 2048 | 18 ,
|
|
277
226
|
},
|
|
278
227
|
});
|
|
@@ -291,22 +240,18 @@ registerAction2(class FocusPreviousInputAction extends Action2 {
|
|
|
291
240
|
constructor() {
|
|
292
241
|
super({
|
|
293
242
|
id: "search.focus.previousInputBox" ,
|
|
294
|
-
title: ( localize2WithPath(
|
|
295
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
296
|
-
'FocusPreviousInputAction.label',
|
|
297
|
-
"Focus Previous Input"
|
|
298
|
-
)),
|
|
243
|
+
title: ( localize2WithPath(_moduleId, 10, "Focus Previous Input")),
|
|
299
244
|
category,
|
|
300
245
|
keybinding: {
|
|
301
246
|
weight: 200 ,
|
|
302
|
-
when: ( ContextKeyExpr.or(
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
)))
|
|
247
|
+
when: ( (ContextKeyExpr.or(
|
|
248
|
+
(ContextKeyExpr.and(InSearchEditor, SearchContext.InputBoxFocusedKey)),
|
|
249
|
+
(ContextKeyExpr.and(
|
|
250
|
+
SearchContext.SearchViewVisibleKey,
|
|
251
|
+
SearchContext.InputBoxFocusedKey,
|
|
252
|
+
(SearchContext.SearchInputBoxFocusedKey.toNegated())
|
|
253
|
+
))
|
|
254
|
+
))),
|
|
310
255
|
primary: 2048 | 16 ,
|
|
311
256
|
},
|
|
312
257
|
});
|
|
@@ -325,18 +270,14 @@ registerAction2(class FocusSearchFromResultsAction extends Action2 {
|
|
|
325
270
|
constructor() {
|
|
326
271
|
super({
|
|
327
272
|
id: "search.action.focusSearchFromResults" ,
|
|
328
|
-
title: ( localize2WithPath(
|
|
329
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
330
|
-
'FocusSearchFromResults.label',
|
|
331
|
-
"Focus Search From Results"
|
|
332
|
-
)),
|
|
273
|
+
title: ( localize2WithPath(_moduleId, 11, "Focus Search From Results")),
|
|
333
274
|
category,
|
|
334
275
|
keybinding: {
|
|
335
276
|
weight: 200 ,
|
|
336
|
-
when: ( ContextKeyExpr.and(
|
|
337
|
-
SearchContext.
|
|
338
|
-
|
|
339
|
-
)))
|
|
277
|
+
when: ( (ContextKeyExpr.and(
|
|
278
|
+
SearchContext.SearchViewVisibleKey,
|
|
279
|
+
(ContextKeyExpr.or(SearchContext.FirstMatchFocusKey, CONTEXT_ACCESSIBILITY_MODE_ENABLED))
|
|
280
|
+
))),
|
|
340
281
|
primary: 2048 | 16 ,
|
|
341
282
|
},
|
|
342
283
|
});
|
|
@@ -351,11 +292,7 @@ registerAction2(class ToggleSearchOnTypeAction extends Action2 {
|
|
|
351
292
|
constructor() {
|
|
352
293
|
super({
|
|
353
294
|
id: "workbench.action.toggleSearchOnType" ,
|
|
354
|
-
title: ( localize2WithPath(
|
|
355
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
356
|
-
'toggleTabs',
|
|
357
|
-
"Toggle Search on Type"
|
|
358
|
-
)),
|
|
295
|
+
title: ( localize2WithPath(_moduleId, 12, "Toggle Search on Type")),
|
|
359
296
|
category,
|
|
360
297
|
});
|
|
361
298
|
}
|
|
@@ -369,11 +306,7 @@ registerAction2(class FocusSearchListCommandAction extends Action2 {
|
|
|
369
306
|
constructor() {
|
|
370
307
|
super({
|
|
371
308
|
id: "search.action.focusSearchList" ,
|
|
372
|
-
title: ( localize2WithPath(
|
|
373
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
374
|
-
'focusSearchListCommandLabel',
|
|
375
|
-
"Focus List"
|
|
376
|
-
)),
|
|
309
|
+
title: ( localize2WithPath(_moduleId, 13, "Focus List")),
|
|
377
310
|
category,
|
|
378
311
|
f1: true
|
|
379
312
|
});
|
|
@@ -386,21 +319,14 @@ registerAction2(class FocusNextSearchResultAction extends Action2 {
|
|
|
386
319
|
constructor() {
|
|
387
320
|
super({
|
|
388
321
|
id: "search.action.focusNextSearchResult" ,
|
|
389
|
-
title: ( localize2WithPath(
|
|
390
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
391
|
-
'FocusNextSearchResult.label',
|
|
392
|
-
"Focus Next Search Result"
|
|
393
|
-
)),
|
|
322
|
+
title: ( localize2WithPath(_moduleId, 14, "Focus Next Search Result")),
|
|
394
323
|
keybinding: [{
|
|
395
324
|
primary: 62 ,
|
|
396
325
|
weight: 200 ,
|
|
397
326
|
}],
|
|
398
327
|
category,
|
|
399
328
|
f1: true,
|
|
400
|
-
precondition: ( ContextKeyExpr.or(
|
|
401
|
-
SearchContext.HasSearchResults,
|
|
402
|
-
InSearchEditor
|
|
403
|
-
)),
|
|
329
|
+
precondition: ( (ContextKeyExpr.or(SearchContext.HasSearchResults, InSearchEditor))),
|
|
404
330
|
});
|
|
405
331
|
}
|
|
406
332
|
async run(accessor) {
|
|
@@ -411,21 +337,14 @@ registerAction2(class FocusPreviousSearchResultAction extends Action2 {
|
|
|
411
337
|
constructor() {
|
|
412
338
|
super({
|
|
413
339
|
id: "search.action.focusPreviousSearchResult" ,
|
|
414
|
-
title: ( localize2WithPath(
|
|
415
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
416
|
-
'FocusPreviousSearchResult.label',
|
|
417
|
-
"Focus Previous Search Result"
|
|
418
|
-
)),
|
|
340
|
+
title: ( localize2WithPath(_moduleId, 15, "Focus Previous Search Result")),
|
|
419
341
|
keybinding: [{
|
|
420
342
|
primary: 1024 | 62 ,
|
|
421
343
|
weight: 200 ,
|
|
422
344
|
}],
|
|
423
345
|
category,
|
|
424
346
|
f1: true,
|
|
425
|
-
precondition: ( ContextKeyExpr.or(
|
|
426
|
-
SearchContext.HasSearchResults,
|
|
427
|
-
InSearchEditor
|
|
428
|
-
)),
|
|
347
|
+
precondition: ( (ContextKeyExpr.or(SearchContext.HasSearchResults, InSearchEditor))),
|
|
429
348
|
});
|
|
430
349
|
}
|
|
431
350
|
async run(accessor) {
|
|
@@ -436,11 +355,7 @@ registerAction2(class ReplaceInFilesAction extends Action2 {
|
|
|
436
355
|
constructor() {
|
|
437
356
|
super({
|
|
438
357
|
id: "workbench.action.replaceInFiles" ,
|
|
439
|
-
title: ( localize2WithPath(
|
|
440
|
-
'vs/workbench/contrib/search/browser/searchActionsNav',
|
|
441
|
-
'replaceInFiles',
|
|
442
|
-
"Replace in Files"
|
|
443
|
-
)),
|
|
358
|
+
title: ( localize2WithPath(_moduleId, 16, "Replace in Files")),
|
|
444
359
|
keybinding: [{
|
|
445
360
|
primary: 2048 | 1024 | 38 ,
|
|
446
361
|
weight: 200 ,
|
|
@@ -13,23 +13,17 @@ import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/acti
|
|
|
13
13
|
import { category, getSearchView, getElementsToOperateOn, shouldRefocus } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchActionsBase';
|
|
14
14
|
import { equals } from 'vscode/vscode/vs/base/common/arrays';
|
|
15
15
|
|
|
16
|
+
const _moduleId = "vs/workbench/contrib/search/browser/searchActionsRemoveReplace";
|
|
16
17
|
registerAction2(class RemoveAction extends Action2 {
|
|
17
18
|
constructor() {
|
|
18
19
|
super({
|
|
19
20
|
id: "search.action.remove" ,
|
|
20
|
-
title: ( localize2WithPath(
|
|
21
|
-
'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
|
|
22
|
-
'RemoveAction.label',
|
|
23
|
-
"Dismiss"
|
|
24
|
-
)),
|
|
21
|
+
title: ( localize2WithPath(_moduleId, 0, "Dismiss")),
|
|
25
22
|
category,
|
|
26
23
|
icon: searchRemoveIcon,
|
|
27
24
|
keybinding: {
|
|
28
25
|
weight: 200 ,
|
|
29
|
-
when: ( ContextKeyExpr.and(
|
|
30
|
-
SearchContext.SearchViewVisibleKey,
|
|
31
|
-
SearchContext.FileMatchOrMatchFocusKey
|
|
32
|
-
)),
|
|
26
|
+
when: ( (ContextKeyExpr.and(SearchContext.SearchViewVisibleKey, SearchContext.FileMatchOrMatchFocusKey))),
|
|
33
27
|
primary: 20 ,
|
|
34
28
|
mac: {
|
|
35
29
|
primary: 2048 | 1 ,
|
|
@@ -102,41 +96,37 @@ registerAction2(class ReplaceAction extends Action2 {
|
|
|
102
96
|
constructor() {
|
|
103
97
|
super({
|
|
104
98
|
id: "search.action.replace" ,
|
|
105
|
-
title: ( localize2WithPath(
|
|
106
|
-
'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
|
|
107
|
-
'match.replace.label',
|
|
108
|
-
"Replace"
|
|
109
|
-
)),
|
|
99
|
+
title: ( localize2WithPath(_moduleId, 1, "Replace")),
|
|
110
100
|
category,
|
|
111
101
|
keybinding: {
|
|
112
102
|
weight: 200 ,
|
|
113
|
-
when: ( ContextKeyExpr.and(
|
|
103
|
+
when: ( (ContextKeyExpr.and(
|
|
114
104
|
SearchContext.SearchViewVisibleKey,
|
|
115
105
|
SearchContext.ReplaceActiveKey,
|
|
116
106
|
SearchContext.MatchFocusKey,
|
|
117
107
|
SearchContext.IsEditableItemKey
|
|
118
|
-
)),
|
|
108
|
+
))),
|
|
119
109
|
primary: 1024 | 2048 | 22 ,
|
|
120
110
|
},
|
|
121
111
|
icon: searchReplaceIcon,
|
|
122
112
|
menu: [
|
|
123
113
|
{
|
|
124
114
|
id: MenuId.SearchContext,
|
|
125
|
-
when: ( ContextKeyExpr.and(
|
|
115
|
+
when: ( (ContextKeyExpr.and(
|
|
126
116
|
SearchContext.ReplaceActiveKey,
|
|
127
117
|
SearchContext.MatchFocusKey,
|
|
128
118
|
SearchContext.IsEditableItemKey
|
|
129
|
-
)),
|
|
119
|
+
))),
|
|
130
120
|
group: 'search',
|
|
131
121
|
order: 1
|
|
132
122
|
},
|
|
133
123
|
{
|
|
134
124
|
id: MenuId.SearchActionMenu,
|
|
135
|
-
when: ( ContextKeyExpr.and(
|
|
125
|
+
when: ( (ContextKeyExpr.and(
|
|
136
126
|
SearchContext.ReplaceActiveKey,
|
|
137
127
|
SearchContext.MatchFocusKey,
|
|
138
128
|
SearchContext.IsEditableItemKey
|
|
139
|
-
)),
|
|
129
|
+
))),
|
|
140
130
|
group: 'inline',
|
|
141
131
|
order: 1
|
|
142
132
|
}
|
|
@@ -151,20 +141,16 @@ registerAction2(class ReplaceAllAction extends Action2 {
|
|
|
151
141
|
constructor() {
|
|
152
142
|
super({
|
|
153
143
|
id: "search.action.replaceAllInFile" ,
|
|
154
|
-
title: ( localize2WithPath(
|
|
155
|
-
'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
|
|
156
|
-
'file.replaceAll.label',
|
|
157
|
-
"Replace All"
|
|
158
|
-
)),
|
|
144
|
+
title: ( localize2WithPath(_moduleId, 2, "Replace All")),
|
|
159
145
|
category,
|
|
160
146
|
keybinding: {
|
|
161
147
|
weight: 200 ,
|
|
162
|
-
when: ( ContextKeyExpr.and(
|
|
148
|
+
when: ( (ContextKeyExpr.and(
|
|
163
149
|
SearchContext.SearchViewVisibleKey,
|
|
164
150
|
SearchContext.ReplaceActiveKey,
|
|
165
151
|
SearchContext.FileFocusKey,
|
|
166
152
|
SearchContext.IsEditableItemKey
|
|
167
|
-
)),
|
|
153
|
+
))),
|
|
168
154
|
primary: 1024 | 2048 | 22 ,
|
|
169
155
|
secondary: [2048 | 1024 | 3 ],
|
|
170
156
|
},
|
|
@@ -172,21 +158,21 @@ registerAction2(class ReplaceAllAction extends Action2 {
|
|
|
172
158
|
menu: [
|
|
173
159
|
{
|
|
174
160
|
id: MenuId.SearchContext,
|
|
175
|
-
when: ( ContextKeyExpr.and(
|
|
161
|
+
when: ( (ContextKeyExpr.and(
|
|
176
162
|
SearchContext.ReplaceActiveKey,
|
|
177
163
|
SearchContext.FileFocusKey,
|
|
178
164
|
SearchContext.IsEditableItemKey
|
|
179
|
-
)),
|
|
165
|
+
))),
|
|
180
166
|
group: 'search',
|
|
181
167
|
order: 1
|
|
182
168
|
},
|
|
183
169
|
{
|
|
184
170
|
id: MenuId.SearchActionMenu,
|
|
185
|
-
when: ( ContextKeyExpr.and(
|
|
171
|
+
when: ( (ContextKeyExpr.and(
|
|
186
172
|
SearchContext.ReplaceActiveKey,
|
|
187
173
|
SearchContext.FileFocusKey,
|
|
188
174
|
SearchContext.IsEditableItemKey
|
|
189
|
-
)),
|
|
175
|
+
))),
|
|
190
176
|
group: 'inline',
|
|
191
177
|
order: 1
|
|
192
178
|
}
|
|
@@ -201,20 +187,16 @@ registerAction2(class ReplaceAllInFolderAction extends Action2 {
|
|
|
201
187
|
constructor() {
|
|
202
188
|
super({
|
|
203
189
|
id: "search.action.replaceAllInFolder" ,
|
|
204
|
-
title: ( localize2WithPath(
|
|
205
|
-
'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
|
|
206
|
-
'file.replaceAll.label',
|
|
207
|
-
"Replace All"
|
|
208
|
-
)),
|
|
190
|
+
title: ( localize2WithPath(_moduleId, 2, "Replace All")),
|
|
209
191
|
category,
|
|
210
192
|
keybinding: {
|
|
211
193
|
weight: 200 ,
|
|
212
|
-
when: ( ContextKeyExpr.and(
|
|
194
|
+
when: ( (ContextKeyExpr.and(
|
|
213
195
|
SearchContext.SearchViewVisibleKey,
|
|
214
196
|
SearchContext.ReplaceActiveKey,
|
|
215
197
|
SearchContext.FolderFocusKey,
|
|
216
198
|
SearchContext.IsEditableItemKey
|
|
217
|
-
)),
|
|
199
|
+
))),
|
|
218
200
|
primary: 1024 | 2048 | 22 ,
|
|
219
201
|
secondary: [2048 | 1024 | 3 ],
|
|
220
202
|
},
|
|
@@ -222,21 +204,21 @@ registerAction2(class ReplaceAllInFolderAction extends Action2 {
|
|
|
222
204
|
menu: [
|
|
223
205
|
{
|
|
224
206
|
id: MenuId.SearchContext,
|
|
225
|
-
when: ( ContextKeyExpr.and(
|
|
207
|
+
when: ( (ContextKeyExpr.and(
|
|
226
208
|
SearchContext.ReplaceActiveKey,
|
|
227
209
|
SearchContext.FolderFocusKey,
|
|
228
210
|
SearchContext.IsEditableItemKey
|
|
229
|
-
)),
|
|
211
|
+
))),
|
|
230
212
|
group: 'search',
|
|
231
213
|
order: 1
|
|
232
214
|
},
|
|
233
215
|
{
|
|
234
216
|
id: MenuId.SearchActionMenu,
|
|
235
|
-
when: ( ContextKeyExpr.and(
|
|
217
|
+
when: ( (ContextKeyExpr.and(
|
|
236
218
|
SearchContext.ReplaceActiveKey,
|
|
237
219
|
SearchContext.FolderFocusKey,
|
|
238
220
|
SearchContext.IsEditableItemKey
|
|
239
|
-
)),
|
|
221
|
+
))),
|
|
240
222
|
group: 'inline',
|
|
241
223
|
order: 1
|
|
242
224
|
}
|
|
@@ -2,28 +2,17 @@ import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
|
2
2
|
import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
3
3
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
4
4
|
|
|
5
|
+
const _moduleId = "vs/workbench/contrib/search/browser/searchActionsSymbol";
|
|
5
6
|
registerAction2(class ShowAllSymbolsAction extends Action2 {
|
|
6
7
|
static { this.ID = 'workbench.action.showAllSymbols'; }
|
|
7
|
-
static { this.LABEL = ( localizeWithPath(
|
|
8
|
-
'vs/workbench/contrib/search/browser/searchActionsSymbol',
|
|
9
|
-
'showTriggerActions',
|
|
10
|
-
"Go to Symbol in Workspace..."
|
|
11
|
-
)); }
|
|
8
|
+
static { this.LABEL = ( localizeWithPath(_moduleId, 0, "Go to Symbol in Workspace...")); }
|
|
12
9
|
static { this.ALL_SYMBOLS_PREFIX = '#'; }
|
|
13
10
|
constructor() {
|
|
14
11
|
super({
|
|
15
12
|
id: "workbench.action.showAllSymbols" ,
|
|
16
13
|
title: {
|
|
17
|
-
...( localize2WithPath(
|
|
18
|
-
|
|
19
|
-
'showTriggerActions',
|
|
20
|
-
"Go to Symbol in Workspace..."
|
|
21
|
-
)),
|
|
22
|
-
mnemonicTitle: ( localizeWithPath(
|
|
23
|
-
'vs/workbench/contrib/search/browser/searchActionsSymbol',
|
|
24
|
-
{ key: 'miGotoSymbolInWorkspace', comment: ['&& denotes a mnemonic'] },
|
|
25
|
-
"Go to Symbol in &&Workspace..."
|
|
26
|
-
)),
|
|
14
|
+
...( localize2WithPath(_moduleId, 0, "Go to Symbol in Workspace...")),
|
|
15
|
+
mnemonicTitle: ( localizeWithPath(_moduleId, 1, "Go to Symbol in &&Workspace...")),
|
|
27
16
|
},
|
|
28
17
|
f1: true,
|
|
29
18
|
keybinding: {
|
|
@@ -7,15 +7,12 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
7
7
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
8
|
import { getSelectionTextFromEditor } from './searchView.js';
|
|
9
9
|
|
|
10
|
+
const _moduleId = "vs/workbench/contrib/search/browser/searchActionsTextQuickAccess";
|
|
10
11
|
registerAction2(class TextSearchQuickAccessAction extends Action2 {
|
|
11
12
|
constructor() {
|
|
12
13
|
super({
|
|
13
14
|
id: "workbench.action.experimental.quickTextSearch" ,
|
|
14
|
-
title: ( localize2WithPath(
|
|
15
|
-
'vs/workbench/contrib/search/browser/searchActionsTextQuickAccess',
|
|
16
|
-
'quickTextSearch',
|
|
17
|
-
"Quick Search (Experimental)"
|
|
18
|
-
)),
|
|
15
|
+
title: ( localize2WithPath(_moduleId, 0, "Quick Search (Experimental)")),
|
|
19
16
|
category,
|
|
20
17
|
f1: true
|
|
21
18
|
});
|