@theia/plugin-ext 1.32.0-next.5 → 1.32.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 (85) hide show
  1. package/lib/common/plugin-api-rpc-model.d.ts +3 -3
  2. package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
  3. package/lib/common/plugin-api-rpc.d.ts +7 -3
  4. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  5. package/lib/common/plugin-api-rpc.js +3 -3
  6. package/lib/common/plugin-api-rpc.js.map +1 -1
  7. package/lib/hosted/node/hosted-plugin-localization-service.d.ts +2 -2
  8. package/lib/hosted/node/hosted-plugin-localization-service.d.ts.map +1 -1
  9. package/lib/hosted/node/hosted-plugin-localization-service.js +4 -4
  10. package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -1
  11. package/lib/main/browser/authentication-main.js +2 -2
  12. package/lib/main/browser/authentication-main.js.map +1 -1
  13. package/lib/main/browser/languages-main.d.ts +5 -2
  14. package/lib/main/browser/languages-main.d.ts.map +1 -1
  15. package/lib/main/browser/languages-main.js +20 -11
  16. package/lib/main/browser/languages-main.js.map +1 -1
  17. package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts.map +1 -1
  18. package/lib/main/browser/menus/plugin-menu-command-adapter.js +3 -1
  19. package/lib/main/browser/menus/plugin-menu-command-adapter.js.map +1 -1
  20. package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
  21. package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
  22. package/lib/main/browser/tasks-main.d.ts.map +1 -1
  23. package/lib/main/browser/tasks-main.js +2 -2
  24. package/lib/main/browser/tasks-main.js.map +1 -1
  25. package/lib/main/browser/text-editor-main.d.ts.map +1 -1
  26. package/lib/main/browser/text-editor-main.js +3 -2
  27. package/lib/main/browser/text-editor-main.js.map +1 -1
  28. package/lib/main/browser/theme-icon-override.js +31 -0
  29. package/lib/main/browser/theme-icon-override.js.map +1 -1
  30. package/lib/main/browser/view/plugin-tree-view-node-label-provider.js +1 -1
  31. package/lib/main/browser/view/plugin-tree-view-node-label-provider.js.map +1 -1
  32. package/lib/main/browser/view/tree-view-widget.d.ts +3 -5
  33. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  34. package/lib/main/browser/view/tree-view-widget.js +59 -35
  35. package/lib/main/browser/view/tree-view-widget.js.map +1 -1
  36. package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
  37. package/lib/main/browser/view/tree-views-main.js +0 -7
  38. package/lib/main/browser/view/tree-views-main.js.map +1 -1
  39. package/lib/plugin/languages.d.ts.map +1 -1
  40. package/lib/plugin/languages.js.map +1 -1
  41. package/lib/plugin/plugin-context.d.ts +2 -5
  42. package/lib/plugin/plugin-context.d.ts.map +1 -1
  43. package/lib/plugin/plugin-context.js +26 -8
  44. package/lib/plugin/plugin-context.js.map +1 -1
  45. package/lib/plugin/preference-registry.d.ts.map +1 -1
  46. package/lib/plugin/preference-registry.js +3 -3
  47. package/lib/plugin/preference-registry.js.map +1 -1
  48. package/lib/plugin/quick-open.d.ts.map +1 -1
  49. package/lib/plugin/quick-open.js +15 -10
  50. package/lib/plugin/quick-open.js.map +1 -1
  51. package/lib/plugin/terminal-ext.d.ts +1 -1
  52. package/lib/plugin/terminal-ext.d.ts.map +1 -1
  53. package/lib/plugin/terminal-ext.js.map +1 -1
  54. package/lib/plugin/type-converters.d.ts.map +1 -1
  55. package/lib/plugin/type-converters.js +17 -3
  56. package/lib/plugin/type-converters.js.map +1 -1
  57. package/lib/plugin/type-converters.spec.js +17 -2
  58. package/lib/plugin/type-converters.spec.js.map +1 -1
  59. package/lib/plugin/types-impl.d.ts +7 -0
  60. package/lib/plugin/types-impl.d.ts.map +1 -1
  61. package/lib/plugin/types-impl.js +17 -3
  62. package/lib/plugin/types-impl.js.map +1 -1
  63. package/package.json +28 -28
  64. package/src/common/plugin-api-rpc-model.ts +3 -3
  65. package/src/common/plugin-api-rpc.ts +11 -6
  66. package/src/hosted/node/hosted-plugin-localization-service.ts +5 -5
  67. package/src/main/browser/authentication-main.ts +2 -2
  68. package/src/main/browser/languages-main.ts +46 -28
  69. package/src/main/browser/menus/plugin-menu-command-adapter.ts +3 -1
  70. package/src/main/browser/plugin-contribution-handler.ts +2 -1
  71. package/src/main/browser/style/index.css +11 -6
  72. package/src/main/browser/tasks-main.ts +2 -1
  73. package/src/main/browser/text-editor-main.ts +3 -2
  74. package/src/main/browser/theme-icon-override.ts +31 -0
  75. package/src/main/browser/view/plugin-tree-view-node-label-provider.ts +1 -1
  76. package/src/main/browser/view/tree-view-widget.tsx +63 -42
  77. package/src/main/browser/view/tree-views-main.ts +0 -7
  78. package/src/plugin/languages.ts +2 -1
  79. package/src/plugin/plugin-context.ts +32 -13
  80. package/src/plugin/preference-registry.ts +11 -3
  81. package/src/plugin/quick-open.ts +15 -9
  82. package/src/plugin/terminal-ext.ts +4 -1
  83. package/src/plugin/type-converters.spec.ts +17 -2
  84. package/src/plugin/type-converters.ts +18 -3
  85. package/src/plugin/types-impl.ts +17 -0
@@ -565,10 +565,22 @@ export function fromWorkspaceEdit(value: theia.WorkspaceEdit, documents?: any):
565
565
  if (Array.isArray(uriOrEdits)) {
566
566
  // text edits
567
567
  const doc = documents ? documents.getDocument(uri.toString()) : undefined;
568
- result.edits.push(<WorkspaceTextEditDto>{ resource: uri, modelVersionId: doc && doc.version, edit: uriOrEdits.map(fromTextEdit)[0], metadata: entry[2] });
568
+ const workspaceTextEditDto: WorkspaceTextEditDto = {
569
+ resource: uri,
570
+ modelVersionId: doc?.version,
571
+ textEdit: uriOrEdits.map(fromTextEdit)[0],
572
+ metadata: entry[2] as types.WorkspaceEditMetadata
573
+ };
574
+ result.edits.push(workspaceTextEditDto);
569
575
  } else {
570
576
  // resource edits
571
- result.edits.push(<WorkspaceFileEditDto>{ oldUri: uri, newUri: uriOrEdits, options: entry[2], metadata: entry[3] });
577
+ const workspaceFileEditDto: WorkspaceFileEditDto = {
578
+ oldResource: uri,
579
+ newResource: uriOrEdits,
580
+ options: entry[2] as types.FileOperationOptions,
581
+ metadata: entry[3]
582
+ };
583
+ result.edits.push(workspaceFileEditDto);
572
584
  }
573
585
  }
574
586
  return result;
@@ -816,6 +828,8 @@ export function fromTask(task: theia.Task): TaskDto | undefined {
816
828
  taskDto.label = task.name;
817
829
  taskDto.source = task.source;
818
830
 
831
+ taskDto.runOptions = { reevaluateOnRerun: task.runOptions.reevaluateOnRerun };
832
+
819
833
  if ((task as types.Task).hasProblemMatchers) {
820
834
  taskDto.problemMatcher = task.problemMatchers;
821
835
  }
@@ -877,10 +891,11 @@ export function toTask(taskDto: TaskDto): theia.Task {
877
891
  throw new Error('Task should be provided for converting');
878
892
  }
879
893
 
880
- const { type, taskType, label, source, scope, problemMatcher, detail, command, args, options, group, presentation, ...properties } = taskDto;
894
+ const { type, taskType, label, source, scope, problemMatcher, detail, command, args, options, group, presentation, runOptions, ...properties } = taskDto;
881
895
  const result = {} as theia.Task;
882
896
  result.name = label;
883
897
  result.source = source;
898
+ result.runOptions = runOptions ?? {};
884
899
  if (detail) {
885
900
  result.detail = detail;
886
901
  }
@@ -213,6 +213,11 @@ export enum ExtensionMode {
213
213
  Test = 3,
214
214
  }
215
215
 
216
+ export enum ExtensionKind {
217
+ UI = 1,
218
+ Workspace = 2
219
+ }
220
+
216
221
  /**
217
222
  * Represents the validation type of the Source Control input.
218
223
  */
@@ -2057,6 +2062,7 @@ export class Task {
2057
2062
  private taskSource: string;
2058
2063
  private taskGroup: TaskGroup | undefined;
2059
2064
  private taskPresentationOptions: theia.TaskPresentationOptions;
2065
+ private taskRunOptions: theia.RunOptions;
2060
2066
  constructor(
2061
2067
  taskDefinition: theia.TaskDefinition,
2062
2068
  scope: theia.WorkspaceFolder | theia.TaskScope.Global | theia.TaskScope.Workspace,
@@ -2229,6 +2235,17 @@ export class Task {
2229
2235
  }
2230
2236
  this.taskPresentationOptions = value;
2231
2237
  }
2238
+
2239
+ get runOptions(): theia.RunOptions {
2240
+ return this.taskRunOptions;
2241
+ }
2242
+
2243
+ set runOptions(value: theia.RunOptions) {
2244
+ if (value === null || value === undefined) {
2245
+ value = Object.create(null);
2246
+ }
2247
+ this.taskRunOptions = value;
2248
+ }
2232
2249
  }
2233
2250
 
2234
2251
  @es5ClassCompat