@theia/plugin-ext 1.25.0-next.7 → 1.25.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 (133) hide show
  1. package/lib/common/plugin-api-rpc-model.d.ts +3 -15
  2. package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
  3. package/lib/common/plugin-api-rpc-model.js.map +1 -1
  4. package/lib/common/plugin-api-rpc.d.ts +15 -22
  5. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  6. package/lib/common/plugin-api-rpc.js +2 -0
  7. package/lib/common/plugin-api-rpc.js.map +1 -1
  8. package/lib/common/uri-components.d.ts +2 -9
  9. package/lib/common/uri-components.d.ts.map +1 -1
  10. package/lib/common/uri-components.js +1 -7
  11. package/lib/common/uri-components.js.map +1 -1
  12. package/lib/hosted/node/hosted-plugin-localization-service.js +17 -2
  13. package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -1
  14. package/lib/main/browser/callhierarchy/callhierarchy-type-converters.d.ts +9 -9
  15. package/lib/main/browser/callhierarchy/callhierarchy-type-converters.d.ts.map +1 -1
  16. package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js +70 -89
  17. package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js.map +1 -1
  18. package/lib/main/browser/comments/comment-thread-widget.d.ts.map +1 -1
  19. package/lib/main/browser/comments/comment-thread-widget.js +8 -2
  20. package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
  21. package/lib/main/browser/comments/comments-main.d.ts +5 -0
  22. package/lib/main/browser/comments/comments-main.d.ts.map +1 -1
  23. package/lib/main/browser/comments/comments-main.js +14 -0
  24. package/lib/main/browser/comments/comments-main.js.map +1 -1
  25. package/lib/main/browser/debug/plugin-debug-adapter-contribution.d.ts +0 -12
  26. package/lib/main/browser/debug/plugin-debug-adapter-contribution.d.ts.map +1 -1
  27. package/lib/main/browser/debug/plugin-debug-adapter-contribution.js +0 -18
  28. package/lib/main/browser/debug/plugin-debug-adapter-contribution.js.map +1 -1
  29. package/lib/main/browser/debug/plugin-debug-configuration-provider.d.ts +2 -2
  30. package/lib/main/browser/debug/plugin-debug-configuration-provider.d.ts.map +1 -1
  31. package/lib/main/browser/debug/plugin-debug-configuration-provider.js.map +1 -1
  32. package/lib/main/browser/debug/plugin-debug-service.d.ts +3 -2
  33. package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
  34. package/lib/main/browser/debug/plugin-debug-service.js +28 -29
  35. package/lib/main/browser/debug/plugin-debug-service.js.map +1 -1
  36. package/lib/main/browser/languages-main.d.ts.map +1 -1
  37. package/lib/main/browser/languages-main.js +7 -1
  38. package/lib/main/browser/languages-main.js.map +1 -1
  39. package/lib/main/browser/main-context.d.ts.map +1 -1
  40. package/lib/main/browser/main-context.js +3 -0
  41. package/lib/main/browser/main-context.js.map +1 -1
  42. package/lib/main/browser/notification-main.d.ts +2 -1
  43. package/lib/main/browser/notification-main.d.ts.map +1 -1
  44. package/lib/main/browser/notification-main.js +12 -4
  45. package/lib/main/browser/notification-main.js.map +1 -1
  46. package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
  47. package/lib/main/browser/plugin-ext-frontend-module.js +3 -0
  48. package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
  49. package/lib/main/browser/status-bar-message-registry-main.d.ts +1 -1
  50. package/lib/main/browser/status-bar-message-registry-main.d.ts.map +1 -1
  51. package/lib/main/browser/status-bar-message-registry-main.js +4 -1
  52. package/lib/main/browser/status-bar-message-registry-main.js.map +1 -1
  53. package/lib/main/browser/view/tree-view-decorator-service.d.ts +33 -0
  54. package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -0
  55. package/lib/main/browser/view/tree-view-decorator-service.js +70 -0
  56. package/lib/main/browser/view/tree-view-decorator-service.js.map +1 -0
  57. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  58. package/lib/main/browser/view/tree-view-widget.js +5 -1
  59. package/lib/main/browser/view/tree-view-widget.js.map +1 -1
  60. package/lib/plugin/comments.d.ts +3 -0
  61. package/lib/plugin/comments.d.ts.map +1 -1
  62. package/lib/plugin/comments.js +12 -0
  63. package/lib/plugin/comments.js.map +1 -1
  64. package/lib/plugin/languages/call-hierarchy.d.ts +8 -7
  65. package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
  66. package/lib/plugin/languages/call-hierarchy.js +39 -31
  67. package/lib/plugin/languages/call-hierarchy.js.map +1 -1
  68. package/lib/plugin/languages/lens.js.map +1 -1
  69. package/lib/plugin/languages.d.ts +5 -4
  70. package/lib/plugin/languages.d.ts.map +1 -1
  71. package/lib/plugin/languages.js +3 -0
  72. package/lib/plugin/languages.js.map +1 -1
  73. package/lib/plugin/node/debug/debug.d.ts +2 -5
  74. package/lib/plugin/node/debug/debug.d.ts.map +1 -1
  75. package/lib/plugin/node/debug/debug.js +1 -60
  76. package/lib/plugin/node/debug/debug.js.map +1 -1
  77. package/lib/plugin/notification.d.ts +2 -0
  78. package/lib/plugin/notification.d.ts.map +1 -1
  79. package/lib/plugin/notification.js +14 -2
  80. package/lib/plugin/notification.js.map +1 -1
  81. package/lib/plugin/quick-open.d.ts +0 -1
  82. package/lib/plugin/quick-open.d.ts.map +1 -1
  83. package/lib/plugin/quick-open.js +1 -30
  84. package/lib/plugin/quick-open.js.map +1 -1
  85. package/lib/plugin/status-bar/status-bar-item.d.ts +10 -2
  86. package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
  87. package/lib/plugin/status-bar/status-bar-item.js +31 -1
  88. package/lib/plugin/status-bar/status-bar-item.js.map +1 -1
  89. package/lib/plugin/tree/tree-views.d.ts.map +1 -1
  90. package/lib/plugin/tree/tree-views.js +2 -1
  91. package/lib/plugin/tree/tree-views.js.map +1 -1
  92. package/lib/plugin/type-converters.d.ts +1 -1
  93. package/lib/plugin/type-converters.d.ts.map +1 -1
  94. package/lib/plugin/type-converters.js +10 -6
  95. package/lib/plugin/type-converters.js.map +1 -1
  96. package/lib/plugin/type-converters.spec.js +16 -1
  97. package/lib/plugin/type-converters.spec.js.map +1 -1
  98. package/lib/plugin/types-impl.d.ts +1 -2
  99. package/lib/plugin/types-impl.d.ts.map +1 -1
  100. package/lib/plugin/types-impl.js.map +1 -1
  101. package/lib/plugin/workspace.d.ts +1 -1
  102. package/lib/plugin/workspace.d.ts.map +1 -1
  103. package/package.json +24 -24
  104. package/src/common/plugin-api-rpc-model.ts +3 -17
  105. package/src/common/plugin-api-rpc.ts +32 -26
  106. package/src/common/uri-components.ts +4 -17
  107. package/src/hosted/node/hosted-plugin-localization-service.ts +23 -2
  108. package/src/main/browser/callhierarchy/callhierarchy-type-converters.ts +85 -97
  109. package/src/main/browser/comments/comment-thread-widget.tsx +8 -2
  110. package/src/main/browser/comments/comments-main.ts +15 -0
  111. package/src/main/browser/debug/plugin-debug-adapter-contribution.ts +0 -21
  112. package/src/main/browser/debug/plugin-debug-configuration-provider.ts +8 -2
  113. package/src/main/browser/debug/plugin-debug-service.ts +53 -31
  114. package/src/main/browser/languages-main.ts +8 -4
  115. package/src/main/browser/main-context.ts +4 -0
  116. package/src/main/browser/notification-main.ts +13 -4
  117. package/src/main/browser/plugin-ext-frontend-module.ts +3 -0
  118. package/src/main/browser/status-bar-message-registry-main.ts +5 -0
  119. package/src/main/browser/view/tree-view-decorator-service.ts +52 -0
  120. package/src/main/browser/view/tree-view-widget.tsx +4 -1
  121. package/src/plugin/comments.ts +16 -1
  122. package/src/plugin/languages/call-hierarchy.ts +44 -50
  123. package/src/plugin/languages/lens.ts +1 -1
  124. package/src/plugin/languages.ts +11 -6
  125. package/src/plugin/node/debug/debug.ts +22 -78
  126. package/src/plugin/notification.ts +18 -2
  127. package/src/plugin/quick-open.ts +1 -33
  128. package/src/plugin/status-bar/status-bar-item.ts +46 -5
  129. package/src/plugin/tree/tree-views.ts +2 -1
  130. package/src/plugin/type-converters.spec.ts +20 -1
  131. package/src/plugin/type-converters.ts +13 -7
  132. package/src/plugin/types-impl.ts +1 -2
  133. package/src/plugin/workspace.ts +1 -1
@@ -235,6 +235,19 @@ describe('Type converters:', () => {
235
235
  }
236
236
  };
237
237
 
238
+ const shellPluginTaskWithQuotedCommand: theia.Task = {
239
+ ...shellPluginTask, execution: {
240
+ command: {
241
+ quoting: types.ShellQuoting.Strong,
242
+ value: 'yarn'
243
+ },
244
+ args,
245
+ options: {
246
+ cwd
247
+ }
248
+ }
249
+ };
250
+
238
251
  const pluginTaskWithCommandLine: theia.Task = {
239
252
  name: label,
240
253
  source,
@@ -278,7 +291,7 @@ describe('Type converters:', () => {
278
291
  }
279
292
  };
280
293
 
281
- it('should convert to task dto', () => {
294
+ it('should convert to task dto with string command', () => {
282
295
  // when
283
296
  const result: TaskDto | undefined = Converter.fromTask(shellPluginTask);
284
297
 
@@ -287,6 +300,12 @@ describe('Type converters:', () => {
287
300
  assert.deepStrictEqual(result, shellTaskDto);
288
301
  });
289
302
 
303
+ it('should convert to task dto with ShellStringQuoted', () => {
304
+ const result: TaskDto | undefined = Converter.fromTask(shellPluginTaskWithQuotedCommand);
305
+ assert.notStrictEqual(result, undefined);
306
+ assert.deepStrictEqual(result, shellTaskDto);
307
+ });
308
+
290
309
  it('should convert from task dto', () => {
291
310
  // when
292
311
  const result: theia.Task = Converter.toTask(shellTaskDto);
@@ -675,7 +675,7 @@ export function toLocation(value: model.Location): types.Location {
675
675
  return new types.Location(URI.revive(value.uri), toRange(value.range));
676
676
  }
677
677
 
678
- export function fromCallHierarchyItem(item: theia.CallHierarchyItem): model.CallHierarchyItem {
678
+ export function fromCallHierarchyItem(item: types.CallHierarchyItem): model.CallHierarchyItem {
679
679
  return <model.CallHierarchyItem>{
680
680
  kind: SymbolKind.fromSymbolKind(item.kind),
681
681
  name: item.name,
@@ -684,7 +684,8 @@ export function fromCallHierarchyItem(item: theia.CallHierarchyItem): model.Call
684
684
  range: fromRange(item.range),
685
685
  selectionRange: fromRange(item.selectionRange),
686
686
  tags: item.tags,
687
- data: item.data,
687
+ _itemId: item._itemId,
688
+ _sessionId: item._sessionId,
688
689
  };
689
690
  }
690
691
 
@@ -698,7 +699,9 @@ export function toCallHierarchyItem(value: model.CallHierarchyItem): types.CallH
698
699
  toRange(value.selectionRange),
699
700
  );
700
701
  item.tags = value.tags;
701
- item.data = value.data;
702
+ item._itemId = value._itemId;
703
+ item._sessionId = value._sessionId;
704
+
702
705
  return item;
703
706
  }
704
707
 
@@ -885,13 +888,12 @@ export function fromShellExecution(execution: theia.ShellExecution, taskDto: Tas
885
888
  return taskDto;
886
889
  }
887
890
 
888
- const command = execution.command;
889
- if (typeof command === 'string') {
890
- taskDto.command = command;
891
+ if (execution.command) {
892
+ taskDto.command = getCommand(execution.command);
891
893
  taskDto.args = getShellArgs(execution.args);
892
894
  return taskDto;
893
895
  } else {
894
- throw new Error('Converting ShellQuotedString command is not implemented');
896
+ throw new Error('Command is undefined');
895
897
  }
896
898
  }
897
899
 
@@ -949,6 +951,10 @@ export function getShellArgs(args: undefined | (string | theia.ShellQuotedString
949
951
  return result;
950
952
  }
951
953
 
954
+ function getCommand(command: string | theia.ShellQuotedString): string {
955
+ return typeof command === 'string' ? command : command.value;
956
+ }
957
+
952
958
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
953
959
  export function getShellExecutionOptions(options: theia.ShellExecutionOptions): { [key: string]: any } {
954
960
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2437,7 +2437,6 @@ export class CallHierarchyItem {
2437
2437
  range: Range;
2438
2438
  selectionRange: Range;
2439
2439
  tags?: readonly SymbolTag[];
2440
- data?: unknown;
2441
2440
 
2442
2441
  constructor(kind: SymbolKind, name: string, detail: string, uri: URI, range: Range, selectionRange: Range) {
2443
2442
  this.kind = kind;
@@ -2448,7 +2447,7 @@ export class CallHierarchyItem {
2448
2447
  this.selectionRange = selectionRange;
2449
2448
  }
2450
2449
 
2451
- static isCallHierarchyItem(thing: {}): thing is theia.CallHierarchyItem {
2450
+ static isCallHierarchyItem(thing: {}): thing is CallHierarchyItem {
2452
2451
  if (thing instanceof CallHierarchyItem) {
2453
2452
  return true;
2454
2453
  }
@@ -276,7 +276,7 @@ export class WorkspaceExtImpl implements WorkspaceExt {
276
276
  };
277
277
  }
278
278
 
279
- async $provideTextDocumentContent(documentURI: string): Promise<string | undefined> {
279
+ async $provideTextDocumentContent(documentURI: string): Promise<string | undefined | null> {
280
280
  const uri = URI.parse(documentURI);
281
281
  const provider = this.documentContentProviders.get(uri.scheme);
282
282
  if (provider) {