@theia/plugin-ext 1.37.0 → 1.37.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/lib/common/plugin-api-rpc.d.ts +8 -0
  2. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  3. package/lib/common/plugin-api-rpc.js +3 -1
  4. package/lib/common/plugin-api-rpc.js.map +1 -1
  5. package/lib/main/browser/debug/plugin-debug-service.d.ts +2 -2
  6. package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
  7. package/lib/main/browser/debug/plugin-debug-service.js +4 -4
  8. package/lib/main/browser/debug/plugin-debug-service.js.map +1 -1
  9. package/lib/main/browser/plugin-contribution-handler.d.ts +3 -1
  10. package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
  11. package/lib/main/browser/plugin-contribution-handler.js +24 -4
  12. package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
  13. package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
  14. package/lib/main/browser/plugin-ext-frontend-module.js +2 -0
  15. package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
  16. package/lib/main/browser/plugin-frontend-contribution.d.ts +5 -2
  17. package/lib/main/browser/plugin-frontend-contribution.d.ts.map +1 -1
  18. package/lib/main/browser/plugin-frontend-contribution.js +36 -2
  19. package/lib/main/browser/plugin-frontend-contribution.js.map +1 -1
  20. package/lib/main/browser/view/plugin-view-widget.d.ts +4 -2
  21. package/lib/main/browser/view/plugin-view-widget.d.ts.map +1 -1
  22. package/lib/main/browser/view/plugin-view-widget.js +6 -0
  23. package/lib/main/browser/view/plugin-view-widget.js.map +1 -1
  24. package/lib/main/browser/view/tree-view-widget.d.ts +2 -0
  25. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  26. package/lib/main/browser/view/tree-view-widget.js +3 -0
  27. package/lib/main/browser/view/tree-view-widget.js.map +1 -1
  28. package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
  29. package/lib/main/browser/view/tree-views-main.js +1 -0
  30. package/lib/main/browser/view/tree-views-main.js.map +1 -1
  31. package/lib/plugin/env.d.ts +0 -5
  32. package/lib/plugin/env.d.ts.map +1 -1
  33. package/lib/plugin/env.js +0 -10
  34. package/lib/plugin/env.js.map +1 -1
  35. package/lib/plugin/languages.d.ts +2 -0
  36. package/lib/plugin/languages.d.ts.map +1 -1
  37. package/lib/plugin/languages.js +6 -0
  38. package/lib/plugin/languages.js.map +1 -1
  39. package/lib/plugin/plugin-context.d.ts.map +1 -1
  40. package/lib/plugin/plugin-context.js +38 -4
  41. package/lib/plugin/plugin-context.js.map +1 -1
  42. package/lib/plugin/telemetry-ext.d.ts +44 -0
  43. package/lib/plugin/telemetry-ext.d.ts.map +1 -0
  44. package/lib/plugin/telemetry-ext.js +252 -0
  45. package/lib/plugin/telemetry-ext.js.map +1 -0
  46. package/lib/plugin/terminal-ext.d.ts +2 -0
  47. package/lib/plugin/terminal-ext.d.ts.map +1 -1
  48. package/lib/plugin/terminal-ext.js +4 -0
  49. package/lib/plugin/terminal-ext.js.map +1 -1
  50. package/lib/plugin/tree/tree-views.d.ts.map +1 -1
  51. package/lib/plugin/tree/tree-views.js +6 -24
  52. package/lib/plugin/tree/tree-views.js.map +1 -1
  53. package/lib/plugin/types-impl.d.ts +56 -0
  54. package/lib/plugin/types-impl.d.ts.map +1 -1
  55. package/lib/plugin/types-impl.js +54 -4
  56. package/lib/plugin/types-impl.js.map +1 -1
  57. package/lib/plugin/workspace.d.ts +2 -0
  58. package/lib/plugin/workspace.d.ts.map +1 -1
  59. package/lib/plugin/workspace.js +4 -0
  60. package/lib/plugin/workspace.js.map +1 -1
  61. package/package.json +27 -27
  62. package/src/common/plugin-api-rpc.ts +11 -1
  63. package/src/main/browser/debug/plugin-debug-service.ts +4 -4
  64. package/src/main/browser/plugin-contribution-handler.ts +24 -5
  65. package/src/main/browser/plugin-ext-frontend-module.ts +2 -0
  66. package/src/main/browser/plugin-frontend-contribution.ts +37 -2
  67. package/src/main/browser/view/plugin-view-widget.ts +9 -2
  68. package/src/main/browser/view/tree-view-widget.tsx +5 -0
  69. package/src/main/browser/view/tree-views-main.ts +1 -0
  70. package/src/plugin/env.ts +0 -13
  71. package/src/plugin/languages.ts +10 -0
  72. package/src/plugin/plugin-context.ts +46 -5
  73. package/src/plugin/telemetry-ext.ts +299 -0
  74. package/src/plugin/terminal-ext.ts +5 -0
  75. package/src/plugin/tree/tree-views.ts +7 -25
  76. package/src/plugin/types-impl.ts +79 -0
  77. package/src/plugin/workspace.ts +6 -1
@@ -47,6 +47,7 @@ import { ContributedTerminalProfileStore, TerminalProfileStore } from '@theia/te
47
47
  import { TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget';
48
48
  import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
49
49
  import { PluginTerminalRegistry } from './plugin-terminal-registry';
50
+ import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
50
51
 
51
52
  @injectable()
52
53
  export class PluginContributionHandler {
@@ -122,6 +123,9 @@ export class PluginContributionHandler {
122
123
  @inject(ContributionProvider) @named(LabelProviderContribution)
123
124
  protected readonly contributionProvider: ContributionProvider<LabelProviderContribution>;
124
125
 
126
+ @inject(ContextKeyService)
127
+ protected readonly contextKeyService: ContextKeyService;
128
+
125
129
  protected readonly commandHandlers = new Map<string, CommandHandler['execute'] | undefined>();
126
130
 
127
131
  protected readonly onDidRegisterCommandHandlerEmitter = new Emitter<string>();
@@ -399,7 +403,7 @@ export class PluginContributionHandler {
399
403
  return Disposable.NULL;
400
404
  }
401
405
  const toDispose = new DisposableCollection();
402
- for (const { iconUrl, themeIcon, command, category, title, originalTitle } of contribution.commands) {
406
+ for (const { iconUrl, themeIcon, command, category, title, originalTitle, enablement } of contribution.commands) {
403
407
  const reference = iconUrl && this.style.toIconClass(iconUrl);
404
408
  const icon = themeIcon && ThemeIcon.fromString(themeIcon);
405
409
  let iconClass;
@@ -409,12 +413,12 @@ export class PluginContributionHandler {
409
413
  } else if (icon) {
410
414
  iconClass = ThemeIcon.asClassName(icon);
411
415
  }
412
- toDispose.push(this.registerCommand({ id: command, category, label: title, originalLabel: originalTitle, iconClass }));
416
+ toDispose.push(this.registerCommand({ id: command, category, label: title, originalLabel: originalTitle, iconClass }, enablement));
413
417
  }
414
418
  return toDispose;
415
419
  }
416
420
 
417
- registerCommand(command: Command): Disposable {
421
+ registerCommand(command: Command, enablement?: string): Disposable {
418
422
  if (this.hasCommand(command.id)) {
419
423
  console.warn(`command '${command.id}' already registered`);
420
424
  return Disposable.NULL;
@@ -429,11 +433,27 @@ export class PluginContributionHandler {
429
433
  return handler(...args);
430
434
  },
431
435
  // Always enabled - a command can be executed programmatically or via the commands palette.
432
- isEnabled(): boolean { return true; },
436
+ isEnabled: () => {
437
+ if (enablement) {
438
+ return this.contextKeyService.match(enablement);
439
+ }
440
+ return true;
441
+ },
433
442
  // Visibility rules are defined via the `menus` contribution point.
434
443
  isVisible(): boolean { return true; }
435
444
  };
436
445
 
446
+ if (enablement) {
447
+ const contextKeys = this.contextKeyService.parseKeys(enablement);
448
+ if (contextKeys && contextKeys.size > 0) {
449
+ commandHandler.onDidChangeEnabled = (listener: () => void) => this.contextKeyService.onDidChange(e => {
450
+ if (e.affects(contextKeys)) {
451
+ listener();
452
+ }
453
+ });
454
+ }
455
+ }
456
+
437
457
  const toDispose = new DisposableCollection();
438
458
  if (this.commands.getCommand(command.id)) {
439
459
  // overriding built-in command, i.e. `type` by the VSCodeVim extension
@@ -608,5 +628,4 @@ export class PluginContributionHandler {
608
628
  }
609
629
  return { indentAction, appendText: action.appendText, removeText: action.removeText };
610
630
  }
611
-
612
631
  }
@@ -84,6 +84,7 @@ import { PluginTerminalRegistry } from './plugin-terminal-registry';
84
84
  import { DnDFileContentStore } from './view/dnd-file-content-store';
85
85
  import { WebviewContextKeys } from './webview/webview-context-keys';
86
86
  import { LanguagePackService, languagePackServicePath } from '../../common/language-pack-service';
87
+ import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
87
88
 
88
89
  export default new ContainerModule((bind, unbind, isBound, rebind) => {
89
90
 
@@ -110,6 +111,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
110
111
  bind(OpenUriCommandHandler).toSelf().inSingletonScope();
111
112
  bind(PluginApiFrontendContribution).toSelf().inSingletonScope();
112
113
  bind(CommandContribution).toService(PluginApiFrontendContribution);
114
+ bind(TabBarToolbarContribution).toService(PluginApiFrontendContribution);
113
115
 
114
116
  bind(EditorModelService).toSelf().inSingletonScope();
115
117
 
@@ -15,21 +15,56 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { injectable, inject } from '@theia/core/shared/inversify';
18
- import { CommandRegistry, CommandContribution } from '@theia/core/lib/common';
18
+ import { CommandRegistry, CommandContribution, Command } from '@theia/core/lib/common';
19
19
  import { OpenUriCommandHandler } from './commands';
20
20
  import URI from '@theia/core/lib/common/uri';
21
+ import { TreeViewWidget } from './view/tree-view-widget';
22
+ import { CompositeTreeNode, Widget, codicon } from '@theia/core/lib/browser';
23
+ import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
24
+ import { PluginViewWidget } from './view/plugin-view-widget';
21
25
 
22
26
  @injectable()
23
- export class PluginApiFrontendContribution implements CommandContribution {
27
+ export class PluginApiFrontendContribution implements CommandContribution, TabBarToolbarContribution {
24
28
 
25
29
  @inject(OpenUriCommandHandler)
26
30
  protected readonly openUriCommandHandler: OpenUriCommandHandler;
27
31
 
32
+ static readonly COLLAPSE_ALL_COMMAND = Command.toDefaultLocalizedCommand({
33
+ id: 'treeviews.collapseAll',
34
+ iconClass: codicon('collapse-all'),
35
+ label: 'Collapse All'
36
+ });
37
+
28
38
  registerCommands(commands: CommandRegistry): void {
29
39
  commands.registerCommand(OpenUriCommandHandler.COMMAND_METADATA, {
30
40
  execute: (arg: URI) => this.openUriCommandHandler.execute(arg),
31
41
  isVisible: () => false
32
42
  });
43
+ commands.registerCommand(PluginApiFrontendContribution.COLLAPSE_ALL_COMMAND, {
44
+ execute: (widget: Widget) => {
45
+ if (widget instanceof PluginViewWidget && widget.widgets[0] instanceof TreeViewWidget) {
46
+ const model = widget.widgets[0].model;
47
+ if (CompositeTreeNode.is(model.root)) {
48
+ for (const child of model.root.children) {
49
+ if (CompositeTreeNode.is(child)) {
50
+ model.collapseAll(child);
51
+ }
52
+ }
53
+ }
54
+ }
55
+ },
56
+ isVisible: (widget: Widget) => widget instanceof PluginViewWidget && widget.widgets[0] instanceof TreeViewWidget && widget.widgets[0].showCollapseAll
57
+ });
58
+
33
59
  }
34
60
 
61
+ registerToolbarItems(registry: TabBarToolbarRegistry): void {
62
+ registry.registerItem({
63
+ id: PluginApiFrontendContribution.COLLAPSE_ALL_COMMAND.id,
64
+ command: PluginApiFrontendContribution.COLLAPSE_ALL_COMMAND.id,
65
+ tooltip: PluginApiFrontendContribution.COLLAPSE_ALL_COMMAND.label,
66
+ icon: PluginApiFrontendContribution.COLLAPSE_ALL_COMMAND.iconClass,
67
+ priority: 1000
68
+ });
69
+ }
35
70
  }
@@ -21,7 +21,7 @@ import { CommandRegistry } from '@theia/core/lib/common/command';
21
21
  import { StatefulWidget } from '@theia/core/lib/browser/shell/shell-layout-restorer';
22
22
  import { Message } from '@theia/core/shared/@phosphor/messaging';
23
23
  import { TreeViewWidget } from './tree-view-widget';
24
- import { BadgeWidget, DescriptionWidget } from '@theia/core/lib/browser/view-container';
24
+ import { BadgeWidget, DescriptionWidget, DynamicToolbarWidget } from '@theia/core/lib/browser/view-container';
25
25
  import { DisposableCollection, Emitter, Event } from '@theia/core/lib/common';
26
26
  import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
27
27
 
@@ -32,7 +32,7 @@ export class PluginViewWidgetIdentifier {
32
32
  }
33
33
 
34
34
  @injectable()
35
- export class PluginViewWidget extends Panel implements StatefulWidget, DescriptionWidget, BadgeWidget {
35
+ export class PluginViewWidget extends Panel implements StatefulWidget, DescriptionWidget, BadgeWidget, DynamicToolbarWidget {
36
36
 
37
37
  currentViewContainerId?: string;
38
38
 
@@ -46,6 +46,11 @@ export class PluginViewWidget extends Panel implements StatefulWidget, Descripti
46
46
  protected onDidChangeBadgeEmitter = new Emitter<void>();
47
47
  protected onDidChangeBadgeTooltipEmitter = new Emitter<void>();
48
48
  protected toDispose = new DisposableCollection(this.onDidChangeDescriptionEmitter, this.onDidChangeBadgeEmitter, this.onDidChangeBadgeTooltipEmitter);
49
+ protected readonly onDidChangeToolbarItemsEmitter = new Emitter<void>();
50
+
51
+ get onDidChangeToolbarItems(): Event<void> {
52
+ return this.onDidChangeToolbarItemsEmitter.event;
53
+ }
49
54
 
50
55
  @inject(MenuModelRegistry)
51
56
  protected readonly menus: MenuModelRegistry;
@@ -192,11 +197,13 @@ export class PluginViewWidget extends Panel implements StatefulWidget, Descripti
192
197
  widget.onDidChangeBadgeTooltip(() => this.onDidChangeBadgeTooltipEmitter.fire());
193
198
  }
194
199
  this.updateWidgetMessage();
200
+ this.onDidChangeToolbarItemsEmitter.fire();
195
201
  }
196
202
 
197
203
  override insertWidget(index: number, widget: Widget): void {
198
204
  super.insertWidget(index, widget);
199
205
  this.updateWidgetMessage();
206
+ this.onDidChangeToolbarItemsEmitter.fire();
200
207
  }
201
208
 
202
209
  override dispose(): void {
@@ -164,6 +164,7 @@ export namespace CompositeTreeViewNode {
164
164
  @injectable()
165
165
  export class TreeViewWidgetOptions {
166
166
  id: string;
167
+ showCollapseAll: boolean | undefined;
167
168
  multiSelect: boolean | undefined;
168
169
  dragMimeTypes: string[] | undefined;
169
170
  dropMimeTypes: string[] | undefined;
@@ -443,6 +444,10 @@ export class TreeViewWidget extends TreeViewWelcomeWidget {
443
444
  this.treeDragType = `application/vnd.code.tree.${this.id.toLowerCase()}`;
444
445
  }
445
446
 
447
+ get showCollapseAll(): boolean {
448
+ return this.options.showCollapseAll || false;
449
+ }
450
+
446
451
  protected override renderIcon(node: TreeNode, props: NodeProps): React.ReactNode {
447
452
  const icon = this.toNodeIcon(node);
448
453
  if (icon) {
@@ -63,6 +63,7 @@ export class TreeViewsMainImpl implements TreeViewsMain, Disposable {
63
63
  this.treeViewProviders.set(treeViewId, this.viewRegistry.registerViewDataProvider(treeViewId, async ({ state, viewInfo }) => {
64
64
  const options: TreeViewWidgetOptions = {
65
65
  id: treeViewId,
66
+ showCollapseAll: $options.showCollapseAll,
66
67
  multiSelect: $options.canSelectMany,
67
68
  dragMimeTypes: $options.dragMimeTypes,
68
69
  dropMimeTypes: $options.dropMimeTypes
package/src/plugin/env.ts CHANGED
@@ -14,7 +14,6 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { Emitter, Event } from '@theia/core/lib/common/event';
18
17
  import * as theia from '@theia/plugin';
19
18
  import { RPCProtocol } from '../common/rpc-protocol';
20
19
  import { EnvMain, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
@@ -31,16 +30,12 @@ export abstract class EnvExtImpl {
31
30
  private envMachineId: string;
32
31
  private envSessionId: string;
33
32
  private host: string;
34
- private _isTelemetryEnabled: boolean;
35
33
  private _remoteName: string | undefined;
36
- private onDidChangeTelemetryEnabledEmitter = new Emitter<boolean>();
37
34
 
38
35
  constructor(rpc: RPCProtocol) {
39
36
  this.proxy = rpc.getProxy(PLUGIN_RPC_CONTEXT.ENV_MAIN);
40
37
  this.envSessionId = v4();
41
38
  this.envMachineId = v4();
42
- // we don't support telemetry at the moment
43
- this._isTelemetryEnabled = false;
44
39
  this._remoteName = undefined;
45
40
  }
46
41
 
@@ -101,14 +96,6 @@ export abstract class EnvExtImpl {
101
96
  return this.host;
102
97
  }
103
98
 
104
- get isTelemetryEnabled(): boolean {
105
- return this._isTelemetryEnabled;
106
- }
107
-
108
- get onDidChangeTelemetryEnabled(): Event<boolean> {
109
- return this.onDidChangeTelemetryEnabledEmitter.event;
110
- }
111
-
112
99
  get remoteName(): string | undefined {
113
100
  return this._remoteName;
114
101
  }
@@ -999,6 +999,16 @@ export class LanguagesExtImpl implements LanguagesExt {
999
999
  return result;
1000
1000
  }
1001
1001
  // #endregion
1002
+
1003
+ // region DocumentPaste
1004
+
1005
+ /** @stubbed */
1006
+ registerDocumentPasteEditProvider(
1007
+ extension: Plugin, selector: theia.DocumentSelector, provider: theia.DocumentPasteEditProvider, metadata: theia.DocumentPasteProviderMetadata
1008
+ ): theia.Disposable {
1009
+ return Disposable.NULL;
1010
+ }
1011
+ // #endregion
1002
1012
  }
1003
1013
 
1004
1014
  function getPluginLabel(pluginInfo: PluginInfo): string {
@@ -160,9 +160,11 @@ import {
160
160
  TerminalLocation,
161
161
  TerminalExitReason,
162
162
  TerminalProfile,
163
+ TerminalQuickFixType,
163
164
  InlayHint,
164
165
  InlayHintKind,
165
166
  InlayHintLabelPart,
167
+ TelemetryTrustedValue,
166
168
  NotebookCell,
167
169
  NotebookCellKind,
168
170
  NotebookCellStatusBarAlignment,
@@ -191,7 +193,10 @@ import {
191
193
  TerminalEditorTabInput,
192
194
  TextDiffTabInput,
193
195
  TextMergeTabInput,
194
- WebviewEditorTabInput
196
+ WebviewEditorTabInput,
197
+ DocumentPasteEdit,
198
+ ExternalUriOpenerPriority,
199
+ EditSessionIdentityMatch
195
200
  } from './types-impl';
196
201
  import { AuthenticationExtImpl } from './authentication-ext';
197
202
  import { SymbolKind } from '../common/plugin-api-rpc-model';
@@ -236,6 +241,7 @@ import { Endpoint } from '@theia/core/lib/browser/endpoint';
236
241
  import { FilePermission } from '@theia/filesystem/lib/common/files';
237
242
  import { TabsExtImpl } from './tabs';
238
243
  import { LocalizationExtImpl } from './localization-ext';
244
+ import { TelemetryExtImpl } from './telemetry-ext';
239
245
 
240
246
  export function createAPIFactory(
241
247
  rpc: RPCProtocol,
@@ -277,6 +283,7 @@ export function createAPIFactory(
277
283
  const tabsExt = rpc.set(MAIN_RPC_CONTEXT.TABS_EXT, new TabsExtImpl(rpc));
278
284
  const customEditorExt = rpc.set(MAIN_RPC_CONTEXT.CUSTOM_EDITORS_EXT, new CustomEditorsExtImpl(rpc, documents, webviewExt, workspaceExt));
279
285
  const webviewViewsExt = rpc.set(MAIN_RPC_CONTEXT.WEBVIEW_VIEWS_EXT, new WebviewViewsExtImpl(rpc, webviewExt));
286
+ const telemetryExt = rpc.set(MAIN_RPC_CONTEXT.TELEMETRY_EXT, new TelemetryExtImpl());
280
287
  rpc.set(MAIN_RPC_CONTEXT.DEBUG_EXT, debugExt);
281
288
 
282
289
  return function (plugin: InternalPlugin): typeof theia {
@@ -569,6 +576,18 @@ export function createAPIFactory(
569
576
  },
570
577
  get tabGroups(): theia.TabGroups {
571
578
  return tabsExt.tabGroups;
579
+ },
580
+ /** @stubbed ExternalUriOpener */
581
+ registerExternalUriOpener(id: string, opener: theia.ExternalUriOpener, metadata: theia.ExternalUriOpenerMetadata): theia.Disposable {
582
+ return Disposable.NULL;
583
+ },
584
+ /** @stubbed ProfileContentHandler */
585
+ registerProfileContentHandler(id: string, profileContentHandler: theia.ProfileContentHandler): theia.Disposable {
586
+ return Disposable.NULL;
587
+ },
588
+ /** @stubbed TerminalQuickFixProvider */
589
+ registerTerminalQuickFixProvider(id: string, provider: theia.TerminalQuickFixProvider): theia.Disposable {
590
+ return terminalExt.registerTerminalQuickFixProvider(id, provider);
572
591
  }
573
592
  };
574
593
 
@@ -714,7 +733,16 @@ export function createAPIFactory(
714
733
  },
715
734
  get onDidGrantWorkspaceTrust(): theia.Event<void> {
716
735
  return workspaceExt.onDidGrantWorkspaceTrust;
717
- }
736
+ },
737
+ registerEditSessionIdentityProvider(scheme: string, provider: theia.EditSessionIdentityProvider) {
738
+ return workspaceExt.$registerEditSessionIdentityProvider(scheme, provider);
739
+ },
740
+ /**
741
+ * @stubbed
742
+ * This is a stub implementation, that should minimally satisfy vscode built-in extensions
743
+ * that currently use this proposed API.
744
+ */
745
+ onWillCreateEditSessionIdentity: () => Disposable.NULL,
718
746
  };
719
747
 
720
748
  const onDidChangeLogLevel = new Emitter<theia.LogLevel>();
@@ -724,9 +752,12 @@ export function createAPIFactory(
724
752
  get appHost(): string { return envExt.appHost; },
725
753
  get language(): string { return envExt.language; },
726
754
  get isNewAppInstall(): boolean { return envExt.isNewAppInstall; },
727
- get isTelemetryEnabled(): boolean { return envExt.isTelemetryEnabled; },
755
+ get isTelemetryEnabled(): boolean { return telemetryExt.isTelemetryEnabled; },
728
756
  get onDidChangeTelemetryEnabled(): theia.Event<boolean> {
729
- return envExt.onDidChangeTelemetryEnabled;
757
+ return telemetryExt.onDidChangeTelemetryEnabled;
758
+ },
759
+ createTelemetryLogger(sender: theia.TelemetrySender, options?: theia.TelemetryLoggerOptions): theia.TelemetryLogger {
760
+ return telemetryExt.createTelemetryLogger(sender, options);
730
761
  },
731
762
  get remoteName(): string | undefined { return envExt.remoteName; },
732
763
  get machineId(): string { return envExt.machineId; },
@@ -918,6 +949,11 @@ export function createAPIFactory(
918
949
  },
919
950
  createLanguageStatusItem(id: string, selector: theia.DocumentSelector): theia.LanguageStatusItem {
920
951
  return languagesExt.createLanguageStatusItem(plugin, id, selector);
952
+ },
953
+ registerDocumentPasteEditProvider(
954
+ selector: theia.DocumentSelector, provider: theia.DocumentPasteEditProvider, metadata: theia.DocumentPasteProviderMetadata
955
+ ): theia.Disposable {
956
+ return languagesExt.registerDocumentPasteEditProvider(plugin, selector, provider, metadata);
921
957
  }
922
958
  };
923
959
 
@@ -1307,6 +1343,7 @@ export function createAPIFactory(
1307
1343
  InlayHint,
1308
1344
  InlayHintKind,
1309
1345
  InlayHintLabelPart,
1346
+ TelemetryTrustedValue,
1310
1347
  NotebookCellData,
1311
1348
  NotebookCellKind,
1312
1349
  NotebookCellOutput,
@@ -1336,7 +1373,11 @@ export function createAPIFactory(
1336
1373
  TabInputWebview: WebviewEditorTabInput,
1337
1374
  TabInputTerminal: TerminalEditorTabInput,
1338
1375
  TerminalLocation,
1339
- TerminalExitReason
1376
+ TerminalExitReason,
1377
+ DocumentPasteEdit,
1378
+ ExternalUriOpenerPriority,
1379
+ TerminalQuickFixType,
1380
+ EditSessionIdentityMatch
1340
1381
  };
1341
1382
  };
1342
1383
  }