@codingame/monaco-vscode-search-service-override 2.2.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
1
+ import { localize2WithPath } from 'vscode/vscode/vs/nls';
2
2
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
3
3
  import { getSelectionKeyboardEvent } from 'vscode/vscode/vs/platform/list/browser/listService';
4
4
  import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
5
5
  import { searchRemoveIcon, searchReplaceIcon } from './searchIcons.js';
6
- import { RemoveActionId, SearchViewVisibleKey, FileMatchOrMatchFocusKey, ReplaceActionId, ReplaceActiveKey, MatchFocusKey, IsEditableItemKey, ReplaceAllInFileActionId, FileFocusKey, ReplaceAllInFolderActionId, FolderFocusKey } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
6
+ import { SearchContext } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
7
7
  import { IReplaceService } from 'vscode/vscode/vs/workbench/contrib/search/browser/replace';
8
8
  import { arrayContainsElementOrParent, SearchResult, Match, MatchInNotebook, FileMatch, FolderMatch } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchModel';
9
9
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
@@ -16,20 +16,20 @@ import { equals } from 'vscode/vscode/vs/base/common/arrays';
16
16
  registerAction2(class RemoveAction extends Action2 {
17
17
  constructor() {
18
18
  super({
19
- id: RemoveActionId,
20
- title: {
21
- value: ( localizeWithPath(
22
- 'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
23
- 'RemoveAction.label',
24
- "Dismiss"
25
- )),
26
- original: 'Dismiss'
27
- },
19
+ id: "search.action.remove" ,
20
+ title: ( localize2WithPath(
21
+ 'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
22
+ 'RemoveAction.label',
23
+ "Dismiss"
24
+ )),
28
25
  category,
29
26
  icon: searchRemoveIcon,
30
27
  keybinding: {
31
28
  weight: 200 ,
32
- when: ( ContextKeyExpr.and(SearchViewVisibleKey, FileMatchOrMatchFocusKey)),
29
+ when: ( ContextKeyExpr.and(
30
+ SearchContext.SearchViewVisibleKey,
31
+ SearchContext.FileMatchOrMatchFocusKey
32
+ )),
33
33
  primary: 20 ,
34
34
  mac: {
35
35
  primary: 2048 | 1 ,
@@ -101,23 +101,20 @@ registerAction2(class RemoveAction extends Action2 {
101
101
  registerAction2(class ReplaceAction extends Action2 {
102
102
  constructor() {
103
103
  super({
104
- id: ReplaceActionId,
105
- title: {
106
- value: ( localizeWithPath(
107
- 'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
108
- 'match.replace.label',
109
- "Replace"
110
- )),
111
- original: 'Replace'
112
- },
104
+ id: "search.action.replace" ,
105
+ title: ( localize2WithPath(
106
+ 'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
107
+ 'match.replace.label',
108
+ "Replace"
109
+ )),
113
110
  category,
114
111
  keybinding: {
115
112
  weight: 200 ,
116
113
  when: ( ContextKeyExpr.and(
117
- SearchViewVisibleKey,
118
- ReplaceActiveKey,
119
- MatchFocusKey,
120
- IsEditableItemKey
114
+ SearchContext.SearchViewVisibleKey,
115
+ SearchContext.ReplaceActiveKey,
116
+ SearchContext.MatchFocusKey,
117
+ SearchContext.IsEditableItemKey
121
118
  )),
122
119
  primary: 1024 | 2048 | 22 ,
123
120
  },
@@ -126,9 +123,9 @@ registerAction2(class ReplaceAction extends Action2 {
126
123
  {
127
124
  id: MenuId.SearchContext,
128
125
  when: ( ContextKeyExpr.and(
129
- ReplaceActiveKey,
130
- MatchFocusKey,
131
- IsEditableItemKey
126
+ SearchContext.ReplaceActiveKey,
127
+ SearchContext.MatchFocusKey,
128
+ SearchContext.IsEditableItemKey
132
129
  )),
133
130
  group: 'search',
134
131
  order: 1
@@ -136,9 +133,9 @@ registerAction2(class ReplaceAction extends Action2 {
136
133
  {
137
134
  id: MenuId.SearchActionMenu,
138
135
  when: ( ContextKeyExpr.and(
139
- ReplaceActiveKey,
140
- MatchFocusKey,
141
- IsEditableItemKey
136
+ SearchContext.ReplaceActiveKey,
137
+ SearchContext.MatchFocusKey,
138
+ SearchContext.IsEditableItemKey
142
139
  )),
143
140
  group: 'inline',
144
141
  order: 1
@@ -153,23 +150,20 @@ registerAction2(class ReplaceAction extends Action2 {
153
150
  registerAction2(class ReplaceAllAction extends Action2 {
154
151
  constructor() {
155
152
  super({
156
- id: ReplaceAllInFileActionId,
157
- title: {
158
- value: ( localizeWithPath(
159
- 'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
160
- 'file.replaceAll.label',
161
- "Replace All"
162
- )),
163
- original: 'Replace All'
164
- },
153
+ id: "search.action.replaceAllInFile" ,
154
+ title: ( localize2WithPath(
155
+ 'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
156
+ 'file.replaceAll.label',
157
+ "Replace All"
158
+ )),
165
159
  category,
166
160
  keybinding: {
167
161
  weight: 200 ,
168
162
  when: ( ContextKeyExpr.and(
169
- SearchViewVisibleKey,
170
- ReplaceActiveKey,
171
- FileFocusKey,
172
- IsEditableItemKey
163
+ SearchContext.SearchViewVisibleKey,
164
+ SearchContext.ReplaceActiveKey,
165
+ SearchContext.FileFocusKey,
166
+ SearchContext.IsEditableItemKey
173
167
  )),
174
168
  primary: 1024 | 2048 | 22 ,
175
169
  secondary: [2048 | 1024 | 3 ],
@@ -179,9 +173,9 @@ registerAction2(class ReplaceAllAction extends Action2 {
179
173
  {
180
174
  id: MenuId.SearchContext,
181
175
  when: ( ContextKeyExpr.and(
182
- ReplaceActiveKey,
183
- FileFocusKey,
184
- IsEditableItemKey
176
+ SearchContext.ReplaceActiveKey,
177
+ SearchContext.FileFocusKey,
178
+ SearchContext.IsEditableItemKey
185
179
  )),
186
180
  group: 'search',
187
181
  order: 1
@@ -189,9 +183,9 @@ registerAction2(class ReplaceAllAction extends Action2 {
189
183
  {
190
184
  id: MenuId.SearchActionMenu,
191
185
  when: ( ContextKeyExpr.and(
192
- ReplaceActiveKey,
193
- FileFocusKey,
194
- IsEditableItemKey
186
+ SearchContext.ReplaceActiveKey,
187
+ SearchContext.FileFocusKey,
188
+ SearchContext.IsEditableItemKey
195
189
  )),
196
190
  group: 'inline',
197
191
  order: 1
@@ -206,23 +200,20 @@ registerAction2(class ReplaceAllAction extends Action2 {
206
200
  registerAction2(class ReplaceAllInFolderAction extends Action2 {
207
201
  constructor() {
208
202
  super({
209
- id: ReplaceAllInFolderActionId,
210
- title: {
211
- value: ( localizeWithPath(
212
- 'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
213
- 'file.replaceAll.label',
214
- "Replace All"
215
- )),
216
- original: 'Replace All'
217
- },
203
+ id: "search.action.replaceAllInFolder" ,
204
+ title: ( localize2WithPath(
205
+ 'vs/workbench/contrib/search/browser/searchActionsRemoveReplace',
206
+ 'file.replaceAll.label',
207
+ "Replace All"
208
+ )),
218
209
  category,
219
210
  keybinding: {
220
211
  weight: 200 ,
221
212
  when: ( ContextKeyExpr.and(
222
- SearchViewVisibleKey,
223
- ReplaceActiveKey,
224
- FolderFocusKey,
225
- IsEditableItemKey
213
+ SearchContext.SearchViewVisibleKey,
214
+ SearchContext.ReplaceActiveKey,
215
+ SearchContext.FolderFocusKey,
216
+ SearchContext.IsEditableItemKey
226
217
  )),
227
218
  primary: 1024 | 2048 | 22 ,
228
219
  secondary: [2048 | 1024 | 3 ],
@@ -232,9 +223,9 @@ registerAction2(class ReplaceAllInFolderAction extends Action2 {
232
223
  {
233
224
  id: MenuId.SearchContext,
234
225
  when: ( ContextKeyExpr.and(
235
- ReplaceActiveKey,
236
- FolderFocusKey,
237
- IsEditableItemKey
226
+ SearchContext.ReplaceActiveKey,
227
+ SearchContext.FolderFocusKey,
228
+ SearchContext.IsEditableItemKey
238
229
  )),
239
230
  group: 'search',
240
231
  order: 1
@@ -242,9 +233,9 @@ registerAction2(class ReplaceAllInFolderAction extends Action2 {
242
233
  {
243
234
  id: MenuId.SearchActionMenu,
244
235
  when: ( ContextKeyExpr.and(
245
- ReplaceActiveKey,
246
- FolderFocusKey,
247
- IsEditableItemKey
236
+ SearchContext.ReplaceActiveKey,
237
+ SearchContext.FolderFocusKey,
238
+ SearchContext.IsEditableItemKey
248
239
  )),
249
240
  group: 'inline',
250
241
  order: 1
@@ -1,5 +1,4 @@
1
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
- import { ShowAllSymbolsActionId } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
1
+ import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
3
2
  import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
4
3
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput';
5
4
 
@@ -13,19 +12,18 @@ registerAction2(class ShowAllSymbolsAction extends Action2 {
13
12
  static { this.ALL_SYMBOLS_PREFIX = '#'; }
14
13
  constructor() {
15
14
  super({
16
- id: ShowAllSymbolsActionId,
15
+ id: "workbench.action.showAllSymbols" ,
17
16
  title: {
18
- value: ( localizeWithPath(
17
+ ...( localize2WithPath(
19
18
  'vs/workbench/contrib/search/browser/searchActionsSymbol',
20
19
  'showTriggerActions',
21
20
  "Go to Symbol in Workspace..."
22
21
  )),
23
- original: 'Go to Symbol in Workspace...',
24
22
  mnemonicTitle: ( localizeWithPath(
25
23
  'vs/workbench/contrib/search/browser/searchActionsSymbol',
26
24
  { key: 'miGotoSymbolInWorkspace', comment: ['&& denotes a mnemonic'] },
27
25
  "Go to Symbol in &&Workspace..."
28
- ))
26
+ )),
29
27
  },
30
28
  f1: true,
31
29
  keybinding: {
@@ -1,5 +1,4 @@
1
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
- import { QuickTextSearchActionId } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
1
+ import { localize2WithPath } from 'vscode/vscode/vs/nls';
3
2
  import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
4
3
  import { category } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchActionsBase';
5
4
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput';
@@ -11,15 +10,12 @@ import { getSelectionTextFromEditor } from './searchView.js';
11
10
  registerAction2(class TextSearchQuickAccessAction extends Action2 {
12
11
  constructor() {
13
12
  super({
14
- id: QuickTextSearchActionId,
15
- title: {
16
- value: ( localizeWithPath(
17
- 'vs/workbench/contrib/search/browser/searchActionsTextQuickAccess',
18
- 'quickTextSearch',
19
- "Quick Search (Experimental)"
20
- )),
21
- original: 'Quick Search (Experimental)'
22
- },
13
+ id: "workbench.action.experimental.quickTextSearch" ,
14
+ title: ( localize2WithPath(
15
+ 'vs/workbench/contrib/search/browser/searchActionsTextQuickAccess',
16
+ 'quickTextSearch',
17
+ "Quick Search (Experimental)"
18
+ )),
23
19
  category,
24
20
  f1: true
25
21
  });
@@ -1,8 +1,8 @@
1
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
1
+ import { localize2WithPath } from 'vscode/vscode/vs/nls';
2
2
  import { WorkbenchListFocusContextKey } from 'vscode/vscode/vs/platform/list/browser/listService';
3
3
  import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
4
4
  import { searchStopIcon, searchRefreshIcon, searchCollapseAllIcon, searchExpandAllIcon, searchClearIcon, searchShowAsList, searchShowAsTree } from './searchIcons.js';
5
- import { ClearSearchHistoryCommandId, CancelSearchActionId, SearchViewVisibleKey, RefreshSearchResultsActionId, ViewHasSearchPatternKey, CollapseSearchResultsActionId, HasSearchResults, ViewHasSomeCollapsibleKey, ExpandSearchResultsActionId, ClearSearchResultsActionId, ViewHasReplacePatternKey, ViewHasFilePatternKey, ViewAsTreeActionId, InTreeViewKey, ViewAsListActionId } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
5
+ import { SearchContext } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
6
6
  import { ISearchHistoryService } from 'vscode/vscode/vs/workbench/contrib/search/common/searchHistoryService';
7
7
  import { FolderMatchWorkspaceRoot, Match, FolderMatch, FolderMatchNoRoot, SearchResult, FileMatch } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchModel';
8
8
  import { VIEW_ID } from 'vscode/vscode/vs/workbench/services/search/common/search';
@@ -14,15 +14,12 @@ import { category, getSearchView } from 'vscode/vscode/vs/workbench/contrib/sear
14
14
  registerAction2(class ClearSearchHistoryCommandAction extends Action2 {
15
15
  constructor() {
16
16
  super({
17
- id: ClearSearchHistoryCommandId,
18
- title: {
19
- value: ( localizeWithPath(
20
- 'vs/workbench/contrib/search/browser/searchActionsTopBar',
21
- 'clearSearchHistoryLabel',
22
- "Clear Search History"
23
- )),
24
- original: 'Clear Search History'
25
- },
17
+ id: "search.action.clearHistory" ,
18
+ title: ( localize2WithPath(
19
+ 'vs/workbench/contrib/search/browser/searchActionsTopBar',
20
+ 'clearSearchHistoryLabel',
21
+ "Clear Search History"
22
+ )),
26
23
  category,
27
24
  f1: true
28
25
  });
@@ -34,22 +31,19 @@ registerAction2(class ClearSearchHistoryCommandAction extends Action2 {
34
31
  registerAction2(class CancelSearchAction extends Action2 {
35
32
  constructor() {
36
33
  super({
37
- id: CancelSearchActionId,
38
- title: {
39
- value: ( localizeWithPath(
40
- 'vs/workbench/contrib/search/browser/searchActionsTopBar',
41
- 'CancelSearchAction.label',
42
- "Cancel Search"
43
- )),
44
- original: 'Cancel Search'
45
- },
34
+ id: "search.action.cancel" ,
35
+ title: ( localize2WithPath(
36
+ 'vs/workbench/contrib/search/browser/searchActionsTopBar',
37
+ 'CancelSearchAction.label',
38
+ "Cancel Search"
39
+ )),
46
40
  icon: searchStopIcon,
47
41
  category,
48
42
  f1: true,
49
43
  precondition: ( ( SearchStateKey.isEqualTo(SearchUIState.Idle)).negate()),
50
44
  keybinding: {
51
45
  weight: 200 ,
52
- when: ( ContextKeyExpr.and(SearchViewVisibleKey, WorkbenchListFocusContextKey)),
46
+ when: ( ContextKeyExpr.and(SearchContext.SearchViewVisibleKey, WorkbenchListFocusContextKey)),
53
47
  primary: 9 ,
54
48
  },
55
49
  menu: [{
@@ -67,17 +61,14 @@ registerAction2(class CancelSearchAction extends Action2 {
67
61
  registerAction2(class RefreshAction extends Action2 {
68
62
  constructor() {
69
63
  super({
70
- id: RefreshSearchResultsActionId,
71
- title: {
72
- value: ( localizeWithPath(
73
- 'vs/workbench/contrib/search/browser/searchActionsTopBar',
74
- 'RefreshAction.label',
75
- "Refresh"
76
- )),
77
- original: 'Refresh'
78
- },
64
+ id: "search.action.refreshSearchResults" ,
65
+ title: ( localize2WithPath(
66
+ 'vs/workbench/contrib/search/browser/searchActionsTopBar',
67
+ 'RefreshAction.label',
68
+ "Refresh"
69
+ )),
79
70
  icon: searchRefreshIcon,
80
- precondition: ViewHasSearchPatternKey,
71
+ precondition: SearchContext.ViewHasSearchPatternKey,
81
72
  category,
82
73
  f1: true,
83
74
  menu: [{
@@ -95,24 +86,24 @@ registerAction2(class RefreshAction extends Action2 {
95
86
  registerAction2(class CollapseDeepestExpandedLevelAction extends Action2 {
96
87
  constructor() {
97
88
  super({
98
- id: CollapseSearchResultsActionId,
99
- title: {
100
- value: ( localizeWithPath(
101
- 'vs/workbench/contrib/search/browser/searchActionsTopBar',
102
- 'CollapseDeepestExpandedLevelAction.label',
103
- "Collapse All"
104
- )),
105
- original: 'Collapse All'
106
- },
89
+ id: "search.action.collapseSearchResults" ,
90
+ title: ( localize2WithPath(
91
+ 'vs/workbench/contrib/search/browser/searchActionsTopBar',
92
+ 'CollapseDeepestExpandedLevelAction.label',
93
+ "Collapse All"
94
+ )),
107
95
  category,
108
96
  icon: searchCollapseAllIcon,
109
97
  f1: true,
110
- precondition: ( ContextKeyExpr.and(HasSearchResults, ViewHasSomeCollapsibleKey)),
98
+ precondition: ( ContextKeyExpr.and(
99
+ SearchContext.HasSearchResults,
100
+ SearchContext.ViewHasSomeCollapsibleKey
101
+ )),
111
102
  menu: [{
112
103
  id: MenuId.ViewTitle,
113
104
  group: 'navigation',
114
105
  order: 3,
115
- when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_ID)), ( ContextKeyExpr.or(( HasSearchResults.negate()), ViewHasSomeCollapsibleKey)))),
106
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_ID)), ( ContextKeyExpr.or(( SearchContext.HasSearchResults.negate()), SearchContext.ViewHasSomeCollapsibleKey)))),
116
107
  }]
117
108
  });
118
109
  }
@@ -123,24 +114,21 @@ registerAction2(class CollapseDeepestExpandedLevelAction extends Action2 {
123
114
  registerAction2(class ExpandAllAction extends Action2 {
124
115
  constructor() {
125
116
  super({
126
- id: ExpandSearchResultsActionId,
127
- title: {
128
- value: ( localizeWithPath(
129
- 'vs/workbench/contrib/search/browser/searchActionsTopBar',
130
- 'ExpandAllAction.label',
131
- "Expand All"
132
- )),
133
- original: 'Expand All'
134
- },
117
+ id: "search.action.expandSearchResults" ,
118
+ title: ( localize2WithPath(
119
+ 'vs/workbench/contrib/search/browser/searchActionsTopBar',
120
+ 'ExpandAllAction.label',
121
+ "Expand All"
122
+ )),
135
123
  category,
136
124
  icon: searchExpandAllIcon,
137
125
  f1: true,
138
- precondition: ( ContextKeyExpr.and(HasSearchResults, ( ViewHasSomeCollapsibleKey.toNegated()))),
126
+ precondition: ( ContextKeyExpr.and(SearchContext.HasSearchResults, ( SearchContext.ViewHasSomeCollapsibleKey.toNegated()))),
139
127
  menu: [{
140
128
  id: MenuId.ViewTitle,
141
129
  group: 'navigation',
142
130
  order: 3,
143
- when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_ID)), HasSearchResults, ( ViewHasSomeCollapsibleKey.toNegated()))),
131
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_ID)), SearchContext.HasSearchResults, ( SearchContext.ViewHasSomeCollapsibleKey.toNegated()))),
144
132
  }]
145
133
  });
146
134
  }
@@ -151,23 +139,20 @@ registerAction2(class ExpandAllAction extends Action2 {
151
139
  registerAction2(class ClearSearchResultsAction extends Action2 {
152
140
  constructor() {
153
141
  super({
154
- id: ClearSearchResultsActionId,
155
- title: {
156
- value: ( localizeWithPath(
157
- 'vs/workbench/contrib/search/browser/searchActionsTopBar',
158
- 'ClearSearchResultsAction.label',
159
- "Clear Search Results"
160
- )),
161
- original: 'Clear Search Results'
162
- },
142
+ id: "search.action.clearSearchResults" ,
143
+ title: ( localize2WithPath(
144
+ 'vs/workbench/contrib/search/browser/searchActionsTopBar',
145
+ 'ClearSearchResultsAction.label',
146
+ "Clear Search Results"
147
+ )),
163
148
  category,
164
149
  icon: searchClearIcon,
165
150
  f1: true,
166
151
  precondition: ( ContextKeyExpr.or(
167
- HasSearchResults,
168
- ViewHasSearchPatternKey,
169
- ViewHasReplacePatternKey,
170
- ViewHasFilePatternKey
152
+ SearchContext.HasSearchResults,
153
+ SearchContext.ViewHasSearchPatternKey,
154
+ SearchContext.ViewHasReplacePatternKey,
155
+ SearchContext.ViewHasFilePatternKey
171
156
  )),
172
157
  menu: [{
173
158
  id: MenuId.ViewTitle,
@@ -184,24 +169,21 @@ registerAction2(class ClearSearchResultsAction extends Action2 {
184
169
  registerAction2(class ViewAsTreeAction extends Action2 {
185
170
  constructor() {
186
171
  super({
187
- id: ViewAsTreeActionId,
188
- title: {
189
- value: ( localizeWithPath(
190
- 'vs/workbench/contrib/search/browser/searchActionsTopBar',
191
- 'ViewAsTreeAction.label',
192
- "View as Tree"
193
- )),
194
- original: 'View as Tree'
195
- },
172
+ id: "search.action.viewAsTree" ,
173
+ title: ( localize2WithPath(
174
+ 'vs/workbench/contrib/search/browser/searchActionsTopBar',
175
+ 'ViewAsTreeAction.label',
176
+ "View as Tree"
177
+ )),
196
178
  category,
197
179
  icon: searchShowAsList,
198
180
  f1: true,
199
- precondition: ( ContextKeyExpr.and(HasSearchResults, ( InTreeViewKey.toNegated()))),
181
+ precondition: ( ContextKeyExpr.and(SearchContext.HasSearchResults, ( SearchContext.InTreeViewKey.toNegated()))),
200
182
  menu: [{
201
183
  id: MenuId.ViewTitle,
202
184
  group: 'navigation',
203
185
  order: 2,
204
- when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_ID)), ( InTreeViewKey.toNegated()))),
186
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_ID)), ( SearchContext.InTreeViewKey.toNegated()))),
205
187
  }]
206
188
  });
207
189
  }
@@ -215,24 +197,24 @@ registerAction2(class ViewAsTreeAction extends Action2 {
215
197
  registerAction2(class ViewAsListAction extends Action2 {
216
198
  constructor() {
217
199
  super({
218
- id: ViewAsListActionId,
219
- title: {
220
- value: ( localizeWithPath(
221
- 'vs/workbench/contrib/search/browser/searchActionsTopBar',
222
- 'ViewAsListAction.label',
223
- "View as List"
224
- )),
225
- original: 'View as List'
226
- },
200
+ id: "search.action.viewAsList" ,
201
+ title: ( localize2WithPath(
202
+ 'vs/workbench/contrib/search/browser/searchActionsTopBar',
203
+ 'ViewAsListAction.label',
204
+ "View as List"
205
+ )),
227
206
  category,
228
207
  icon: searchShowAsTree,
229
208
  f1: true,
230
- precondition: ( ContextKeyExpr.and(HasSearchResults, InTreeViewKey)),
209
+ precondition: ( ContextKeyExpr.and(
210
+ SearchContext.HasSearchResults,
211
+ SearchContext.InTreeViewKey
212
+ )),
231
213
  menu: [{
232
214
  id: MenuId.ViewTitle,
233
215
  group: 'navigation',
234
216
  order: 2,
235
- when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_ID)), InTreeViewKey)),
217
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', VIEW_ID)), SearchContext.InTreeViewKey)),
236
218
  }]
237
219
  });
238
220
  }
@@ -15,8 +15,8 @@ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/c
15
15
  import { MenuWorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
16
16
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
17
17
  import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
18
- import { MatchFocusKey, FileFocusKey, FolderFocusKey, IsEditableItemKey } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
19
18
  import { defaultCountBadgeStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
19
+ import { SearchContext } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
20
20
 
21
21
  var FolderMatchRenderer_1, FileMatchRenderer_1, MatchRenderer_1;
22
22
  class SearchDelegate {
@@ -85,9 +85,9 @@ let FolderMatchRenderer = class FolderMatchRenderer extends Disposable {
85
85
  const elementDisposables = ( new DisposableStore());
86
86
  disposables.add(elementDisposables);
87
87
  const contextKeyServiceMain = disposables.add(this.contextKeyService.createScoped(container));
88
- MatchFocusKey.bindTo(contextKeyServiceMain).set(false);
89
- FileFocusKey.bindTo(contextKeyServiceMain).set(false);
90
- FolderFocusKey.bindTo(contextKeyServiceMain).set(true);
88
+ SearchContext.MatchFocusKey.bindTo(contextKeyServiceMain).set(false);
89
+ SearchContext.FileFocusKey.bindTo(contextKeyServiceMain).set(false);
90
+ SearchContext.FolderFocusKey.bindTo(contextKeyServiceMain).set(true);
91
91
  const instantiationService = this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyServiceMain])));
92
92
  const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
93
93
  menuOptions: {
@@ -125,9 +125,9 @@ let FolderMatchRenderer = class FolderMatchRenderer extends Disposable {
125
125
  "Other files"
126
126
  )));
127
127
  }
128
- IsEditableItemKey.bindTo(templateData.contextKeyService).set(!folderMatch.hasOnlyReadOnlyMatches());
128
+ SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!folderMatch.hasOnlyReadOnlyMatches());
129
129
  templateData.elementDisposables.add(folderMatch.onChange(() => {
130
- IsEditableItemKey.bindTo(templateData.contextKeyService).set(!folderMatch.hasOnlyReadOnlyMatches());
130
+ SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!folderMatch.hasOnlyReadOnlyMatches());
131
131
  }));
132
132
  this.renderFolderDetails(folderMatch, templateData);
133
133
  }
@@ -189,9 +189,9 @@ let FileMatchRenderer = class FileMatchRenderer extends Disposable {
189
189
  const badge = ( new CountBadge(append(fileMatchElement, $('.badge')), {}, defaultCountBadgeStyles));
190
190
  const actionBarContainer = append(fileMatchElement, $('.actionBarContainer'));
191
191
  const contextKeyServiceMain = disposables.add(this.contextKeyService.createScoped(container));
192
- MatchFocusKey.bindTo(contextKeyServiceMain).set(false);
193
- FileFocusKey.bindTo(contextKeyServiceMain).set(true);
194
- FolderFocusKey.bindTo(contextKeyServiceMain).set(false);
192
+ SearchContext.MatchFocusKey.bindTo(contextKeyServiceMain).set(false);
193
+ SearchContext.FileFocusKey.bindTo(contextKeyServiceMain).set(true);
194
+ SearchContext.FolderFocusKey.bindTo(contextKeyServiceMain).set(false);
195
195
  const instantiationService = this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyServiceMain])));
196
196
  const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
197
197
  menuOptions: {
@@ -231,9 +231,9 @@ let FileMatchRenderer = class FileMatchRenderer extends Disposable {
231
231
  count
232
232
  )));
233
233
  templateData.actions.context = { viewer: this.searchView.getControl(), element: fileMatch };
234
- IsEditableItemKey.bindTo(templateData.contextKeyService).set(!fileMatch.hasOnlyReadOnlyMatches());
234
+ SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!fileMatch.hasOnlyReadOnlyMatches());
235
235
  templateData.elementDisposables.add(fileMatch.onChange(() => {
236
- IsEditableItemKey.bindTo(templateData.contextKeyService).set(!fileMatch.hasOnlyReadOnlyMatches());
236
+ SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!fileMatch.hasOnlyReadOnlyMatches());
237
237
  }));
238
238
  const twistieContainer = templateData.el.parentElement?.parentElement?.querySelector('.monaco-tl-twistie');
239
239
  twistieContainer?.classList.add('force-twistie');
@@ -277,9 +277,9 @@ let MatchRenderer = class MatchRenderer extends Disposable {
277
277
  const actionBarContainer = append(container, $('span.actionBarContainer'));
278
278
  const disposables = ( new DisposableStore());
279
279
  const contextKeyServiceMain = disposables.add(this.contextKeyService.createScoped(container));
280
- MatchFocusKey.bindTo(contextKeyServiceMain).set(true);
281
- FileFocusKey.bindTo(contextKeyServiceMain).set(false);
282
- FolderFocusKey.bindTo(contextKeyServiceMain).set(false);
280
+ SearchContext.MatchFocusKey.bindTo(contextKeyServiceMain).set(true);
281
+ SearchContext.FileFocusKey.bindTo(contextKeyServiceMain).set(false);
282
+ SearchContext.FolderFocusKey.bindTo(contextKeyServiceMain).set(false);
283
283
  const instantiationService = this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyServiceMain])));
284
284
  const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
285
285
  menuOptions: {
@@ -314,7 +314,7 @@ let MatchRenderer = class MatchRenderer extends Disposable {
314
314
  templateData.replace.textContent = replace ? match.replaceString : '';
315
315
  templateData.after.textContent = preview.after;
316
316
  templateData.parent.title = (preview.fullBefore + (replace ? match.replaceString : preview.inside) + preview.after).trim().substr(0, 999);
317
- IsEditableItemKey.bindTo(templateData.contextKeyService).set(!(match instanceof MatchInNotebook && match.isReadonly()));
317
+ SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!(match instanceof MatchInNotebook && match.isReadonly()));
318
318
  const numLines = match.range().endLineNumber - match.range().startLineNumber;
319
319
  const extraLinesStr = numLines > 0 ? `+${numLines}` : '';
320
320
  const showLineNumbers = this.configurationService.getValue('search').showLineNumbers;