@theia/search-in-workspace 1.34.2 → 1.34.3

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.
Files changed (50) hide show
  1. package/LICENSE +641 -641
  2. package/README.md +40 -40
  3. package/lib/browser/components/search-in-workspace-input.d.ts +39 -39
  4. package/lib/browser/components/search-in-workspace-input.js +120 -120
  5. package/lib/browser/search-in-workspace-context-key-service.d.ts +23 -23
  6. package/lib/browser/search-in-workspace-context-key-service.js +90 -90
  7. package/lib/browser/search-in-workspace-factory.d.ts +10 -10
  8. package/lib/browser/search-in-workspace-factory.js +68 -68
  9. package/lib/browser/search-in-workspace-frontend-contribution.d.ts +53 -53
  10. package/lib/browser/search-in-workspace-frontend-contribution.js +410 -410
  11. package/lib/browser/search-in-workspace-frontend-module.d.ts +6 -6
  12. package/lib/browser/search-in-workspace-frontend-module.js +70 -70
  13. package/lib/browser/search-in-workspace-label-provider.d.ts +9 -9
  14. package/lib/browser/search-in-workspace-label-provider.js +57 -57
  15. package/lib/browser/search-in-workspace-preferences.d.ts +17 -17
  16. package/lib/browser/search-in-workspace-preferences.js +82 -82
  17. package/lib/browser/search-in-workspace-result-tree-widget.d.ts +253 -253
  18. package/lib/browser/search-in-workspace-result-tree-widget.js +1072 -1072
  19. package/lib/browser/search-in-workspace-service.d.ts +35 -35
  20. package/lib/browser/search-in-workspace-service.js +158 -158
  21. package/lib/browser/search-in-workspace-widget.d.ts +121 -121
  22. package/lib/browser/search-in-workspace-widget.js +602 -602
  23. package/lib/browser/search-layout-migrations.d.ts +5 -5
  24. package/lib/browser/search-layout-migrations.js +64 -64
  25. package/lib/common/search-in-workspace-interface.d.ts +112 -112
  26. package/lib/common/search-in-workspace-interface.js +35 -35
  27. package/lib/node/ripgrep-search-in-workspace-server.d.ts +94 -94
  28. package/lib/node/ripgrep-search-in-workspace-server.js +423 -423
  29. package/lib/node/ripgrep-search-in-workspace-server.slow-spec.d.ts +1 -1
  30. package/lib/node/ripgrep-search-in-workspace-server.slow-spec.js +899 -899
  31. package/lib/node/search-in-workspace-backend-module.d.ts +3 -3
  32. package/lib/node/search-in-workspace-backend-module.js +32 -32
  33. package/package.json +9 -9
  34. package/src/browser/components/search-in-workspace-input.tsx +139 -139
  35. package/src/browser/search-in-workspace-context-key-service.ts +93 -93
  36. package/src/browser/search-in-workspace-factory.ts +59 -59
  37. package/src/browser/search-in-workspace-frontend-contribution.ts +402 -402
  38. package/src/browser/search-in-workspace-frontend-module.ts +82 -82
  39. package/src/browser/search-in-workspace-label-provider.ts +48 -48
  40. package/src/browser/search-in-workspace-preferences.ts +91 -91
  41. package/src/browser/search-in-workspace-result-tree-widget.tsx +1225 -1225
  42. package/src/browser/search-in-workspace-service.ts +152 -152
  43. package/src/browser/search-in-workspace-widget.tsx +711 -711
  44. package/src/browser/search-layout-migrations.ts +53 -53
  45. package/src/browser/styles/index.css +367 -367
  46. package/src/browser/styles/search.svg +6 -6
  47. package/src/common/search-in-workspace-interface.ts +149 -149
  48. package/src/node/ripgrep-search-in-workspace-server.slow-spec.ts +1073 -1073
  49. package/src/node/ripgrep-search-in-workspace-server.ts +482 -482
  50. package/src/node/search-in-workspace-backend-module.ts +33 -33
@@ -1,411 +1,411 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 TypeFox and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.SearchInWorkspaceFrontendContribution = exports.SearchInWorkspaceCommands = void 0;
28
- const browser_1 = require("@theia/core/lib/browser");
29
- const search_in_workspace_widget_1 = require("./search-in-workspace-widget");
30
- const inversify_1 = require("@theia/core/shared/inversify");
31
- const core_1 = require("@theia/core");
32
- const widgets_1 = require("@theia/core/lib/browser/widgets");
33
- const navigator_contribution_1 = require("@theia/navigator/lib/browser/navigator-contribution");
34
- const uri_command_handler_1 = require("@theia/core/lib/common/uri-command-handler");
35
- const browser_2 = require("@theia/workspace/lib/browser");
36
- const search_in_workspace_context_key_service_1 = require("./search-in-workspace-context-key-service");
37
- const editor_manager_1 = require("@theia/editor/lib/browser/editor-manager");
38
- const vscode_languageserver_protocol_1 = require("@theia/core/shared/vscode-languageserver-protocol");
39
- const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
40
- const search_in_workspace_factory_1 = require("./search-in-workspace-factory");
41
- const search_in_workspace_result_tree_widget_1 = require("./search-in-workspace-result-tree-widget");
42
- const tree_widget_selection_1 = require("@theia/core/lib/browser/tree/tree-widget-selection");
43
- const clipboard_service_1 = require("@theia/core/lib/browser/clipboard-service");
44
- const theme_1 = require("@theia/core/lib/common/theme");
45
- var SearchInWorkspaceCommands;
46
- (function (SearchInWorkspaceCommands) {
47
- const SEARCH_CATEGORY = 'Search';
48
- SearchInWorkspaceCommands.TOGGLE_SIW_WIDGET = {
49
- id: 'search-in-workspace.toggle'
50
- };
51
- SearchInWorkspaceCommands.OPEN_SIW_WIDGET = core_1.Command.toDefaultLocalizedCommand({
52
- id: 'search-in-workspace.open',
53
- category: SEARCH_CATEGORY,
54
- label: 'Find in Files'
55
- });
56
- SearchInWorkspaceCommands.REPLACE_IN_FILES = core_1.Command.toDefaultLocalizedCommand({
57
- id: 'search-in-workspace.replace',
58
- category: SEARCH_CATEGORY,
59
- label: 'Replace in Files'
60
- });
61
- SearchInWorkspaceCommands.FIND_IN_FOLDER = core_1.Command.toDefaultLocalizedCommand({
62
- id: 'search-in-workspace.in-folder',
63
- category: SEARCH_CATEGORY,
64
- label: 'Find in Folder...'
65
- });
66
- SearchInWorkspaceCommands.REFRESH_RESULTS = core_1.Command.toDefaultLocalizedCommand({
67
- id: 'search-in-workspace.refresh',
68
- category: SEARCH_CATEGORY,
69
- label: 'Refresh',
70
- iconClass: (0, widgets_1.codicon)('refresh')
71
- });
72
- SearchInWorkspaceCommands.CANCEL_SEARCH = core_1.Command.toDefaultLocalizedCommand({
73
- id: 'search-in-workspace.cancel',
74
- category: SEARCH_CATEGORY,
75
- label: 'Cancel Search',
76
- iconClass: (0, widgets_1.codicon)('search-stop')
77
- });
78
- SearchInWorkspaceCommands.COLLAPSE_ALL = core_1.Command.toDefaultLocalizedCommand({
79
- id: 'search-in-workspace.collapse-all',
80
- category: SEARCH_CATEGORY,
81
- label: 'Collapse All',
82
- iconClass: (0, widgets_1.codicon)('collapse-all')
83
- });
84
- SearchInWorkspaceCommands.EXPAND_ALL = core_1.Command.toDefaultLocalizedCommand({
85
- id: 'search-in-workspace.expand-all',
86
- category: SEARCH_CATEGORY,
87
- label: 'Expand All',
88
- iconClass: (0, widgets_1.codicon)('expand-all')
89
- });
90
- SearchInWorkspaceCommands.CLEAR_ALL = core_1.Command.toDefaultLocalizedCommand({
91
- id: 'search-in-workspace.clear-all',
92
- category: SEARCH_CATEGORY,
93
- label: 'Clear Search Results',
94
- iconClass: (0, widgets_1.codicon)('clear-all')
95
- });
96
- SearchInWorkspaceCommands.COPY_ALL = core_1.Command.toDefaultLocalizedCommand({
97
- id: 'search.action.copyAll',
98
- category: SEARCH_CATEGORY,
99
- label: 'Copy All',
100
- });
101
- SearchInWorkspaceCommands.COPY_ONE = core_1.Command.toDefaultLocalizedCommand({
102
- id: 'search.action.copyMatch',
103
- category: SEARCH_CATEGORY,
104
- label: 'Copy',
105
- });
106
- SearchInWorkspaceCommands.DISMISS_RESULT = core_1.Command.toDefaultLocalizedCommand({
107
- id: 'search.action.remove',
108
- category: SEARCH_CATEGORY,
109
- label: 'Dismiss',
110
- });
111
- })(SearchInWorkspaceCommands = exports.SearchInWorkspaceCommands || (exports.SearchInWorkspaceCommands = {}));
112
- let SearchInWorkspaceFrontendContribution = class SearchInWorkspaceFrontendContribution extends browser_1.AbstractViewContribution {
113
- constructor() {
114
- super({
115
- viewContainerId: search_in_workspace_factory_1.SEARCH_VIEW_CONTAINER_ID,
116
- widgetId: search_in_workspace_widget_1.SearchInWorkspaceWidget.ID,
117
- widgetName: search_in_workspace_widget_1.SearchInWorkspaceWidget.LABEL,
118
- defaultWidgetOptions: {
119
- area: 'left',
120
- rank: 200
121
- },
122
- toggleCommandId: SearchInWorkspaceCommands.TOGGLE_SIW_WIDGET.id
123
- });
124
- }
125
- init() {
126
- const updateFocusContextKey = () => this.contextKeyService.searchViewletFocus.set(this.shell.activeWidget instanceof search_in_workspace_widget_1.SearchInWorkspaceWidget);
127
- updateFocusContextKey();
128
- this.shell.onDidChangeActiveWidget(updateFocusContextKey);
129
- }
130
- async initializeLayout(app) {
131
- await this.openView({ activate: false });
132
- }
133
- async registerCommands(commands) {
134
- super.registerCommands(commands);
135
- commands.registerCommand(SearchInWorkspaceCommands.OPEN_SIW_WIDGET, {
136
- isEnabled: () => this.workspaceService.tryGetRoots().length > 0,
137
- execute: async () => {
138
- const widget = await this.openView({ activate: true });
139
- widget.updateSearchTerm(this.getSearchTerm());
140
- }
141
- });
142
- commands.registerCommand(SearchInWorkspaceCommands.REPLACE_IN_FILES, {
143
- isEnabled: () => this.workspaceService.tryGetRoots().length > 0,
144
- execute: async () => {
145
- const widget = await this.openView({ activate: true });
146
- widget.updateSearchTerm(this.getSearchTerm(), true);
147
- }
148
- });
149
- commands.registerCommand(SearchInWorkspaceCommands.FIND_IN_FOLDER, this.newMultiUriAwareCommandHandler({
150
- execute: async (uris) => {
151
- const resources = [];
152
- for (const { stat } of await this.fileService.resolveAll(uris.map(resource => ({ resource })))) {
153
- if (stat) {
154
- const uri = stat.resource;
155
- let uriStr = this.labelProvider.getLongName(uri);
156
- if (stat && !stat.isDirectory) {
157
- uriStr = this.labelProvider.getLongName(uri.parent);
158
- }
159
- resources.push(uriStr);
160
- }
161
- }
162
- const widget = await this.openView({ activate: true });
163
- widget.findInFolder(resources);
164
- }
165
- }));
166
- commands.registerCommand(SearchInWorkspaceCommands.CANCEL_SEARCH, {
167
- execute: w => this.withWidget(w, widget => widget.getCancelIndicator() && widget.getCancelIndicator().cancel()),
168
- isEnabled: w => this.withWidget(w, widget => widget.getCancelIndicator() !== undefined),
169
- isVisible: w => this.withWidget(w, widget => widget.getCancelIndicator() !== undefined)
170
- });
171
- commands.registerCommand(SearchInWorkspaceCommands.REFRESH_RESULTS, {
172
- execute: w => this.withWidget(w, widget => widget.refresh()),
173
- isEnabled: w => this.withWidget(w, widget => (widget.hasResultList() || widget.hasSearchTerm()) && this.workspaceService.tryGetRoots().length > 0),
174
- isVisible: w => this.withWidget(w, () => true)
175
- });
176
- commands.registerCommand(SearchInWorkspaceCommands.COLLAPSE_ALL, {
177
- execute: w => this.withWidget(w, widget => widget.collapseAll()),
178
- isEnabled: w => this.withWidget(w, widget => widget.hasResultList()),
179
- isVisible: w => this.withWidget(w, widget => !widget.areResultsCollapsed())
180
- });
181
- commands.registerCommand(SearchInWorkspaceCommands.EXPAND_ALL, {
182
- execute: w => this.withWidget(w, widget => widget.expandAll()),
183
- isEnabled: w => this.withWidget(w, widget => widget.hasResultList()),
184
- isVisible: w => this.withWidget(w, widget => widget.areResultsCollapsed())
185
- });
186
- commands.registerCommand(SearchInWorkspaceCommands.CLEAR_ALL, {
187
- execute: w => this.withWidget(w, widget => widget.clear()),
188
- isEnabled: w => this.withWidget(w, widget => widget.hasResultList()),
189
- isVisible: w => this.withWidget(w, () => true)
190
- });
191
- commands.registerCommand(SearchInWorkspaceCommands.DISMISS_RESULT, {
192
- isEnabled: () => this.withWidget(undefined, widget => {
193
- const { selection } = this.selectionService;
194
- return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
195
- }),
196
- isVisible: () => this.withWidget(undefined, widget => {
197
- const { selection } = this.selectionService;
198
- return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
199
- }),
200
- execute: () => this.withWidget(undefined, widget => {
201
- const { selection } = this.selectionService;
202
- if (tree_widget_selection_1.TreeWidgetSelection.is(selection)) {
203
- widget.resultTreeWidget.removeNode(selection[0]);
204
- }
205
- })
206
- });
207
- commands.registerCommand(SearchInWorkspaceCommands.COPY_ONE, {
208
- isEnabled: () => this.withWidget(undefined, widget => {
209
- const { selection } = this.selectionService;
210
- return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
211
- }),
212
- isVisible: () => this.withWidget(undefined, widget => {
213
- const { selection } = this.selectionService;
214
- return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
215
- }),
216
- execute: () => this.withWidget(undefined, widget => {
217
- const { selection } = this.selectionService;
218
- if (tree_widget_selection_1.TreeWidgetSelection.is(selection)) {
219
- const string = widget.resultTreeWidget.nodeToString(selection[0], true);
220
- if (string.length !== 0) {
221
- this.clipboardService.writeText(string);
222
- }
223
- }
224
- })
225
- });
226
- commands.registerCommand(SearchInWorkspaceCommands.COPY_ALL, {
227
- isEnabled: () => this.withWidget(undefined, widget => {
228
- const { selection } = this.selectionService;
229
- return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
230
- }),
231
- isVisible: () => this.withWidget(undefined, widget => {
232
- const { selection } = this.selectionService;
233
- return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
234
- }),
235
- execute: () => this.withWidget(undefined, widget => {
236
- const { selection } = this.selectionService;
237
- if (tree_widget_selection_1.TreeWidgetSelection.is(selection)) {
238
- const string = widget.resultTreeWidget.treeToString();
239
- if (string.length !== 0) {
240
- this.clipboardService.writeText(string);
241
- }
242
- }
243
- })
244
- });
245
- }
246
- withWidget(widget = this.tryGetWidget(), fn) {
247
- if (widget instanceof search_in_workspace_widget_1.SearchInWorkspaceWidget && widget.id === search_in_workspace_widget_1.SearchInWorkspaceWidget.ID) {
248
- return fn(widget);
249
- }
250
- return false;
251
- }
252
- /**
253
- * Get the search term based on current editor selection.
254
- * @returns the selection if available.
255
- */
256
- getSearchTerm() {
257
- if (!this.editorManager.currentEditor) {
258
- return '';
259
- }
260
- // Get the current editor selection.
261
- const selection = this.editorManager.currentEditor.editor.selection;
262
- // Compute the selection range.
263
- const selectedRange = vscode_languageserver_protocol_1.Range.create(selection.start.line, selection.start.character, selection.end.line, selection.end.character);
264
- // Return the selection text if available, else return empty.
265
- return this.editorManager.currentEditor
266
- ? this.editorManager.currentEditor.editor.document.getText(selectedRange)
267
- : '';
268
- }
269
- registerKeybindings(keybindings) {
270
- super.registerKeybindings(keybindings);
271
- keybindings.registerKeybinding({
272
- command: SearchInWorkspaceCommands.OPEN_SIW_WIDGET.id,
273
- keybinding: 'ctrlcmd+shift+f'
274
- });
275
- keybindings.registerKeybinding({
276
- command: SearchInWorkspaceCommands.FIND_IN_FOLDER.id,
277
- keybinding: 'shift+alt+f',
278
- when: 'explorerResourceIsFolder'
279
- });
280
- }
281
- registerMenus(menus) {
282
- super.registerMenus(menus);
283
- menus.registerMenuAction(navigator_contribution_1.NavigatorContextMenu.SEARCH, {
284
- commandId: SearchInWorkspaceCommands.FIND_IN_FOLDER.id,
285
- when: 'explorerResourceIsFolder'
286
- });
287
- menus.registerMenuAction(browser_1.CommonMenus.EDIT_FIND, {
288
- commandId: SearchInWorkspaceCommands.OPEN_SIW_WIDGET.id,
289
- order: '2'
290
- });
291
- menus.registerMenuAction(browser_1.CommonMenus.EDIT_FIND, {
292
- commandId: SearchInWorkspaceCommands.REPLACE_IN_FILES.id,
293
- order: '3'
294
- });
295
- menus.registerMenuAction(search_in_workspace_result_tree_widget_1.SearchInWorkspaceResultTreeWidget.Menus.INTERNAL, {
296
- commandId: SearchInWorkspaceCommands.DISMISS_RESULT.id,
297
- order: '1'
298
- });
299
- menus.registerMenuAction(search_in_workspace_result_tree_widget_1.SearchInWorkspaceResultTreeWidget.Menus.COPY, {
300
- commandId: SearchInWorkspaceCommands.COPY_ONE.id,
301
- order: '1',
302
- });
303
- menus.registerMenuAction(search_in_workspace_result_tree_widget_1.SearchInWorkspaceResultTreeWidget.Menus.COPY, {
304
- commandId: browser_1.CommonCommands.COPY_PATH.id,
305
- order: '2',
306
- });
307
- menus.registerMenuAction(search_in_workspace_result_tree_widget_1.SearchInWorkspaceResultTreeWidget.Menus.COPY, {
308
- commandId: SearchInWorkspaceCommands.COPY_ALL.id,
309
- order: '3',
310
- });
311
- menus.registerMenuAction(search_in_workspace_result_tree_widget_1.SearchInWorkspaceResultTreeWidget.Menus.EXTERNAL, {
312
- commandId: navigator_contribution_1.FileNavigatorCommands.REVEAL_IN_NAVIGATOR.id,
313
- order: '1',
314
- });
315
- }
316
- async registerToolbarItems(toolbarRegistry) {
317
- const widget = await this.widget;
318
- const onDidChange = widget.onDidUpdate;
319
- toolbarRegistry.registerItem({
320
- id: SearchInWorkspaceCommands.CANCEL_SEARCH.id,
321
- command: SearchInWorkspaceCommands.CANCEL_SEARCH.id,
322
- tooltip: SearchInWorkspaceCommands.CANCEL_SEARCH.label,
323
- priority: 0,
324
- onDidChange
325
- });
326
- toolbarRegistry.registerItem({
327
- id: SearchInWorkspaceCommands.REFRESH_RESULTS.id,
328
- command: SearchInWorkspaceCommands.REFRESH_RESULTS.id,
329
- tooltip: SearchInWorkspaceCommands.REFRESH_RESULTS.label,
330
- priority: 1,
331
- onDidChange
332
- });
333
- toolbarRegistry.registerItem({
334
- id: SearchInWorkspaceCommands.CLEAR_ALL.id,
335
- command: SearchInWorkspaceCommands.CLEAR_ALL.id,
336
- tooltip: SearchInWorkspaceCommands.CLEAR_ALL.label,
337
- priority: 2,
338
- onDidChange
339
- });
340
- toolbarRegistry.registerItem({
341
- id: SearchInWorkspaceCommands.COLLAPSE_ALL.id,
342
- command: SearchInWorkspaceCommands.COLLAPSE_ALL.id,
343
- tooltip: SearchInWorkspaceCommands.COLLAPSE_ALL.label,
344
- priority: 3,
345
- onDidChange
346
- });
347
- toolbarRegistry.registerItem({
348
- id: SearchInWorkspaceCommands.EXPAND_ALL.id,
349
- command: SearchInWorkspaceCommands.EXPAND_ALL.id,
350
- tooltip: SearchInWorkspaceCommands.EXPAND_ALL.label,
351
- priority: 3,
352
- onDidChange
353
- });
354
- }
355
- newUriAwareCommandHandler(handler) {
356
- return uri_command_handler_1.UriAwareCommandHandler.MonoSelect(this.selectionService, handler);
357
- }
358
- newMultiUriAwareCommandHandler(handler) {
359
- return uri_command_handler_1.UriAwareCommandHandler.MultiSelect(this.selectionService, handler);
360
- }
361
- registerThemeStyle(theme, collector) {
362
- const contrastBorder = theme.getColor('contrastBorder');
363
- if (contrastBorder && (0, theme_1.isHighContrast)(theme.type)) {
364
- collector.addRule(`
365
- .t-siw-search-container .searchHeader .search-field-container {
366
- border-color: ${contrastBorder};
367
- }
368
- `);
369
- }
370
- }
371
- };
372
- __decorate([
373
- (0, inversify_1.inject)(core_1.SelectionService),
374
- __metadata("design:type", core_1.SelectionService)
375
- ], SearchInWorkspaceFrontendContribution.prototype, "selectionService", void 0);
376
- __decorate([
377
- (0, inversify_1.inject)(browser_1.LabelProvider),
378
- __metadata("design:type", browser_1.LabelProvider)
379
- ], SearchInWorkspaceFrontendContribution.prototype, "labelProvider", void 0);
380
- __decorate([
381
- (0, inversify_1.inject)(browser_2.WorkspaceService),
382
- __metadata("design:type", browser_2.WorkspaceService)
383
- ], SearchInWorkspaceFrontendContribution.prototype, "workspaceService", void 0);
384
- __decorate([
385
- (0, inversify_1.inject)(file_service_1.FileService),
386
- __metadata("design:type", file_service_1.FileService)
387
- ], SearchInWorkspaceFrontendContribution.prototype, "fileService", void 0);
388
- __decorate([
389
- (0, inversify_1.inject)(editor_manager_1.EditorManager),
390
- __metadata("design:type", editor_manager_1.EditorManager)
391
- ], SearchInWorkspaceFrontendContribution.prototype, "editorManager", void 0);
392
- __decorate([
393
- (0, inversify_1.inject)(clipboard_service_1.ClipboardService),
394
- __metadata("design:type", Object)
395
- ], SearchInWorkspaceFrontendContribution.prototype, "clipboardService", void 0);
396
- __decorate([
397
- (0, inversify_1.inject)(search_in_workspace_context_key_service_1.SearchInWorkspaceContextKeyService),
398
- __metadata("design:type", search_in_workspace_context_key_service_1.SearchInWorkspaceContextKeyService)
399
- ], SearchInWorkspaceFrontendContribution.prototype, "contextKeyService", void 0);
400
- __decorate([
401
- (0, inversify_1.postConstruct)(),
402
- __metadata("design:type", Function),
403
- __metadata("design:paramtypes", []),
404
- __metadata("design:returntype", void 0)
405
- ], SearchInWorkspaceFrontendContribution.prototype, "init", null);
406
- SearchInWorkspaceFrontendContribution = __decorate([
407
- (0, inversify_1.injectable)(),
408
- __metadata("design:paramtypes", [])
409
- ], SearchInWorkspaceFrontendContribution);
410
- exports.SearchInWorkspaceFrontendContribution = SearchInWorkspaceFrontendContribution;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2018 TypeFox and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.SearchInWorkspaceFrontendContribution = exports.SearchInWorkspaceCommands = void 0;
28
+ const browser_1 = require("@theia/core/lib/browser");
29
+ const search_in_workspace_widget_1 = require("./search-in-workspace-widget");
30
+ const inversify_1 = require("@theia/core/shared/inversify");
31
+ const core_1 = require("@theia/core");
32
+ const widgets_1 = require("@theia/core/lib/browser/widgets");
33
+ const navigator_contribution_1 = require("@theia/navigator/lib/browser/navigator-contribution");
34
+ const uri_command_handler_1 = require("@theia/core/lib/common/uri-command-handler");
35
+ const browser_2 = require("@theia/workspace/lib/browser");
36
+ const search_in_workspace_context_key_service_1 = require("./search-in-workspace-context-key-service");
37
+ const editor_manager_1 = require("@theia/editor/lib/browser/editor-manager");
38
+ const vscode_languageserver_protocol_1 = require("@theia/core/shared/vscode-languageserver-protocol");
39
+ const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
40
+ const search_in_workspace_factory_1 = require("./search-in-workspace-factory");
41
+ const search_in_workspace_result_tree_widget_1 = require("./search-in-workspace-result-tree-widget");
42
+ const tree_widget_selection_1 = require("@theia/core/lib/browser/tree/tree-widget-selection");
43
+ const clipboard_service_1 = require("@theia/core/lib/browser/clipboard-service");
44
+ const theme_1 = require("@theia/core/lib/common/theme");
45
+ var SearchInWorkspaceCommands;
46
+ (function (SearchInWorkspaceCommands) {
47
+ const SEARCH_CATEGORY = 'Search';
48
+ SearchInWorkspaceCommands.TOGGLE_SIW_WIDGET = {
49
+ id: 'search-in-workspace.toggle'
50
+ };
51
+ SearchInWorkspaceCommands.OPEN_SIW_WIDGET = core_1.Command.toDefaultLocalizedCommand({
52
+ id: 'search-in-workspace.open',
53
+ category: SEARCH_CATEGORY,
54
+ label: 'Find in Files'
55
+ });
56
+ SearchInWorkspaceCommands.REPLACE_IN_FILES = core_1.Command.toDefaultLocalizedCommand({
57
+ id: 'search-in-workspace.replace',
58
+ category: SEARCH_CATEGORY,
59
+ label: 'Replace in Files'
60
+ });
61
+ SearchInWorkspaceCommands.FIND_IN_FOLDER = core_1.Command.toDefaultLocalizedCommand({
62
+ id: 'search-in-workspace.in-folder',
63
+ category: SEARCH_CATEGORY,
64
+ label: 'Find in Folder...'
65
+ });
66
+ SearchInWorkspaceCommands.REFRESH_RESULTS = core_1.Command.toDefaultLocalizedCommand({
67
+ id: 'search-in-workspace.refresh',
68
+ category: SEARCH_CATEGORY,
69
+ label: 'Refresh',
70
+ iconClass: (0, widgets_1.codicon)('refresh')
71
+ });
72
+ SearchInWorkspaceCommands.CANCEL_SEARCH = core_1.Command.toDefaultLocalizedCommand({
73
+ id: 'search-in-workspace.cancel',
74
+ category: SEARCH_CATEGORY,
75
+ label: 'Cancel Search',
76
+ iconClass: (0, widgets_1.codicon)('search-stop')
77
+ });
78
+ SearchInWorkspaceCommands.COLLAPSE_ALL = core_1.Command.toDefaultLocalizedCommand({
79
+ id: 'search-in-workspace.collapse-all',
80
+ category: SEARCH_CATEGORY,
81
+ label: 'Collapse All',
82
+ iconClass: (0, widgets_1.codicon)('collapse-all')
83
+ });
84
+ SearchInWorkspaceCommands.EXPAND_ALL = core_1.Command.toDefaultLocalizedCommand({
85
+ id: 'search-in-workspace.expand-all',
86
+ category: SEARCH_CATEGORY,
87
+ label: 'Expand All',
88
+ iconClass: (0, widgets_1.codicon)('expand-all')
89
+ });
90
+ SearchInWorkspaceCommands.CLEAR_ALL = core_1.Command.toDefaultLocalizedCommand({
91
+ id: 'search-in-workspace.clear-all',
92
+ category: SEARCH_CATEGORY,
93
+ label: 'Clear Search Results',
94
+ iconClass: (0, widgets_1.codicon)('clear-all')
95
+ });
96
+ SearchInWorkspaceCommands.COPY_ALL = core_1.Command.toDefaultLocalizedCommand({
97
+ id: 'search.action.copyAll',
98
+ category: SEARCH_CATEGORY,
99
+ label: 'Copy All',
100
+ });
101
+ SearchInWorkspaceCommands.COPY_ONE = core_1.Command.toDefaultLocalizedCommand({
102
+ id: 'search.action.copyMatch',
103
+ category: SEARCH_CATEGORY,
104
+ label: 'Copy',
105
+ });
106
+ SearchInWorkspaceCommands.DISMISS_RESULT = core_1.Command.toDefaultLocalizedCommand({
107
+ id: 'search.action.remove',
108
+ category: SEARCH_CATEGORY,
109
+ label: 'Dismiss',
110
+ });
111
+ })(SearchInWorkspaceCommands = exports.SearchInWorkspaceCommands || (exports.SearchInWorkspaceCommands = {}));
112
+ let SearchInWorkspaceFrontendContribution = class SearchInWorkspaceFrontendContribution extends browser_1.AbstractViewContribution {
113
+ constructor() {
114
+ super({
115
+ viewContainerId: search_in_workspace_factory_1.SEARCH_VIEW_CONTAINER_ID,
116
+ widgetId: search_in_workspace_widget_1.SearchInWorkspaceWidget.ID,
117
+ widgetName: search_in_workspace_widget_1.SearchInWorkspaceWidget.LABEL,
118
+ defaultWidgetOptions: {
119
+ area: 'left',
120
+ rank: 200
121
+ },
122
+ toggleCommandId: SearchInWorkspaceCommands.TOGGLE_SIW_WIDGET.id
123
+ });
124
+ }
125
+ init() {
126
+ const updateFocusContextKey = () => this.contextKeyService.searchViewletFocus.set(this.shell.activeWidget instanceof search_in_workspace_widget_1.SearchInWorkspaceWidget);
127
+ updateFocusContextKey();
128
+ this.shell.onDidChangeActiveWidget(updateFocusContextKey);
129
+ }
130
+ async initializeLayout(app) {
131
+ await this.openView({ activate: false });
132
+ }
133
+ async registerCommands(commands) {
134
+ super.registerCommands(commands);
135
+ commands.registerCommand(SearchInWorkspaceCommands.OPEN_SIW_WIDGET, {
136
+ isEnabled: () => this.workspaceService.tryGetRoots().length > 0,
137
+ execute: async () => {
138
+ const widget = await this.openView({ activate: true });
139
+ widget.updateSearchTerm(this.getSearchTerm());
140
+ }
141
+ });
142
+ commands.registerCommand(SearchInWorkspaceCommands.REPLACE_IN_FILES, {
143
+ isEnabled: () => this.workspaceService.tryGetRoots().length > 0,
144
+ execute: async () => {
145
+ const widget = await this.openView({ activate: true });
146
+ widget.updateSearchTerm(this.getSearchTerm(), true);
147
+ }
148
+ });
149
+ commands.registerCommand(SearchInWorkspaceCommands.FIND_IN_FOLDER, this.newMultiUriAwareCommandHandler({
150
+ execute: async (uris) => {
151
+ const resources = [];
152
+ for (const { stat } of await this.fileService.resolveAll(uris.map(resource => ({ resource })))) {
153
+ if (stat) {
154
+ const uri = stat.resource;
155
+ let uriStr = this.labelProvider.getLongName(uri);
156
+ if (stat && !stat.isDirectory) {
157
+ uriStr = this.labelProvider.getLongName(uri.parent);
158
+ }
159
+ resources.push(uriStr);
160
+ }
161
+ }
162
+ const widget = await this.openView({ activate: true });
163
+ widget.findInFolder(resources);
164
+ }
165
+ }));
166
+ commands.registerCommand(SearchInWorkspaceCommands.CANCEL_SEARCH, {
167
+ execute: w => this.withWidget(w, widget => widget.getCancelIndicator() && widget.getCancelIndicator().cancel()),
168
+ isEnabled: w => this.withWidget(w, widget => widget.getCancelIndicator() !== undefined),
169
+ isVisible: w => this.withWidget(w, widget => widget.getCancelIndicator() !== undefined)
170
+ });
171
+ commands.registerCommand(SearchInWorkspaceCommands.REFRESH_RESULTS, {
172
+ execute: w => this.withWidget(w, widget => widget.refresh()),
173
+ isEnabled: w => this.withWidget(w, widget => (widget.hasResultList() || widget.hasSearchTerm()) && this.workspaceService.tryGetRoots().length > 0),
174
+ isVisible: w => this.withWidget(w, () => true)
175
+ });
176
+ commands.registerCommand(SearchInWorkspaceCommands.COLLAPSE_ALL, {
177
+ execute: w => this.withWidget(w, widget => widget.collapseAll()),
178
+ isEnabled: w => this.withWidget(w, widget => widget.hasResultList()),
179
+ isVisible: w => this.withWidget(w, widget => !widget.areResultsCollapsed())
180
+ });
181
+ commands.registerCommand(SearchInWorkspaceCommands.EXPAND_ALL, {
182
+ execute: w => this.withWidget(w, widget => widget.expandAll()),
183
+ isEnabled: w => this.withWidget(w, widget => widget.hasResultList()),
184
+ isVisible: w => this.withWidget(w, widget => widget.areResultsCollapsed())
185
+ });
186
+ commands.registerCommand(SearchInWorkspaceCommands.CLEAR_ALL, {
187
+ execute: w => this.withWidget(w, widget => widget.clear()),
188
+ isEnabled: w => this.withWidget(w, widget => widget.hasResultList()),
189
+ isVisible: w => this.withWidget(w, () => true)
190
+ });
191
+ commands.registerCommand(SearchInWorkspaceCommands.DISMISS_RESULT, {
192
+ isEnabled: () => this.withWidget(undefined, widget => {
193
+ const { selection } = this.selectionService;
194
+ return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
195
+ }),
196
+ isVisible: () => this.withWidget(undefined, widget => {
197
+ const { selection } = this.selectionService;
198
+ return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
199
+ }),
200
+ execute: () => this.withWidget(undefined, widget => {
201
+ const { selection } = this.selectionService;
202
+ if (tree_widget_selection_1.TreeWidgetSelection.is(selection)) {
203
+ widget.resultTreeWidget.removeNode(selection[0]);
204
+ }
205
+ })
206
+ });
207
+ commands.registerCommand(SearchInWorkspaceCommands.COPY_ONE, {
208
+ isEnabled: () => this.withWidget(undefined, widget => {
209
+ const { selection } = this.selectionService;
210
+ return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
211
+ }),
212
+ isVisible: () => this.withWidget(undefined, widget => {
213
+ const { selection } = this.selectionService;
214
+ return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
215
+ }),
216
+ execute: () => this.withWidget(undefined, widget => {
217
+ const { selection } = this.selectionService;
218
+ if (tree_widget_selection_1.TreeWidgetSelection.is(selection)) {
219
+ const string = widget.resultTreeWidget.nodeToString(selection[0], true);
220
+ if (string.length !== 0) {
221
+ this.clipboardService.writeText(string);
222
+ }
223
+ }
224
+ })
225
+ });
226
+ commands.registerCommand(SearchInWorkspaceCommands.COPY_ALL, {
227
+ isEnabled: () => this.withWidget(undefined, widget => {
228
+ const { selection } = this.selectionService;
229
+ return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
230
+ }),
231
+ isVisible: () => this.withWidget(undefined, widget => {
232
+ const { selection } = this.selectionService;
233
+ return tree_widget_selection_1.TreeWidgetSelection.isSource(selection, widget.resultTreeWidget) && selection.length > 0;
234
+ }),
235
+ execute: () => this.withWidget(undefined, widget => {
236
+ const { selection } = this.selectionService;
237
+ if (tree_widget_selection_1.TreeWidgetSelection.is(selection)) {
238
+ const string = widget.resultTreeWidget.treeToString();
239
+ if (string.length !== 0) {
240
+ this.clipboardService.writeText(string);
241
+ }
242
+ }
243
+ })
244
+ });
245
+ }
246
+ withWidget(widget = this.tryGetWidget(), fn) {
247
+ if (widget instanceof search_in_workspace_widget_1.SearchInWorkspaceWidget && widget.id === search_in_workspace_widget_1.SearchInWorkspaceWidget.ID) {
248
+ return fn(widget);
249
+ }
250
+ return false;
251
+ }
252
+ /**
253
+ * Get the search term based on current editor selection.
254
+ * @returns the selection if available.
255
+ */
256
+ getSearchTerm() {
257
+ if (!this.editorManager.currentEditor) {
258
+ return '';
259
+ }
260
+ // Get the current editor selection.
261
+ const selection = this.editorManager.currentEditor.editor.selection;
262
+ // Compute the selection range.
263
+ const selectedRange = vscode_languageserver_protocol_1.Range.create(selection.start.line, selection.start.character, selection.end.line, selection.end.character);
264
+ // Return the selection text if available, else return empty.
265
+ return this.editorManager.currentEditor
266
+ ? this.editorManager.currentEditor.editor.document.getText(selectedRange)
267
+ : '';
268
+ }
269
+ registerKeybindings(keybindings) {
270
+ super.registerKeybindings(keybindings);
271
+ keybindings.registerKeybinding({
272
+ command: SearchInWorkspaceCommands.OPEN_SIW_WIDGET.id,
273
+ keybinding: 'ctrlcmd+shift+f'
274
+ });
275
+ keybindings.registerKeybinding({
276
+ command: SearchInWorkspaceCommands.FIND_IN_FOLDER.id,
277
+ keybinding: 'shift+alt+f',
278
+ when: 'explorerResourceIsFolder'
279
+ });
280
+ }
281
+ registerMenus(menus) {
282
+ super.registerMenus(menus);
283
+ menus.registerMenuAction(navigator_contribution_1.NavigatorContextMenu.SEARCH, {
284
+ commandId: SearchInWorkspaceCommands.FIND_IN_FOLDER.id,
285
+ when: 'explorerResourceIsFolder'
286
+ });
287
+ menus.registerMenuAction(browser_1.CommonMenus.EDIT_FIND, {
288
+ commandId: SearchInWorkspaceCommands.OPEN_SIW_WIDGET.id,
289
+ order: '2'
290
+ });
291
+ menus.registerMenuAction(browser_1.CommonMenus.EDIT_FIND, {
292
+ commandId: SearchInWorkspaceCommands.REPLACE_IN_FILES.id,
293
+ order: '3'
294
+ });
295
+ menus.registerMenuAction(search_in_workspace_result_tree_widget_1.SearchInWorkspaceResultTreeWidget.Menus.INTERNAL, {
296
+ commandId: SearchInWorkspaceCommands.DISMISS_RESULT.id,
297
+ order: '1'
298
+ });
299
+ menus.registerMenuAction(search_in_workspace_result_tree_widget_1.SearchInWorkspaceResultTreeWidget.Menus.COPY, {
300
+ commandId: SearchInWorkspaceCommands.COPY_ONE.id,
301
+ order: '1',
302
+ });
303
+ menus.registerMenuAction(search_in_workspace_result_tree_widget_1.SearchInWorkspaceResultTreeWidget.Menus.COPY, {
304
+ commandId: browser_1.CommonCommands.COPY_PATH.id,
305
+ order: '2',
306
+ });
307
+ menus.registerMenuAction(search_in_workspace_result_tree_widget_1.SearchInWorkspaceResultTreeWidget.Menus.COPY, {
308
+ commandId: SearchInWorkspaceCommands.COPY_ALL.id,
309
+ order: '3',
310
+ });
311
+ menus.registerMenuAction(search_in_workspace_result_tree_widget_1.SearchInWorkspaceResultTreeWidget.Menus.EXTERNAL, {
312
+ commandId: navigator_contribution_1.FileNavigatorCommands.REVEAL_IN_NAVIGATOR.id,
313
+ order: '1',
314
+ });
315
+ }
316
+ async registerToolbarItems(toolbarRegistry) {
317
+ const widget = await this.widget;
318
+ const onDidChange = widget.onDidUpdate;
319
+ toolbarRegistry.registerItem({
320
+ id: SearchInWorkspaceCommands.CANCEL_SEARCH.id,
321
+ command: SearchInWorkspaceCommands.CANCEL_SEARCH.id,
322
+ tooltip: SearchInWorkspaceCommands.CANCEL_SEARCH.label,
323
+ priority: 0,
324
+ onDidChange
325
+ });
326
+ toolbarRegistry.registerItem({
327
+ id: SearchInWorkspaceCommands.REFRESH_RESULTS.id,
328
+ command: SearchInWorkspaceCommands.REFRESH_RESULTS.id,
329
+ tooltip: SearchInWorkspaceCommands.REFRESH_RESULTS.label,
330
+ priority: 1,
331
+ onDidChange
332
+ });
333
+ toolbarRegistry.registerItem({
334
+ id: SearchInWorkspaceCommands.CLEAR_ALL.id,
335
+ command: SearchInWorkspaceCommands.CLEAR_ALL.id,
336
+ tooltip: SearchInWorkspaceCommands.CLEAR_ALL.label,
337
+ priority: 2,
338
+ onDidChange
339
+ });
340
+ toolbarRegistry.registerItem({
341
+ id: SearchInWorkspaceCommands.COLLAPSE_ALL.id,
342
+ command: SearchInWorkspaceCommands.COLLAPSE_ALL.id,
343
+ tooltip: SearchInWorkspaceCommands.COLLAPSE_ALL.label,
344
+ priority: 3,
345
+ onDidChange
346
+ });
347
+ toolbarRegistry.registerItem({
348
+ id: SearchInWorkspaceCommands.EXPAND_ALL.id,
349
+ command: SearchInWorkspaceCommands.EXPAND_ALL.id,
350
+ tooltip: SearchInWorkspaceCommands.EXPAND_ALL.label,
351
+ priority: 3,
352
+ onDidChange
353
+ });
354
+ }
355
+ newUriAwareCommandHandler(handler) {
356
+ return uri_command_handler_1.UriAwareCommandHandler.MonoSelect(this.selectionService, handler);
357
+ }
358
+ newMultiUriAwareCommandHandler(handler) {
359
+ return uri_command_handler_1.UriAwareCommandHandler.MultiSelect(this.selectionService, handler);
360
+ }
361
+ registerThemeStyle(theme, collector) {
362
+ const contrastBorder = theme.getColor('contrastBorder');
363
+ if (contrastBorder && (0, theme_1.isHighContrast)(theme.type)) {
364
+ collector.addRule(`
365
+ .t-siw-search-container .searchHeader .search-field-container {
366
+ border-color: ${contrastBorder};
367
+ }
368
+ `);
369
+ }
370
+ }
371
+ };
372
+ __decorate([
373
+ (0, inversify_1.inject)(core_1.SelectionService),
374
+ __metadata("design:type", core_1.SelectionService)
375
+ ], SearchInWorkspaceFrontendContribution.prototype, "selectionService", void 0);
376
+ __decorate([
377
+ (0, inversify_1.inject)(browser_1.LabelProvider),
378
+ __metadata("design:type", browser_1.LabelProvider)
379
+ ], SearchInWorkspaceFrontendContribution.prototype, "labelProvider", void 0);
380
+ __decorate([
381
+ (0, inversify_1.inject)(browser_2.WorkspaceService),
382
+ __metadata("design:type", browser_2.WorkspaceService)
383
+ ], SearchInWorkspaceFrontendContribution.prototype, "workspaceService", void 0);
384
+ __decorate([
385
+ (0, inversify_1.inject)(file_service_1.FileService),
386
+ __metadata("design:type", file_service_1.FileService)
387
+ ], SearchInWorkspaceFrontendContribution.prototype, "fileService", void 0);
388
+ __decorate([
389
+ (0, inversify_1.inject)(editor_manager_1.EditorManager),
390
+ __metadata("design:type", editor_manager_1.EditorManager)
391
+ ], SearchInWorkspaceFrontendContribution.prototype, "editorManager", void 0);
392
+ __decorate([
393
+ (0, inversify_1.inject)(clipboard_service_1.ClipboardService),
394
+ __metadata("design:type", Object)
395
+ ], SearchInWorkspaceFrontendContribution.prototype, "clipboardService", void 0);
396
+ __decorate([
397
+ (0, inversify_1.inject)(search_in_workspace_context_key_service_1.SearchInWorkspaceContextKeyService),
398
+ __metadata("design:type", search_in_workspace_context_key_service_1.SearchInWorkspaceContextKeyService)
399
+ ], SearchInWorkspaceFrontendContribution.prototype, "contextKeyService", void 0);
400
+ __decorate([
401
+ (0, inversify_1.postConstruct)(),
402
+ __metadata("design:type", Function),
403
+ __metadata("design:paramtypes", []),
404
+ __metadata("design:returntype", void 0)
405
+ ], SearchInWorkspaceFrontendContribution.prototype, "init", null);
406
+ SearchInWorkspaceFrontendContribution = __decorate([
407
+ (0, inversify_1.injectable)(),
408
+ __metadata("design:paramtypes", [])
409
+ ], SearchInWorkspaceFrontendContribution);
410
+ exports.SearchInWorkspaceFrontendContribution = SearchInWorkspaceFrontendContribution;
411
411
  //# sourceMappingURL=search-in-workspace-frontend-contribution.js.map