@theia/plugin-ext-vscode 1.77.0-next.99 → 1.77.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.
Files changed (74) hide show
  1. package/lib/browser/plugin-vscode-commands-contribution.js +209 -236
  2. package/lib/browser/plugin-vscode-commands-contribution.js.map +1 -1
  3. package/lib/browser/plugin-vscode-commands-contribution.spec.js +61 -64
  4. package/lib/browser/plugin-vscode-commands-contribution.spec.js.map +1 -1
  5. package/lib/browser/plugin-vscode-contribution.js +11 -14
  6. package/lib/browser/plugin-vscode-contribution.js.map +1 -1
  7. package/lib/browser/plugin-vscode-frontend-module.js +12 -14
  8. package/lib/browser/plugin-vscode-frontend-module.js.map +1 -1
  9. package/lib/common/plugin-vscode-environment.js +12 -16
  10. package/lib/common/plugin-vscode-environment.js.map +1 -1
  11. package/lib/common/plugin-vscode-types.d.ts +1 -1
  12. package/lib/common/plugin-vscode-types.js +3 -6
  13. package/lib/common/plugin-vscode-types.js.map +1 -1
  14. package/lib/common/plugin-vscode-uri.js +5 -9
  15. package/lib/common/plugin-vscode-uri.js.map +1 -1
  16. package/lib/node/context/plugin-vscode-init-fe.d.ts +1 -2
  17. package/lib/node/context/plugin-vscode-init-fe.d.ts.map +1 -1
  18. package/lib/node/context/plugin-vscode-init-fe.js +3 -2
  19. package/lib/node/context/plugin-vscode-init-fe.js.map +1 -1
  20. package/lib/node/local-vsix-file-plugin-deployer-resolver.d.ts +3 -1
  21. package/lib/node/local-vsix-file-plugin-deployer-resolver.d.ts.map +1 -1
  22. package/lib/node/local-vsix-file-plugin-deployer-resolver.js +31 -32
  23. package/lib/node/local-vsix-file-plugin-deployer-resolver.js.map +1 -1
  24. package/lib/node/package.spec.d.ts +1 -0
  25. package/lib/node/package.spec.js +1 -1
  26. package/lib/node/package.spec.js.map +1 -1
  27. package/lib/node/plugin-vscode-backend-module.js +22 -24
  28. package/lib/node/plugin-vscode-backend-module.js.map +1 -1
  29. package/lib/node/plugin-vscode-cli-contribution.js +10 -13
  30. package/lib/node/plugin-vscode-cli-contribution.js.map +1 -1
  31. package/lib/node/plugin-vscode-deployer-participant.d.ts +1 -1
  32. package/lib/node/plugin-vscode-deployer-participant.d.ts.map +1 -1
  33. package/lib/node/plugin-vscode-deployer-participant.js +17 -22
  34. package/lib/node/plugin-vscode-deployer-participant.js.map +1 -1
  35. package/lib/node/plugin-vscode-directory-handler.js +23 -28
  36. package/lib/node/plugin-vscode-directory-handler.js.map +1 -1
  37. package/lib/node/plugin-vscode-file-handler.d.ts +3 -1
  38. package/lib/node/plugin-vscode-file-handler.d.ts.map +1 -1
  39. package/lib/node/plugin-vscode-file-handler.js +26 -28
  40. package/lib/node/plugin-vscode-file-handler.js.map +1 -1
  41. package/lib/node/plugin-vscode-init.d.ts.map +1 -1
  42. package/lib/node/plugin-vscode-init.js +12 -16
  43. package/lib/node/plugin-vscode-init.js.map +1 -1
  44. package/lib/node/plugin-vscode-init.spec.js +8 -11
  45. package/lib/node/plugin-vscode-init.spec.js.map +1 -1
  46. package/lib/node/plugin-vscode-utils.d.ts +6 -4
  47. package/lib/node/plugin-vscode-utils.d.ts.map +1 -1
  48. package/lib/node/plugin-vscode-utils.js +24 -32
  49. package/lib/node/plugin-vscode-utils.js.map +1 -1
  50. package/lib/node/plugin-vscode-utils.spec.d.ts +2 -0
  51. package/lib/node/plugin-vscode-utils.spec.d.ts.map +1 -0
  52. package/lib/node/plugin-vscode-utils.spec.js +151 -0
  53. package/lib/node/plugin-vscode-utils.spec.js.map +1 -0
  54. package/lib/node/scanner-vscode.js +19 -22
  55. package/lib/node/scanner-vscode.js.map +1 -1
  56. package/lib/node/scanner-vscode.spec.js +12 -15
  57. package/lib/node/scanner-vscode.spec.js.map +1 -1
  58. package/package.json +26 -19
  59. package/src/browser/plugin-vscode-commands-contribution.spec.ts +2 -2
  60. package/src/browser/plugin-vscode-commands-contribution.ts +1 -1
  61. package/src/browser/plugin-vscode-frontend-module.ts +3 -3
  62. package/src/node/context/plugin-vscode-init-fe.ts +2 -1
  63. package/src/node/local-vsix-file-plugin-deployer-resolver.ts +10 -6
  64. package/src/node/plugin-vscode-backend-module.ts +7 -7
  65. package/src/node/plugin-vscode-cli-contribution.ts +1 -1
  66. package/src/node/plugin-vscode-deployer-participant.ts +2 -2
  67. package/src/node/plugin-vscode-directory-handler.ts +1 -1
  68. package/src/node/plugin-vscode-file-handler.ts +7 -3
  69. package/src/node/plugin-vscode-init.spec.ts +1 -1
  70. package/src/node/plugin-vscode-init.ts +4 -3
  71. package/src/node/plugin-vscode-utils.spec.ts +170 -0
  72. package/src/node/plugin-vscode-utils.ts +26 -11
  73. package/src/node/scanner-vscode.spec.ts +1 -1
  74. package/src/node/scanner-vscode.ts +2 -2
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  // *****************************************************************************
3
2
  // Copyright (C) 2018 Red Hat, Inc. and others.
4
3
  //
@@ -14,57 +13,55 @@
14
13
  //
15
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
15
  // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.PluginVscodeCommandsContribution = exports.VscodeCommands = void 0;
19
- const tslib_1 = require("tslib");
20
- const core_1 = require("@theia/core");
21
- const browser_1 = require("@theia/core/lib/browser");
22
- const context_key_service_1 = require("@theia/core/lib/browser/context-key-service");
23
- const application_shell_mouse_tracker_1 = require("@theia/core/lib/browser/shell/application-shell-mouse-tracker");
24
- const command_1 = require("@theia/core/lib/common/command");
25
- const uri_1 = tslib_1.__importDefault(require("@theia/core/lib/common/uri"));
26
- const browser_2 = require("@theia/editor/lib/browser");
27
- const documents_main_1 = require("@theia/plugin-ext/lib/main/browser/documents-main");
28
- const type_converters_1 = require("@theia/plugin-ext/lib/plugin/type-converters");
29
- const browser_3 = require("@theia/workspace/lib/browser");
30
- const workspace_service_1 = require("@theia/workspace/lib/browser/workspace-service");
31
- const diff_service_1 = require("@theia/workspace/lib/browser/diff-service");
32
- const inversify_1 = require("@theia/core/shared/inversify");
33
- const vscode_uri_1 = require("@theia/core/shared/vscode-uri");
34
- const plugin_protocol_1 = require("@theia/plugin-ext/lib/common/plugin-protocol");
35
- const terminal_frontend_contribution_1 = require("@theia/terminal/lib/browser/terminal-frontend-contribution");
36
- const quick_open_workspace_1 = require("@theia/workspace/lib/browser/quick-open-workspace");
37
- const terminal_service_1 = require("@theia/terminal/lib/browser/base/terminal-service");
38
- const navigator_contribution_1 = require("@theia/navigator/lib/browser/navigator-contribution");
39
- const browser_4 = require("@theia/navigator/lib/browser");
40
- const tree_selection_1 = require("@theia/core/lib/browser/tree/tree-selection");
41
- const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
42
- const browser_5 = require("@theia/callhierarchy/lib/browser");
43
- const browser_6 = require("@theia/typehierarchy/lib/browser");
44
- const monaco_text_model_service_1 = require("@theia/monaco/lib/browser/monaco-text-model-service");
45
- const hierarchy_types_converters_1 = require("@theia/plugin-ext/lib/main/browser/hierarchy/hierarchy-types-converters");
46
- const custom_editor_opener_1 = require("@theia/plugin-ext/lib/main/browser/custom-editors/custom-editor-opener");
47
- const nls_1 = require("@theia/core/lib/common/nls");
48
- const window_service_1 = require("@theia/core/lib/browser/window/window-service");
49
- const monaco = tslib_1.__importStar(require("@theia/monaco-editor-core"));
50
- const plugin_vscode_uri_1 = require("../common/plugin-vscode-uri");
51
- const vscode_theia_menu_mappings_1 = require("@theia/plugin-ext/lib/main/browser/menus/vscode-theia-menu-mappings");
52
- const outline_view_contribution_1 = require("@theia/outline-view/lib/browser/outline-view-contribution");
53
- const monaco_languages_1 = require("@theia/monaco/lib/browser/monaco-languages");
54
- const scm_contribution_1 = require("@theia/scm/lib/browser/scm-contribution");
55
- const scm_service_1 = require("@theia/scm/lib/browser/scm-service");
56
- const merge_editor_1 = require("@theia/scm/lib/browser/merge-editor/merge-editor");
57
- const multi_diff_editor_1 = require("@theia/scm/lib/browser/multi-diff-editor/multi-diff-editor");
16
+ import { __decorate } from "tslib";
17
+ import { environment, isOSX, CancellationTokenSource, MessageService, isArray, ILogger, MEMORY_TEXT_READONLY } from '@theia/core';
18
+ import { ApplicationShell, CommonCommands, NavigatableWidget, open, OpenerService, QuickInputService, Saveable } from '@theia/core/lib/browser';
19
+ import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
20
+ import { ApplicationShellMouseTracker } from '@theia/core/lib/browser/shell/application-shell-mouse-tracker';
21
+ import { CommandService } from '@theia/core/lib/common/command';
22
+ import TheiaURI from '@theia/core/lib/common/uri';
23
+ import { EditorManager, EditorCommands } from '@theia/editor/lib/browser';
24
+ import { DocumentsMainImpl } from '@theia/plugin-ext/lib/main/browser/documents-main';
25
+ import { isUriComponents, toMergedSymbol, toPosition } from '@theia/plugin-ext/lib/plugin/type-converters';
26
+ import { WorkspaceCommands } from '@theia/workspace/lib/browser';
27
+ import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
28
+ import { DiffService } from '@theia/workspace/lib/browser/diff-service';
29
+ import { inject, injectable, optional, named } from '@theia/core/shared/inversify';
30
+ import { URI } from '@theia/core/shared/vscode-uri';
31
+ import { DuplicateExtensionError, PluginIdentifiers, PluginServer } from '@theia/plugin-ext/lib/common/plugin-protocol';
32
+ import { TerminalFrontendContribution } from '@theia/terminal/lib/browser/terminal-frontend-contribution';
33
+ import { QuickOpenWorkspace } from '@theia/workspace/lib/browser/quick-open-workspace';
34
+ import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
35
+ import { FileNavigatorCommands, FILE_NAVIGATOR_TOGGLE_COMMAND_ID } from '@theia/navigator/lib/browser/navigator-contribution';
36
+ import { FILE_NAVIGATOR_ID, FileNavigatorWidget } from '@theia/navigator/lib/browser';
37
+ import { SelectableTreeNode } from '@theia/core/lib/browser/tree/tree-selection';
38
+ import { FileService } from '@theia/filesystem/lib/browser/file-service';
39
+ import { CallHierarchyServiceProvider } from '@theia/callhierarchy/lib/browser';
40
+ import { TypeHierarchyServiceProvider } from '@theia/typehierarchy/lib/browser';
41
+ import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service';
42
+ import { fromCallHierarchyCalleeToModelCallHierarchyOutgoingCall, fromCallHierarchyCallerToModelCallHierarchyIncomingCall, fromItemHierarchyDefinition, toItemHierarchyDefinition } from '@theia/plugin-ext/lib/main/browser/hierarchy/hierarchy-types-converters';
43
+ import { CustomEditorOpener } from '@theia/plugin-ext/lib/main/browser/custom-editors/custom-editor-opener';
44
+ import { nls } from '@theia/core/lib/common/nls';
45
+ import { WindowService } from '@theia/core/lib/browser/window/window-service';
46
+ import * as monaco from '@theia/monaco-editor-core';
47
+ import { VSCodeExtensionUri } from '../common/plugin-vscode-uri.js';
48
+ import { CodeEditorWidgetUtil } from '@theia/plugin-ext/lib/main/browser/menus/vscode-theia-menu-mappings';
49
+ import { OutlineViewContribution } from '@theia/outline-view/lib/browser/outline-view-contribution';
50
+ import { MonacoLanguages } from '@theia/monaco/lib/browser/monaco-languages';
51
+ import { ScmContribution } from '@theia/scm/lib/browser/scm-contribution';
52
+ import { ScmService } from '@theia/scm/lib/browser/scm-service';
53
+ import { MergeEditorUri } from '@theia/scm/lib/browser/merge-editor/merge-editor';
54
+ import { MultiDiffEditorUri } from '@theia/scm/lib/browser/multi-diff-editor/multi-diff-editor';
58
55
  function toTheiaUri(value) {
59
56
  if (value === undefined) {
60
57
  return undefined;
61
58
  }
62
59
  if (typeof value === 'string') {
63
- return new uri_1.default(value);
60
+ return new TheiaURI(value);
64
61
  }
65
- return uri_1.default.fromComponents(value);
62
+ return TheiaURI.fromComponents(value);
66
63
  }
67
- var VscodeCommands;
64
+ export var VscodeCommands;
68
65
  (function (VscodeCommands) {
69
66
  VscodeCommands.GET_CODE_EXCHANGE_ENDPOINTS = {
70
67
  id: 'workbench.getCodeExchangeProxyEndpoints' // this command is used in the github auth built-in
@@ -92,7 +89,7 @@ var VscodeCommands;
92
89
  VscodeCommands.INSTALL_EXTENSION_FROM_VSIX_COMMAND = {
93
90
  id: 'workbench.extensions.command.installFromVSIX'
94
91
  };
95
- })(VscodeCommands || (exports.VscodeCommands = VscodeCommands = {}));
92
+ })(VscodeCommands || (VscodeCommands = {}));
96
93
  function isInDirection(source, candidate, direction) {
97
94
  const sourceCenter = rectCenter(source);
98
95
  const candidateCenter = rectCenter(candidate);
@@ -155,7 +152,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
155
152
  if (!resource) {
156
153
  throw new Error(`${commandId} command requires at least URI argument.`);
157
154
  }
158
- if (!vscode_uri_1.URI.isUri(resource)) {
155
+ if (!URI.isUri(resource)) {
159
156
  throw new Error(`Invalid argument for ${commandId} command with URI argument. Found ${resource}`);
160
157
  }
161
158
  let options;
@@ -169,8 +166,8 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
169
166
  ...columnOrOptions
170
167
  };
171
168
  }
172
- const uri = new uri_1.default(resource);
173
- const editorOptions = documents_main_1.DocumentsMainImpl.toEditorOpenerOptions(this.shell, options);
169
+ const uri = new TheiaURI(resource);
170
+ const editorOptions = DocumentsMainImpl.toEditorOpenerOptions(this.shell, options);
174
171
  let openHandler;
175
172
  if (typeof openerId === 'string') {
176
173
  const lowerViewType = openerId.toLowerCase();
@@ -292,14 +289,14 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
292
289
  isVisible: () => false,
293
290
  execute: async (resource, columnOrOptions) => {
294
291
  if (typeof resource === 'string') {
295
- resource = vscode_uri_1.URI.parse(resource);
292
+ resource = URI.parse(resource);
296
293
  }
297
294
  try {
298
295
  await this.openWith(VscodeCommands.OPEN.id, resource, columnOrOptions);
299
296
  }
300
297
  catch (error) {
301
- const message = nls_1.nls.localizeByDefault("Unable to open '{0}'", resource.path);
302
- const reason = nls_1.nls.localizeByDefault('Error: {0}', error.message);
298
+ const message = nls.localizeByDefault("Unable to open '{0}'", resource.path);
299
+ const reason = nls.localizeByDefault('Error: {0}', error.message);
303
300
  this.messageService.error(`${message}\n${reason}`);
304
301
  this.logger.warn(error);
305
302
  }
@@ -316,7 +313,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
316
313
  }
317
314
  let result = await this.openWith(VscodeCommands.OPEN_WITH.id, resource, columnOrOptions, viewType);
318
315
  if (!result) {
319
- result = await this.openWith(VscodeCommands.OPEN_WITH.id, resource, columnOrOptions, custom_editor_opener_1.CustomEditorOpener.toCustomEditorId(viewType));
316
+ result = await this.openWith(VscodeCommands.OPEN_WITH.id, resource, columnOrOptions, CustomEditorOpener.toCustomEditorId(viewType));
320
317
  }
321
318
  if (!result) {
322
319
  throw new Error(`Could not find an editor for '${viewType}'`);
@@ -327,9 +324,9 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
327
324
  isVisible: () => false,
328
325
  execute: async (resource, arg = {}) => {
329
326
  if (!resource) {
330
- return commands.executeCommand(browser_3.WorkspaceCommands.OPEN_WORKSPACE.id);
327
+ return commands.executeCommand(WorkspaceCommands.OPEN_WORKSPACE.id);
331
328
  }
332
- if (!vscode_uri_1.URI.isUri(resource)) {
329
+ if (!URI.isUri(resource)) {
333
330
  throw new Error(`Invalid argument for ${VscodeCommands.OPEN_FOLDER.id} command with URI argument. Found ${resource}`);
334
331
  }
335
332
  let options;
@@ -339,7 +336,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
339
336
  else {
340
337
  options = { preserveWindow: !arg.forceNewWindow };
341
338
  }
342
- this.workspaceService.open(new uri_1.default(resource), options);
339
+ this.workspaceService.open(new TheiaURI(resource), options);
343
340
  }
344
341
  });
345
342
  commands.registerCommand(VscodeCommands.DIFF, {
@@ -349,15 +346,15 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
349
346
  if (!left || !right) {
350
347
  throw new Error(`${VscodeCommands.DIFF} command requires at least two URI arguments. Found left=${left}, right=${right} as arguments`);
351
348
  }
352
- if (!vscode_uri_1.URI.isUri(left)) {
349
+ if (!URI.isUri(left)) {
353
350
  throw new Error(`Invalid argument for ${VscodeCommands.DIFF.id} command with left argument. Expecting URI left type but found ${left}`);
354
351
  }
355
- if (!vscode_uri_1.URI.isUri(right)) {
352
+ if (!URI.isUri(right)) {
356
353
  throw new Error(`Invalid argument for ${VscodeCommands.DIFF.id} command with right argument. Expecting URI right type but found ${right}`);
357
354
  }
358
- const leftURI = new uri_1.default(left);
359
- const editorOptions = documents_main_1.DocumentsMainImpl.toEditorOpenerOptions(this.shell, options);
360
- await this.diffService.openDiffEditor(leftURI, new uri_1.default(right), label, editorOptions);
355
+ const leftURI = new TheiaURI(left);
356
+ const editorOptions = DocumentsMainImpl.toEditorOpenerOptions(this.shell, options);
357
+ await this.diffService.openDiffEditor(leftURI, new TheiaURI(right), label, editorOptions);
361
358
  }
362
359
  });
363
360
  // https://code.visualstudio.com/docs/getstarted/keybindings#_navigation
@@ -369,47 +366,47 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
369
366
  * because of it we filter out editors from views based on `NavigatableWidget.is`
370
367
  * and apply actions only to them
371
368
  */
372
- if (!core_1.environment.electron.is() || core_1.isOSX) {
369
+ if (!environment.electron.is() || isOSX) {
373
370
  commands.registerCommand({ id: 'workbench.action.files.openFileFolder' }, {
374
- execute: () => commands.executeCommand(browser_3.WorkspaceCommands.OPEN.id)
371
+ execute: () => commands.executeCommand(WorkspaceCommands.OPEN.id)
375
372
  });
376
- commands.registerAlias('workbench.action.files.openFileFolder', browser_3.WorkspaceCommands.OPEN.id);
373
+ commands.registerAlias('workbench.action.files.openFileFolder', WorkspaceCommands.OPEN.id);
377
374
  }
378
375
  commands.registerCommand({ id: 'workbench.action.files.openFile' }, {
379
- execute: () => commands.executeCommand(browser_3.WorkspaceCommands.OPEN_FILE.id)
376
+ execute: () => commands.executeCommand(WorkspaceCommands.OPEN_FILE.id)
380
377
  });
381
- commands.registerAlias('workbench.action.files.openFile', browser_3.WorkspaceCommands.OPEN_FILE.id);
378
+ commands.registerAlias('workbench.action.files.openFile', WorkspaceCommands.OPEN_FILE.id);
382
379
  commands.registerCommand({ id: 'workbench.action.files.openFolder' }, {
383
- execute: () => commands.executeCommand(browser_3.WorkspaceCommands.OPEN_FOLDER.id)
380
+ execute: () => commands.executeCommand(WorkspaceCommands.OPEN_FOLDER.id)
384
381
  });
385
- commands.registerAlias('workbench.action.files.openFolder', browser_3.WorkspaceCommands.OPEN_FOLDER.id);
382
+ commands.registerAlias('workbench.action.files.openFolder', WorkspaceCommands.OPEN_FOLDER.id);
386
383
  commands.registerCommand({ id: 'workbench.action.addRootFolder' }, {
387
- execute: () => commands.executeCommand(browser_3.WorkspaceCommands.ADD_FOLDER.id)
384
+ execute: () => commands.executeCommand(WorkspaceCommands.ADD_FOLDER.id)
388
385
  });
389
- commands.registerAlias('workbench.action.addRootFolder', browser_3.WorkspaceCommands.ADD_FOLDER.id);
386
+ commands.registerAlias('workbench.action.addRootFolder', WorkspaceCommands.ADD_FOLDER.id);
390
387
  commands.registerCommand({ id: 'workbench.action.saveWorkspaceAs' }, {
391
- execute: () => commands.executeCommand(browser_3.WorkspaceCommands.SAVE_WORKSPACE_AS.id)
388
+ execute: () => commands.executeCommand(WorkspaceCommands.SAVE_WORKSPACE_AS.id)
392
389
  });
393
- commands.registerAlias('workbench.action.saveWorkspaceAs', browser_3.WorkspaceCommands.SAVE_WORKSPACE_AS.id);
390
+ commands.registerAlias('workbench.action.saveWorkspaceAs', WorkspaceCommands.SAVE_WORKSPACE_AS.id);
394
391
  commands.registerCommand({ id: 'workbench.action.gotoLine' }, {
395
- execute: () => commands.executeCommand(browser_2.EditorCommands.GOTO_LINE_COLUMN.id)
392
+ execute: () => commands.executeCommand(EditorCommands.GOTO_LINE_COLUMN.id)
396
393
  });
397
- commands.registerAlias('workbench.action.gotoLine', browser_2.EditorCommands.GOTO_LINE_COLUMN.id);
394
+ commands.registerAlias('workbench.action.gotoLine', EditorCommands.GOTO_LINE_COLUMN.id);
398
395
  commands.registerCommand({ id: 'workbench.action.quickOpen' }, {
399
396
  execute: (prefix) => this.quickInput.open(typeof prefix === 'string' ? prefix : '')
400
397
  });
401
398
  commands.registerCommand({ id: 'workbench.action.openSettings' }, {
402
- execute: (query) => commands.executeCommand(browser_1.CommonCommands.OPEN_PREFERENCES.id, query)
399
+ execute: (query) => commands.executeCommand(CommonCommands.OPEN_PREFERENCES.id, query)
403
400
  });
404
- commands.registerAlias('workbench.action.openSettings', browser_1.CommonCommands.OPEN_PREFERENCES.id);
401
+ commands.registerAlias('workbench.action.openSettings', CommonCommands.OPEN_PREFERENCES.id);
405
402
  commands.registerCommand({ id: 'workbench.action.openWorkspaceConfigFile' }, {
406
- execute: () => commands.executeCommand(browser_3.WorkspaceCommands.OPEN_WORKSPACE_FILE.id)
403
+ execute: () => commands.executeCommand(WorkspaceCommands.OPEN_WORKSPACE_FILE.id)
407
404
  });
408
- commands.registerAlias('workbench.action.openWorkspaceConfigFile', browser_3.WorkspaceCommands.OPEN_WORKSPACE_FILE.id);
405
+ commands.registerAlias('workbench.action.openWorkspaceConfigFile', WorkspaceCommands.OPEN_WORKSPACE_FILE.id);
409
406
  commands.registerCommand({ id: 'workbench.files.action.refreshFilesExplorer' }, {
410
- execute: () => commands.executeCommand(navigator_contribution_1.FileNavigatorCommands.REFRESH_NAVIGATOR.id)
407
+ execute: () => commands.executeCommand(FileNavigatorCommands.REFRESH_NAVIGATOR.id)
411
408
  });
412
- commands.registerAlias('workbench.files.action.refreshFilesExplorer', navigator_contribution_1.FileNavigatorCommands.REFRESH_NAVIGATOR.id);
409
+ commands.registerAlias('workbench.files.action.refreshFilesExplorer', FileNavigatorCommands.REFRESH_NAVIGATOR.id);
413
410
  commands.registerCommand(VscodeCommands.INSTALL_EXTENSION_FROM_ID_OR_URI, {
414
411
  execute: async (vsixUriOrExtensionId) => {
415
412
  if (typeof vsixUriOrExtensionId === 'string') {
@@ -422,7 +419,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
422
419
  });
423
420
  commands.registerCommand(VscodeCommands.INSTALL_EXTENSION_FROM_VSIX_COMMAND, {
424
421
  execute: async (uris) => {
425
- if ((0, core_1.isArray)(uris)) {
422
+ if (isArray(uris)) {
426
423
  await Promise.all(uris.map(async (vsix) => {
427
424
  await this.deployPlugin(vsix);
428
425
  }));
@@ -435,13 +432,13 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
435
432
  commands.registerCommand(VscodeCommands.UNINSTALL_EXTENSION, {
436
433
  execute: async (id) => {
437
434
  if (!id) {
438
- throw new Error(nls_1.nls.localizeByDefault('Extension id required.'));
435
+ throw new Error(nls.localizeByDefault('Extension id required.'));
439
436
  }
440
- const idAndVersion = plugin_protocol_1.PluginIdentifiers.idAndVersionFromVersionedId(id);
437
+ const idAndVersion = PluginIdentifiers.idAndVersionFromVersionedId(id);
441
438
  if (!idAndVersion) {
442
439
  throw new Error(`Invalid extension id: ${id}\nExpected format: <publisher>.<name>@<version>.`);
443
440
  }
444
- await this.pluginServer.uninstall(plugin_protocol_1.PluginIdentifiers.idAndVersionToVersionedId(idAndVersion));
441
+ await this.pluginServer.uninstall(PluginIdentifiers.idAndVersionToVersionedId(idAndVersion));
445
442
  }
446
443
  });
447
444
  commands.registerCommand({ id: 'workbench.action.files.save', }, {
@@ -449,11 +446,11 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
449
446
  if (uri) {
450
447
  const uriString = uri.toString();
451
448
  const widget = this.shell.widgets.find(w => {
452
- const resourceUri = browser_1.Saveable.is(w) && browser_1.NavigatableWidget.is(w) && w.getResourceUri();
449
+ const resourceUri = Saveable.is(w) && NavigatableWidget.is(w) && w.getResourceUri();
453
450
  return (resourceUri && resourceUri.toString()) === uriString;
454
451
  });
455
- if (browser_1.Saveable.is(widget)) {
456
- browser_1.Saveable.save(widget);
452
+ if (Saveable.is(widget)) {
453
+ Saveable.save(widget);
457
454
  }
458
455
  }
459
456
  else {
@@ -465,9 +462,9 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
465
462
  execute: () => this.shell.saveAll()
466
463
  });
467
464
  commands.registerCommand({ id: 'workbench.action.closeActiveEditor' }, {
468
- execute: () => commands.executeCommand(browser_1.CommonCommands.CLOSE_MAIN_TAB.id)
465
+ execute: () => commands.executeCommand(CommonCommands.CLOSE_MAIN_TAB.id)
469
466
  });
470
- commands.registerAlias('workbench.action.closeActiveEditor', browser_1.CommonCommands.CLOSE_MAIN_TAB.id);
467
+ commands.registerAlias('workbench.action.closeActiveEditor', CommonCommands.CLOSE_MAIN_TAB.id);
471
468
  commands.registerCommand({ id: 'workbench.action.closeOtherEditors' }, {
472
469
  execute: async (uri) => {
473
470
  let editor = this.editorManager.currentEditor || this.shell.currentWidget;
@@ -478,7 +475,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
478
475
  return (resourceUri && resourceUri.toString()) === uriString;
479
476
  });
480
477
  }
481
- const toClose = this.shell.widgets.filter(widget => widget !== editor && vscode_theia_menu_mappings_1.CodeEditorWidgetUtil.is(widget) && widget.title.closable);
478
+ const toClose = this.shell.widgets.filter(widget => widget !== editor && CodeEditorWidgetUtil.is(widget) && widget.title.closable);
482
479
  await this.shell.closeMany(toClose);
483
480
  }
484
481
  });
@@ -494,19 +491,19 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
494
491
  if (editor) {
495
492
  const tabBar = this.shell.getTabBarFor(editor);
496
493
  if (tabBar) {
497
- cb(tabBar, ({ owner }) => vscode_theia_menu_mappings_1.CodeEditorWidgetUtil.is(owner));
494
+ cb(tabBar, ({ owner }) => CodeEditorWidgetUtil.is(owner));
498
495
  }
499
496
  }
500
497
  };
501
498
  commands.registerCommand({
502
499
  id: 'workbench.action.closeEditorsInGroup',
503
- label: nls_1.nls.localizeByDefault('Close All Editors in Group')
500
+ label: nls.localizeByDefault('Close All Editors in Group')
504
501
  }, {
505
502
  execute: (uri) => performActionOnGroup((tabBar, filter) => this.shell.closeTabs(tabBar, (title, index) => title.closable && filter(title, index)), uri)
506
503
  });
507
504
  commands.registerCommand({
508
505
  id: 'workbench.files.saveAllInGroup',
509
- label: nls_1.nls.localizeByDefault('Save All in Group')
506
+ label: nls.localizeByDefault('Save All in Group')
510
507
  }, {
511
508
  execute: (uri) => performActionOnGroup((tabBar, filter) => this.shell.saveTabs(tabBar, filter), uri)
512
509
  });
@@ -517,7 +514,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
517
514
  const editorTabBar = this.shell.getTabBarFor(editor);
518
515
  for (const tabBar of this.shell.allTabBars) {
519
516
  if (tabBar !== editorTabBar) {
520
- this.shell.closeTabs(tabBar, ({ owner, closable }) => closable && vscode_theia_menu_mappings_1.CodeEditorWidgetUtil.is(owner));
517
+ this.shell.closeTabs(tabBar, ({ owner, closable }) => closable && CodeEditorWidgetUtil.is(owner));
521
518
  }
522
519
  }
523
520
  }
@@ -535,7 +532,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
535
532
  left = false;
536
533
  return false;
537
534
  }
538
- return left && closable && vscode_theia_menu_mappings_1.CodeEditorWidgetUtil.is(owner);
535
+ return left && closable && CodeEditorWidgetUtil.is(owner);
539
536
  });
540
537
  }
541
538
  }
@@ -553,7 +550,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
553
550
  left = false;
554
551
  return false;
555
552
  }
556
- return !left && closable && vscode_theia_menu_mappings_1.CodeEditorWidgetUtil.is(owner);
553
+ return !left && closable && CodeEditorWidgetUtil.is(owner);
557
554
  });
558
555
  }
559
556
  }
@@ -561,7 +558,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
561
558
  });
562
559
  commands.registerCommand({ id: 'workbench.action.closeAllEditors' }, {
563
560
  execute: async () => {
564
- const toClose = this.shell.widgets.filter(widget => vscode_theia_menu_mappings_1.CodeEditorWidgetUtil.is(widget) && widget.title.closable);
561
+ const toClose = this.shell.widgets.filter(widget => CodeEditorWidgetUtil.is(widget) && widget.title.closable);
565
562
  await this.shell.closeMany(toClose);
566
563
  }
567
564
  });
@@ -573,53 +570,53 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
573
570
  });
574
571
  commands.registerCommand({
575
572
  id: 'workbench.action.navigateLeft',
576
- label: nls_1.nls.localizeByDefault('Navigate to the View on the Left'),
577
- category: nls_1.nls.localizeByDefault('View')
573
+ label: nls.localizeByDefault('Navigate to the View on the Left'),
574
+ category: nls.localizeByDefault('View')
578
575
  }, {
579
576
  execute: () => this.navigateEditorGroup('left')
580
577
  });
581
578
  commands.registerCommand({
582
579
  id: 'workbench.action.navigateRight',
583
- label: nls_1.nls.localizeByDefault('Navigate to the View on the Right'),
584
- category: nls_1.nls.localizeByDefault('View')
580
+ label: nls.localizeByDefault('Navigate to the View on the Right'),
581
+ category: nls.localizeByDefault('View')
585
582
  }, {
586
583
  execute: () => this.navigateEditorGroup('right')
587
584
  });
588
585
  commands.registerCommand({
589
586
  id: 'workbench.action.navigateUp',
590
- label: nls_1.nls.localizeByDefault('Navigate to the View Above'),
591
- category: nls_1.nls.localizeByDefault('View')
587
+ label: nls.localizeByDefault('Navigate to the View Above'),
588
+ category: nls.localizeByDefault('View')
592
589
  }, {
593
590
  execute: () => this.navigateEditorGroup('up')
594
591
  });
595
592
  commands.registerCommand({
596
593
  id: 'workbench.action.navigateDown',
597
- label: nls_1.nls.localizeByDefault('Navigate to the View Below'),
598
- category: nls_1.nls.localizeByDefault('View')
594
+ label: nls.localizeByDefault('Navigate to the View Below'),
595
+ category: nls.localizeByDefault('View')
599
596
  }, {
600
597
  execute: () => this.navigateEditorGroup('down')
601
598
  });
602
599
  commands.registerCommand({
603
600
  id: 'workbench.action.navigateEditorGroups',
604
- label: nls_1.nls.localizeByDefault('Navigate Between Editor Groups'),
605
- category: nls_1.nls.localizeByDefault('View')
601
+ label: nls.localizeByDefault('Navigate Between Editor Groups'),
602
+ category: nls.localizeByDefault('View')
606
603
  }, {
607
604
  execute: () => this.navigateEditorGroups()
608
605
  });
609
606
  commands.registerCommand({ id: 'workbench.action.navigateBack' }, {
610
- execute: () => commands.executeCommand(browser_2.EditorCommands.GO_BACK.id)
607
+ execute: () => commands.executeCommand(EditorCommands.GO_BACK.id)
611
608
  });
612
- commands.registerAlias('workbench.action.navigateBack', browser_2.EditorCommands.GO_BACK.id);
609
+ commands.registerAlias('workbench.action.navigateBack', EditorCommands.GO_BACK.id);
613
610
  commands.registerCommand({ id: 'workbench.action.navigateForward' }, {
614
- execute: () => commands.executeCommand(browser_2.EditorCommands.GO_FORWARD.id)
611
+ execute: () => commands.executeCommand(EditorCommands.GO_FORWARD.id)
615
612
  });
616
- commands.registerAlias('workbench.action.navigateForward', browser_2.EditorCommands.GO_FORWARD.id);
613
+ commands.registerAlias('workbench.action.navigateForward', EditorCommands.GO_FORWARD.id);
617
614
  commands.registerCommand({ id: 'workbench.action.navigateToLastEditLocation' }, {
618
- execute: () => commands.executeCommand(browser_2.EditorCommands.GO_LAST_EDIT.id)
615
+ execute: () => commands.executeCommand(EditorCommands.GO_LAST_EDIT.id)
619
616
  });
620
- commands.registerAlias('workbench.action.navigateToLastEditLocation', browser_2.EditorCommands.GO_LAST_EDIT.id);
617
+ commands.registerAlias('workbench.action.navigateToLastEditLocation', EditorCommands.GO_LAST_EDIT.id);
621
618
  commands.registerCommand({ id: 'openInTerminal' }, {
622
- execute: (resource) => this.terminalContribution.openInTerminal(new uri_1.default(resource.toString()))
619
+ execute: (resource) => this.terminalContribution.openInTerminal(new TheiaURI(resource.toString()))
623
620
  });
624
621
  commands.registerCommand({ id: 'workbench.action.reloadWindow' }, {
625
622
  execute: () => {
@@ -682,7 +679,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
682
679
  if (!Array.isArray(value) || value === undefined) {
683
680
  return undefined;
684
681
  }
685
- return value.map(loc => (0, type_converters_1.toMergedSymbol)(resource, loc));
682
+ return value.map(loc => toMergedSymbol(resource, loc));
686
683
  })
687
684
  });
688
685
  commands.registerCommand({
@@ -719,7 +716,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
719
716
  id: 'vscode.executeWorkspaceSymbolProvider'
720
717
  }, {
721
718
  execute: async (queryString) => (await Promise.all(this.monacoLanguages.workspaceSymbolProviders
722
- .map(async (provider) => provider.provideWorkspaceSymbols({ query: queryString }, new core_1.CancellationTokenSource().token))))
719
+ .map(async (provider) => provider.provideWorkspaceSymbols({ query: queryString }, new CancellationTokenSource().token))))
723
720
  .flatMap(symbols => symbols)
724
721
  .filter(symbols => !!symbols)
725
722
  });
@@ -728,9 +725,9 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
728
725
  }, {
729
726
  execute: async (resource, position) => {
730
727
  const provider = await this.getCallHierarchyServiceForUri(resource);
731
- const definition = await provider?.getRootDefinition(resource.path, (0, type_converters_1.toPosition)(position), new core_1.CancellationTokenSource().token);
728
+ const definition = await provider?.getRootDefinition(resource.path, toPosition(position), new CancellationTokenSource().token);
732
729
  if (definition) {
733
- return definition.items.map(item => (0, hierarchy_types_converters_1.fromItemHierarchyDefinition)(item));
730
+ return definition.items.map(item => fromItemHierarchyDefinition(item));
734
731
  }
735
732
  ;
736
733
  return [];
@@ -740,11 +737,11 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
740
737
  id: 'vscode.provideIncomingCalls'
741
738
  }, {
742
739
  execute: async (item) => {
743
- const resource = vscode_uri_1.URI.from(item.uri);
740
+ const resource = URI.from(item.uri);
744
741
  const provider = await this.getCallHierarchyServiceForUri(resource);
745
- const incomingCalls = await provider?.getCallers((0, hierarchy_types_converters_1.toItemHierarchyDefinition)(item), new core_1.CancellationTokenSource().token);
742
+ const incomingCalls = await provider?.getCallers(toItemHierarchyDefinition(item), new CancellationTokenSource().token);
746
743
  if (incomingCalls) {
747
- return incomingCalls.map(hierarchy_types_converters_1.fromCallHierarchyCallerToModelCallHierarchyIncomingCall);
744
+ return incomingCalls.map(fromCallHierarchyCallerToModelCallHierarchyIncomingCall);
748
745
  }
749
746
  return [];
750
747
  },
@@ -753,11 +750,11 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
753
750
  id: 'vscode.provideOutgoingCalls'
754
751
  }, {
755
752
  execute: async (item) => {
756
- const resource = vscode_uri_1.URI.from(item.uri);
753
+ const resource = URI.from(item.uri);
757
754
  const provider = await this.getCallHierarchyServiceForUri(resource);
758
- const outgoingCalls = await provider?.getCallees?.((0, hierarchy_types_converters_1.toItemHierarchyDefinition)(item), new core_1.CancellationTokenSource().token);
755
+ const outgoingCalls = await provider?.getCallees?.(toItemHierarchyDefinition(item), new CancellationTokenSource().token);
759
756
  if (outgoingCalls) {
760
- return outgoingCalls.map(hierarchy_types_converters_1.fromCallHierarchyCalleeToModelCallHierarchyOutgoingCall);
757
+ return outgoingCalls.map(fromCallHierarchyCalleeToModelCallHierarchyOutgoingCall);
761
758
  }
762
759
  return [];
763
760
  }
@@ -767,8 +764,8 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
767
764
  }, {
768
765
  execute: async (resource, position) => {
769
766
  const provider = await this.getTypeHierarchyServiceForUri(resource);
770
- const session = await provider?.prepareSession(resource.path, (0, type_converters_1.toPosition)(position), new core_1.CancellationTokenSource().token);
771
- return session ? session.items.map(item => (0, hierarchy_types_converters_1.fromItemHierarchyDefinition)(item)) : [];
767
+ const session = await provider?.prepareSession(resource.path, toPosition(position), new CancellationTokenSource().token);
768
+ return session ? session.items.map(item => fromItemHierarchyDefinition(item)) : [];
772
769
  }
773
770
  });
774
771
  commands.registerCommand({
@@ -778,10 +775,10 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
778
775
  if (!item._sessionId || !item._itemId) {
779
776
  return [];
780
777
  }
781
- const resource = vscode_uri_1.URI.from(item.uri);
778
+ const resource = URI.from(item.uri);
782
779
  const provider = await this.getTypeHierarchyServiceForUri(resource);
783
- const items = await provider?.provideSuperTypes(item._sessionId, item._itemId, new core_1.CancellationTokenSource().token);
784
- return (items ? items : []).map(typeItem => (0, hierarchy_types_converters_1.fromItemHierarchyDefinition)(typeItem));
780
+ const items = await provider?.provideSuperTypes(item._sessionId, item._itemId, new CancellationTokenSource().token);
781
+ return (items ? items : []).map(typeItem => fromItemHierarchyDefinition(typeItem));
785
782
  }
786
783
  });
787
784
  commands.registerCommand({
@@ -791,10 +788,10 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
791
788
  if (!item._sessionId || !item._itemId) {
792
789
  return [];
793
790
  }
794
- const resource = vscode_uri_1.URI.from(item.uri);
791
+ const resource = URI.from(item.uri);
795
792
  const provider = await this.getTypeHierarchyServiceForUri(resource);
796
- const items = await provider?.provideSubTypes(item._sessionId, item._itemId, new core_1.CancellationTokenSource().token);
797
- return (items ? items : []).map(typeItem => (0, hierarchy_types_converters_1.fromItemHierarchyDefinition)(typeItem));
793
+ const items = await provider?.provideSubTypes(item._sessionId, item._itemId, new CancellationTokenSource().token);
794
+ return (items ? items : []).map(typeItem => fromItemHierarchyDefinition(typeItem));
798
795
  }
799
796
  });
800
797
  commands.registerCommand({
@@ -805,9 +802,9 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
805
802
  commands.registerCommand({
806
803
  id: 'explorer.newFolder'
807
804
  }, {
808
- execute: () => commands.executeCommand(browser_3.WorkspaceCommands.NEW_FOLDER.id)
805
+ execute: () => commands.executeCommand(WorkspaceCommands.NEW_FOLDER.id)
809
806
  });
810
- commands.registerAlias('explorer.newFolder', browser_3.WorkspaceCommands.NEW_FOLDER.id);
807
+ commands.registerAlias('explorer.newFolder', WorkspaceCommands.NEW_FOLDER.id);
811
808
  commands.registerCommand({
812
809
  id: 'workbench.action.terminal.sendSequence'
813
810
  }, {
@@ -836,37 +833,37 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
836
833
  commands.registerCommand({
837
834
  id: 'workbench.view.explorer'
838
835
  }, {
839
- execute: () => commands.executeCommand(navigator_contribution_1.FileNavigatorCommands.FOCUS.id)
836
+ execute: () => commands.executeCommand(FileNavigatorCommands.FOCUS.id)
840
837
  });
841
- commands.registerAlias('workbench.view.explorer', navigator_contribution_1.FileNavigatorCommands.FOCUS.id);
838
+ commands.registerAlias('workbench.view.explorer', FileNavigatorCommands.FOCUS.id);
842
839
  commands.registerCommand({
843
840
  id: 'copyFilePath'
844
841
  }, {
845
- execute: () => commands.executeCommand(browser_1.CommonCommands.COPY_PATH.id)
842
+ execute: () => commands.executeCommand(CommonCommands.COPY_PATH.id)
846
843
  });
847
- commands.registerAlias('copyFilePath', browser_1.CommonCommands.COPY_PATH.id);
844
+ commands.registerAlias('copyFilePath', CommonCommands.COPY_PATH.id);
848
845
  commands.registerCommand({
849
846
  id: 'copyRelativeFilePath'
850
847
  }, {
851
- execute: () => commands.executeCommand(browser_3.WorkspaceCommands.COPY_RELATIVE_FILE_PATH.id)
848
+ execute: () => commands.executeCommand(WorkspaceCommands.COPY_RELATIVE_FILE_PATH.id)
852
849
  });
853
- commands.registerAlias('copyRelativeFilePath', browser_3.WorkspaceCommands.COPY_RELATIVE_FILE_PATH.id);
850
+ commands.registerAlias('copyRelativeFilePath', WorkspaceCommands.COPY_RELATIVE_FILE_PATH.id);
854
851
  commands.registerCommand({
855
852
  id: 'revealInExplorer'
856
853
  }, {
857
854
  execute: async (resource) => {
858
- if (!vscode_uri_1.URI.isUri(resource)) {
855
+ if (!URI.isUri(resource)) {
859
856
  return;
860
857
  }
861
- let navigator = await this.shell.revealWidget(browser_4.FILE_NAVIGATOR_ID);
858
+ let navigator = await this.shell.revealWidget(FILE_NAVIGATOR_ID);
862
859
  if (!navigator) {
863
- await this.commandService.executeCommand(navigator_contribution_1.FILE_NAVIGATOR_TOGGLE_COMMAND_ID);
864
- navigator = await this.shell.revealWidget(browser_4.FILE_NAVIGATOR_ID);
860
+ await this.commandService.executeCommand(FILE_NAVIGATOR_TOGGLE_COMMAND_ID);
861
+ navigator = await this.shell.revealWidget(FILE_NAVIGATOR_ID);
865
862
  }
866
- if (navigator instanceof browser_4.FileNavigatorWidget) {
863
+ if (navigator instanceof FileNavigatorWidget) {
867
864
  const model = navigator.model;
868
- const node = await model.revealFile(new uri_1.default(resource));
869
- if (tree_selection_1.SelectableTreeNode.is(node)) {
865
+ const node = await model.revealFile(new TheiaURI(resource));
866
+ if (SelectableTreeNode.is(node)) {
870
867
  model.selectNode(node);
871
868
  }
872
869
  }
@@ -959,7 +956,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
959
956
  const resultUri = toTheiaUri(arg.output);
960
957
  const side1Uri = typeof arg.input1 === 'string' ? toTheiaUri(arg.input1) : toTheiaUri(arg.input1.uri);
961
958
  const side2Uri = typeof arg.input2 === 'string' ? toTheiaUri(arg.input2) : toTheiaUri(arg.input2.uri);
962
- const uri = merge_editor_1.MergeEditorUri.encode({ baseUri, side1Uri, side2Uri, resultUri });
959
+ const uri = MergeEditorUri.encode({ baseUri, side1Uri, side2Uri, resultUri });
963
960
  let side1State = undefined;
964
961
  if (typeof arg.input1 !== 'string') {
965
962
  const { title, description, detail } = arg.input1;
@@ -971,7 +968,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
971
968
  side2State = { title, description, detail };
972
969
  }
973
970
  const options = { widgetState: { side1State, side2State } };
974
- await (0, browser_1.open)(this.openerService, uri, options);
971
+ await open(this.openerService, uri, options);
975
972
  }
976
973
  });
977
974
  commands.registerCommand({ id: '_workbench.openScmMultiDiffEditor' }, {
@@ -980,7 +977,7 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
980
977
  if (!repositoryUri) {
981
978
  return;
982
979
  }
983
- const repository = this.scmService.repositories.find(repo => new uri_1.default(repo.provider.rootUri).isEqual(repositoryUri));
980
+ const repository = this.scmService.repositories.find(repo => new TheiaURI(repo.provider.rootUri).isEqual(repositoryUri));
984
981
  const group = repository?.provider.groups.find(candidate => candidate.id === options.resourceGroupId);
985
982
  if (!group) {
986
983
  return;
@@ -1007,17 +1004,17 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
1007
1004
  if (!resourceUri) {
1008
1005
  return undefined;
1009
1006
  }
1010
- const emptyUri = new uri_1.default().withScheme(core_1.MEMORY_TEXT_READONLY).withPath(resourceUri.path);
1007
+ const emptyUri = new TheiaURI().withScheme(MEMORY_TEXT_READONLY).withPath(resourceUri.path);
1011
1008
  return { originalUri: originalUri ?? emptyUri, modifiedUri: modifiedUri ?? emptyUri };
1012
1009
  })
1013
1010
  .filter((r) => r !== undefined);
1014
1011
  if (!resources.length) {
1015
1012
  return;
1016
1013
  }
1017
- const uri = multi_diff_editor_1.MultiDiffEditorUri.encode({ title: options.title, resources });
1014
+ const uri = MultiDiffEditorUri.encode({ title: options.title, resources });
1018
1015
  const reveal = toTheiaUri(options.reveal?.modifiedUri);
1019
1016
  const openerOptions = { reveal };
1020
- await (0, browser_1.open)(this.openerService, uri, openerOptions);
1017
+ await open(this.openerService, uri, openerOptions);
1021
1018
  },
1022
1019
  });
1023
1020
  }
@@ -1027,22 +1024,22 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
1027
1024
  async installExtensionFromId(extensionIdOrVersionedId) {
1028
1025
  let extensionId = extensionIdOrVersionedId;
1029
1026
  let opts;
1030
- const versionedId = plugin_protocol_1.PluginIdentifiers.idAndVersionFromVersionedId(extensionIdOrVersionedId);
1027
+ const versionedId = PluginIdentifiers.idAndVersionFromVersionedId(extensionIdOrVersionedId);
1031
1028
  if (versionedId) {
1032
1029
  extensionId = versionedId.id;
1033
1030
  opts = { version: versionedId.version, ignoreOtherVersions: true };
1034
1031
  }
1035
1032
  try {
1036
- await this.pluginServer.install(plugin_vscode_uri_1.VSCodeExtensionUri.fromId(extensionId).toString(), undefined, opts);
1033
+ await this.pluginServer.install(VSCodeExtensionUri.fromId(extensionId).toString(), undefined, opts);
1037
1034
  }
1038
1035
  catch (e) {
1039
- if (!plugin_protocol_1.DuplicateExtensionError.is(e)) {
1036
+ if (!DuplicateExtensionError.is(e)) {
1040
1037
  throw e;
1041
1038
  }
1042
1039
  }
1043
1040
  }
1044
1041
  async deployPlugin(uri) {
1045
- const uriPath = (0, type_converters_1.isUriComponents)(uri) ? vscode_uri_1.URI.revive(uri).fsPath : await this.fileService.fsPath(uri);
1042
+ const uriPath = isUriComponents(uri) ? URI.revive(uri).fsPath : await this.fileService.fsPath(uri);
1046
1043
  return this.pluginServer.install(`local-file:${uriPath}`);
1047
1044
  }
1048
1045
  async resolveLanguageId(resource) {
@@ -1053,113 +1050,89 @@ let PluginVscodeCommandsContribution = class PluginVscodeCommandsContribution {
1053
1050
  }
1054
1051
  async getCallHierarchyServiceForUri(resource) {
1055
1052
  const languageId = await this.resolveLanguageId(resource);
1056
- return this.callHierarchyProvider.get(languageId, new uri_1.default(resource));
1053
+ return this.callHierarchyProvider.get(languageId, new TheiaURI(resource));
1057
1054
  }
1058
1055
  async getTypeHierarchyServiceForUri(resource) {
1059
1056
  const languageId = await this.resolveLanguageId(resource);
1060
- return this.typeHierarchyProvider.get(languageId, new uri_1.default(resource));
1057
+ return this.typeHierarchyProvider.get(languageId, new TheiaURI(resource));
1061
1058
  }
1062
1059
  };
1063
- exports.PluginVscodeCommandsContribution = PluginVscodeCommandsContribution;
1064
- tslib_1.__decorate([
1065
- (0, inversify_1.inject)(command_1.CommandService),
1066
- tslib_1.__metadata("design:type", Object)
1060
+ __decorate([
1061
+ inject(CommandService)
1067
1062
  ], PluginVscodeCommandsContribution.prototype, "commandService", void 0);
1068
- tslib_1.__decorate([
1069
- (0, inversify_1.inject)(context_key_service_1.ContextKeyService),
1070
- tslib_1.__metadata("design:type", Object)
1063
+ __decorate([
1064
+ inject(ContextKeyService)
1071
1065
  ], PluginVscodeCommandsContribution.prototype, "contextKeyService", void 0);
1072
- tslib_1.__decorate([
1073
- (0, inversify_1.inject)(browser_2.EditorManager),
1074
- tslib_1.__metadata("design:type", browser_2.EditorManager)
1066
+ __decorate([
1067
+ inject(EditorManager)
1075
1068
  ], PluginVscodeCommandsContribution.prototype, "editorManager", void 0);
1076
- tslib_1.__decorate([
1077
- (0, inversify_1.inject)(browser_1.ApplicationShell),
1078
- tslib_1.__metadata("design:type", browser_1.ApplicationShell)
1069
+ __decorate([
1070
+ inject(ApplicationShell)
1079
1071
  ], PluginVscodeCommandsContribution.prototype, "shell", void 0);
1080
- tslib_1.__decorate([
1081
- (0, inversify_1.inject)(diff_service_1.DiffService),
1082
- tslib_1.__metadata("design:type", diff_service_1.DiffService)
1072
+ __decorate([
1073
+ inject(DiffService)
1083
1074
  ], PluginVscodeCommandsContribution.prototype, "diffService", void 0);
1084
- tslib_1.__decorate([
1085
- (0, inversify_1.inject)(browser_1.OpenerService),
1086
- tslib_1.__metadata("design:type", Object)
1075
+ __decorate([
1076
+ inject(OpenerService)
1087
1077
  ], PluginVscodeCommandsContribution.prototype, "openerService", void 0);
1088
- tslib_1.__decorate([
1089
- (0, inversify_1.inject)(application_shell_mouse_tracker_1.ApplicationShellMouseTracker),
1090
- tslib_1.__metadata("design:type", application_shell_mouse_tracker_1.ApplicationShellMouseTracker)
1078
+ __decorate([
1079
+ inject(ApplicationShellMouseTracker)
1091
1080
  ], PluginVscodeCommandsContribution.prototype, "mouseTracker", void 0);
1092
- tslib_1.__decorate([
1093
- (0, inversify_1.inject)(browser_1.QuickInputService),
1094
- (0, inversify_1.optional)(),
1095
- tslib_1.__metadata("design:type", Object)
1081
+ __decorate([
1082
+ inject(QuickInputService),
1083
+ optional()
1096
1084
  ], PluginVscodeCommandsContribution.prototype, "quickInput", void 0);
1097
- tslib_1.__decorate([
1098
- (0, inversify_1.inject)(workspace_service_1.WorkspaceService),
1099
- tslib_1.__metadata("design:type", workspace_service_1.WorkspaceService)
1085
+ __decorate([
1086
+ inject(WorkspaceService)
1100
1087
  ], PluginVscodeCommandsContribution.prototype, "workspaceService", void 0);
1101
- tslib_1.__decorate([
1102
- (0, inversify_1.inject)(terminal_frontend_contribution_1.TerminalFrontendContribution),
1103
- tslib_1.__metadata("design:type", terminal_frontend_contribution_1.TerminalFrontendContribution)
1088
+ __decorate([
1089
+ inject(TerminalFrontendContribution)
1104
1090
  ], PluginVscodeCommandsContribution.prototype, "terminalContribution", void 0);
1105
- tslib_1.__decorate([
1106
- (0, inversify_1.inject)(quick_open_workspace_1.QuickOpenWorkspace),
1107
- tslib_1.__metadata("design:type", quick_open_workspace_1.QuickOpenWorkspace)
1091
+ __decorate([
1092
+ inject(QuickOpenWorkspace)
1108
1093
  ], PluginVscodeCommandsContribution.prototype, "quickOpenWorkspace", void 0);
1109
- tslib_1.__decorate([
1110
- (0, inversify_1.inject)(terminal_service_1.TerminalService),
1111
- tslib_1.__metadata("design:type", Object)
1094
+ __decorate([
1095
+ inject(TerminalService)
1112
1096
  ], PluginVscodeCommandsContribution.prototype, "terminalService", void 0);
1113
- tslib_1.__decorate([
1114
- (0, inversify_1.inject)(plugin_protocol_1.PluginServer),
1115
- tslib_1.__metadata("design:type", Object)
1097
+ __decorate([
1098
+ inject(PluginServer)
1116
1099
  ], PluginVscodeCommandsContribution.prototype, "pluginServer", void 0);
1117
- tslib_1.__decorate([
1118
- (0, inversify_1.inject)(file_service_1.FileService),
1119
- tslib_1.__metadata("design:type", file_service_1.FileService)
1100
+ __decorate([
1101
+ inject(FileService)
1120
1102
  ], PluginVscodeCommandsContribution.prototype, "fileService", void 0);
1121
- tslib_1.__decorate([
1122
- (0, inversify_1.inject)(browser_5.CallHierarchyServiceProvider),
1123
- tslib_1.__metadata("design:type", browser_5.CallHierarchyServiceProvider)
1103
+ __decorate([
1104
+ inject(CallHierarchyServiceProvider)
1124
1105
  ], PluginVscodeCommandsContribution.prototype, "callHierarchyProvider", void 0);
1125
- tslib_1.__decorate([
1126
- (0, inversify_1.inject)(browser_6.TypeHierarchyServiceProvider),
1127
- tslib_1.__metadata("design:type", browser_6.TypeHierarchyServiceProvider)
1106
+ __decorate([
1107
+ inject(TypeHierarchyServiceProvider)
1128
1108
  ], PluginVscodeCommandsContribution.prototype, "typeHierarchyProvider", void 0);
1129
- tslib_1.__decorate([
1130
- (0, inversify_1.inject)(monaco_text_model_service_1.MonacoTextModelService),
1131
- tslib_1.__metadata("design:type", monaco_text_model_service_1.MonacoTextModelService)
1109
+ __decorate([
1110
+ inject(MonacoTextModelService)
1132
1111
  ], PluginVscodeCommandsContribution.prototype, "textModelService", void 0);
1133
- tslib_1.__decorate([
1134
- (0, inversify_1.inject)(window_service_1.WindowService),
1135
- tslib_1.__metadata("design:type", Object)
1112
+ __decorate([
1113
+ inject(WindowService)
1136
1114
  ], PluginVscodeCommandsContribution.prototype, "windowService", void 0);
1137
- tslib_1.__decorate([
1138
- (0, inversify_1.inject)(core_1.MessageService),
1139
- tslib_1.__metadata("design:type", core_1.MessageService)
1115
+ __decorate([
1116
+ inject(MessageService)
1140
1117
  ], PluginVscodeCommandsContribution.prototype, "messageService", void 0);
1141
- tslib_1.__decorate([
1142
- (0, inversify_1.inject)(outline_view_contribution_1.OutlineViewContribution),
1143
- tslib_1.__metadata("design:type", outline_view_contribution_1.OutlineViewContribution)
1118
+ __decorate([
1119
+ inject(OutlineViewContribution)
1144
1120
  ], PluginVscodeCommandsContribution.prototype, "outlineViewContribution", void 0);
1145
- tslib_1.__decorate([
1146
- (0, inversify_1.inject)(monaco_languages_1.MonacoLanguages),
1147
- tslib_1.__metadata("design:type", monaco_languages_1.MonacoLanguages)
1121
+ __decorate([
1122
+ inject(MonacoLanguages)
1148
1123
  ], PluginVscodeCommandsContribution.prototype, "monacoLanguages", void 0);
1149
- tslib_1.__decorate([
1150
- (0, inversify_1.inject)(scm_contribution_1.ScmContribution),
1151
- tslib_1.__metadata("design:type", scm_contribution_1.ScmContribution)
1124
+ __decorate([
1125
+ inject(ScmContribution)
1152
1126
  ], PluginVscodeCommandsContribution.prototype, "scmContribution", void 0);
1153
- tslib_1.__decorate([
1154
- (0, inversify_1.inject)(scm_service_1.ScmService),
1155
- tslib_1.__metadata("design:type", scm_service_1.ScmService)
1127
+ __decorate([
1128
+ inject(ScmService)
1156
1129
  ], PluginVscodeCommandsContribution.prototype, "scmService", void 0);
1157
- tslib_1.__decorate([
1158
- (0, inversify_1.inject)(core_1.ILogger),
1159
- (0, inversify_1.named)('plugin-ext-vscode:PluginVscodeCommandsContribution'),
1160
- tslib_1.__metadata("design:type", Object)
1130
+ __decorate([
1131
+ inject(ILogger),
1132
+ named('plugin-ext-vscode:PluginVscodeCommandsContribution')
1161
1133
  ], PluginVscodeCommandsContribution.prototype, "logger", void 0);
1162
- exports.PluginVscodeCommandsContribution = PluginVscodeCommandsContribution = tslib_1.__decorate([
1163
- (0, inversify_1.injectable)()
1134
+ PluginVscodeCommandsContribution = __decorate([
1135
+ injectable()
1164
1136
  ], PluginVscodeCommandsContribution);
1137
+ export { PluginVscodeCommandsContribution };
1165
1138
  //# sourceMappingURL=plugin-vscode-commands-contribution.js.map