@theia/plugin-ext 1.50.1 → 1.52.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 (342) hide show
  1. package/lib/common/plugin-api-rpc-model.d.ts +13 -2
  2. package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
  3. package/lib/common/plugin-api-rpc.d.ts +38 -19
  4. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  5. package/lib/common/plugin-api-rpc.js +12 -1
  6. package/lib/common/plugin-api-rpc.js.map +1 -1
  7. package/lib/common/proxy-handler.d.ts.map +1 -1
  8. package/lib/common/proxy-handler.js +3 -1
  9. package/lib/common/proxy-handler.js.map +1 -1
  10. package/lib/common/test-types.d.ts +1 -0
  11. package/lib/common/test-types.d.ts.map +1 -1
  12. package/lib/common/test-types.js.map +1 -1
  13. package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
  14. package/lib/hosted/browser/hosted-plugin.js +2 -0
  15. package/lib/hosted/browser/hosted-plugin.js.map +1 -1
  16. package/lib/hosted/browser/worker/worker-env-ext.d.ts +0 -3
  17. package/lib/hosted/browser/worker/worker-env-ext.d.ts.map +1 -1
  18. package/lib/hosted/browser/worker/worker-env-ext.js +2 -4
  19. package/lib/hosted/browser/worker/worker-env-ext.js.map +1 -1
  20. package/lib/hosted/browser/worker/worker-main.js +2 -2
  21. package/lib/hosted/browser/worker/worker-main.js.map +1 -1
  22. package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
  23. package/lib/hosted/node/scanners/scanner-theia.js +1 -0
  24. package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
  25. package/lib/main/browser/authentication-main.d.ts +4 -2
  26. package/lib/main/browser/authentication-main.d.ts.map +1 -1
  27. package/lib/main/browser/command-registry-main.d.ts +4 -2
  28. package/lib/main/browser/command-registry-main.d.ts.map +1 -1
  29. package/lib/main/browser/custom-editors/custom-editors-main.d.ts +4 -2
  30. package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
  31. package/lib/main/browser/debug/debug-main.d.ts +3 -0
  32. package/lib/main/browser/debug/debug-main.d.ts.map +1 -1
  33. package/lib/main/browser/debug/debug-main.js +20 -2
  34. package/lib/main/browser/debug/debug-main.js.map +1 -1
  35. package/lib/main/browser/debug/plugin-debug-service.d.ts +4 -2
  36. package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
  37. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +7 -4
  38. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
  39. package/lib/main/browser/debug/plugin-debug-session-factory.js +6 -5
  40. package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
  41. package/lib/main/browser/documents-main.d.ts +2 -4
  42. package/lib/main/browser/documents-main.d.ts.map +1 -1
  43. package/lib/main/browser/documents-main.js +2 -18
  44. package/lib/main/browser/documents-main.js.map +1 -1
  45. package/lib/main/browser/editors-and-documents-main.d.ts +2 -1
  46. package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
  47. package/lib/main/browser/editors-and-documents-main.js +12 -5
  48. package/lib/main/browser/editors-and-documents-main.js.map +1 -1
  49. package/lib/main/browser/languages-main.d.ts +4 -2
  50. package/lib/main/browser/languages-main.d.ts.map +1 -1
  51. package/lib/main/browser/main-context.d.ts.map +1 -1
  52. package/lib/main/browser/main-context.js +4 -6
  53. package/lib/main/browser/main-context.js.map +1 -1
  54. package/lib/main/browser/notebooks/notebooks-main.d.ts +4 -2
  55. package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -1
  56. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +7 -0
  57. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -1
  58. package/lib/main/browser/notebooks/renderers/cell-output-webview.js +30 -4
  59. package/lib/main/browser/notebooks/renderers/cell-output-webview.js.map +1 -1
  60. package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -1
  61. package/lib/main/browser/notebooks/renderers/output-webview-internal.js +15 -0
  62. package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
  63. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts +5 -1
  64. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts.map +1 -1
  65. package/lib/main/browser/quick-open-main.d.ts +7 -3
  66. package/lib/main/browser/quick-open-main.d.ts.map +1 -1
  67. package/lib/main/browser/quick-open-main.js +21 -38
  68. package/lib/main/browser/quick-open-main.js.map +1 -1
  69. package/lib/main/browser/tabs/tabs-main.d.ts +5 -3
  70. package/lib/main/browser/tabs/tabs-main.d.ts.map +1 -1
  71. package/lib/main/browser/tabs/tabs-main.js +37 -13
  72. package/lib/main/browser/tabs/tabs-main.js.map +1 -1
  73. package/lib/main/browser/terminal-main.d.ts +9 -4
  74. package/lib/main/browser/terminal-main.d.ts.map +1 -1
  75. package/lib/main/browser/terminal-main.js +21 -2
  76. package/lib/main/browser/terminal-main.js.map +1 -1
  77. package/lib/main/browser/test-main.d.ts +3 -2
  78. package/lib/main/browser/test-main.d.ts.map +1 -1
  79. package/lib/main/browser/test-main.js +7 -3
  80. package/lib/main/browser/test-main.js.map +1 -1
  81. package/lib/main/browser/text-editor-model-service.d.ts +1 -0
  82. package/lib/main/browser/text-editor-model-service.d.ts.map +1 -1
  83. package/lib/main/browser/text-editor-model-service.js +8 -0
  84. package/lib/main/browser/text-editor-model-service.js.map +1 -1
  85. package/lib/main/browser/view/tree-view-decorator-service.d.ts +4 -2
  86. package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -1
  87. package/lib/main/browser/view/tree-view-widget.d.ts +4 -2
  88. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  89. package/lib/main/browser/view/tree-views-main.d.ts +4 -3
  90. package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
  91. package/lib/main/browser/view/tree-views-main.js +0 -3
  92. package/lib/main/browser/view/tree-views-main.js.map +1 -1
  93. package/lib/main/browser/view/view-context-key-service.d.ts +0 -2
  94. package/lib/main/browser/view/view-context-key-service.d.ts.map +1 -1
  95. package/lib/main/browser/view/view-context-key-service.js +0 -4
  96. package/lib/main/browser/view/view-context-key-service.js.map +1 -1
  97. package/lib/main/browser/webview/webview.d.ts +4 -2
  98. package/lib/main/browser/webview/webview.d.ts.map +1 -1
  99. package/lib/main/browser/webview-views/webview-views-main.d.ts +4 -2
  100. package/lib/main/browser/webview-views/webview-views-main.d.ts.map +1 -1
  101. package/lib/main/browser/webviews-main.d.ts +4 -2
  102. package/lib/main/browser/webviews-main.d.ts.map +1 -1
  103. package/lib/main/browser/window-state-main.js +1 -1
  104. package/lib/main/browser/window-state-main.js.map +1 -1
  105. package/lib/main/browser/workspace-main.d.ts +4 -2
  106. package/lib/main/browser/workspace-main.d.ts.map +1 -1
  107. package/lib/plugin/authentication-ext.d.ts +4 -2
  108. package/lib/plugin/authentication-ext.d.ts.map +1 -1
  109. package/lib/plugin/clipboard-ext.d.ts +4 -2
  110. package/lib/plugin/clipboard-ext.d.ts.map +1 -1
  111. package/lib/plugin/command-registry.d.ts +4 -2
  112. package/lib/plugin/command-registry.d.ts.map +1 -1
  113. package/lib/plugin/comments.d.ts +4 -2
  114. package/lib/plugin/comments.d.ts.map +1 -1
  115. package/lib/plugin/custom-editors.d.ts +4 -2
  116. package/lib/plugin/custom-editors.d.ts.map +1 -1
  117. package/lib/plugin/debug/debug-ext.d.ts +12 -3
  118. package/lib/plugin/debug/debug-ext.d.ts.map +1 -1
  119. package/lib/plugin/debug/debug-ext.js +46 -3
  120. package/lib/plugin/debug/debug-ext.js.map +1 -1
  121. package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts +4 -2
  122. package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts.map +1 -1
  123. package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +4 -2
  124. package/lib/plugin/debug/plugin-debug-adapter-session.d.ts.map +1 -1
  125. package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts +4 -2
  126. package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts.map +1 -1
  127. package/lib/plugin/decorations.d.ts +4 -2
  128. package/lib/plugin/decorations.d.ts.map +1 -1
  129. package/lib/plugin/dialogs.d.ts +4 -2
  130. package/lib/plugin/dialogs.d.ts.map +1 -1
  131. package/lib/plugin/document-data.d.ts +4 -2
  132. package/lib/plugin/document-data.d.ts.map +1 -1
  133. package/lib/plugin/documents.d.ts +4 -2
  134. package/lib/plugin/documents.d.ts.map +1 -1
  135. package/lib/plugin/env.d.ts +4 -2
  136. package/lib/plugin/env.d.ts.map +1 -1
  137. package/lib/plugin/file-system-event-service-ext-impl.d.ts +4 -2
  138. package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
  139. package/lib/plugin/file-system-ext-impl.d.ts +4 -2
  140. package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
  141. package/lib/plugin/label-service.d.ts +4 -2
  142. package/lib/plugin/label-service.d.ts.map +1 -1
  143. package/lib/plugin/languages/call-hierarchy.d.ts +4 -2
  144. package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
  145. package/lib/plugin/languages/code-action.d.ts +4 -2
  146. package/lib/plugin/languages/code-action.d.ts.map +1 -1
  147. package/lib/plugin/languages/color.d.ts +4 -2
  148. package/lib/plugin/languages/color.d.ts.map +1 -1
  149. package/lib/plugin/languages/completion.d.ts +4 -2
  150. package/lib/plugin/languages/completion.d.ts.map +1 -1
  151. package/lib/plugin/languages/declaration.d.ts +4 -2
  152. package/lib/plugin/languages/declaration.d.ts.map +1 -1
  153. package/lib/plugin/languages/definition.d.ts +4 -2
  154. package/lib/plugin/languages/definition.d.ts.map +1 -1
  155. package/lib/plugin/languages/diagnostics.d.ts +4 -2
  156. package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
  157. package/lib/plugin/languages/document-drop-edit.d.ts +4 -2
  158. package/lib/plugin/languages/document-drop-edit.d.ts.map +1 -1
  159. package/lib/plugin/languages/document-formatting.d.ts +4 -2
  160. package/lib/plugin/languages/document-formatting.d.ts.map +1 -1
  161. package/lib/plugin/languages/document-highlight.d.ts +4 -2
  162. package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
  163. package/lib/plugin/languages/evaluatable-expression.d.ts +4 -2
  164. package/lib/plugin/languages/evaluatable-expression.d.ts.map +1 -1
  165. package/lib/plugin/languages/folding.d.ts +4 -2
  166. package/lib/plugin/languages/folding.d.ts.map +1 -1
  167. package/lib/plugin/languages/hover.d.ts +4 -2
  168. package/lib/plugin/languages/hover.d.ts.map +1 -1
  169. package/lib/plugin/languages/implementation.d.ts +4 -2
  170. package/lib/plugin/languages/implementation.d.ts.map +1 -1
  171. package/lib/plugin/languages/inlay-hints.d.ts +4 -2
  172. package/lib/plugin/languages/inlay-hints.d.ts.map +1 -1
  173. package/lib/plugin/languages/inline-completion.d.ts +4 -2
  174. package/lib/plugin/languages/inline-completion.d.ts.map +1 -1
  175. package/lib/plugin/languages/inline-values.d.ts +4 -2
  176. package/lib/plugin/languages/inline-values.d.ts.map +1 -1
  177. package/lib/plugin/languages/lens.d.ts +4 -2
  178. package/lib/plugin/languages/lens.d.ts.map +1 -1
  179. package/lib/plugin/languages/link-provider.d.ts +4 -2
  180. package/lib/plugin/languages/link-provider.d.ts.map +1 -1
  181. package/lib/plugin/languages/linked-editing-range.d.ts +4 -2
  182. package/lib/plugin/languages/linked-editing-range.d.ts.map +1 -1
  183. package/lib/plugin/languages/on-type-formatting.d.ts +4 -2
  184. package/lib/plugin/languages/on-type-formatting.d.ts.map +1 -1
  185. package/lib/plugin/languages/outline.d.ts +4 -2
  186. package/lib/plugin/languages/outline.d.ts.map +1 -1
  187. package/lib/plugin/languages/range-formatting.d.ts +4 -2
  188. package/lib/plugin/languages/range-formatting.d.ts.map +1 -1
  189. package/lib/plugin/languages/reference.d.ts +4 -2
  190. package/lib/plugin/languages/reference.d.ts.map +1 -1
  191. package/lib/plugin/languages/rename.d.ts +4 -2
  192. package/lib/plugin/languages/rename.d.ts.map +1 -1
  193. package/lib/plugin/languages/selection-range.d.ts +4 -2
  194. package/lib/plugin/languages/selection-range.d.ts.map +1 -1
  195. package/lib/plugin/languages/semantic-highlighting.d.ts +4 -2
  196. package/lib/plugin/languages/semantic-highlighting.d.ts.map +1 -1
  197. package/lib/plugin/languages/signature.d.ts +4 -2
  198. package/lib/plugin/languages/signature.d.ts.map +1 -1
  199. package/lib/plugin/languages/type-definition.d.ts +4 -2
  200. package/lib/plugin/languages/type-definition.d.ts.map +1 -1
  201. package/lib/plugin/languages/type-hierarchy.d.ts +4 -2
  202. package/lib/plugin/languages/type-hierarchy.d.ts.map +1 -1
  203. package/lib/plugin/languages/util.d.ts +4 -2
  204. package/lib/plugin/languages/util.d.ts.map +1 -1
  205. package/lib/plugin/languages/workspace-symbol.d.ts +4 -2
  206. package/lib/plugin/languages/workspace-symbol.d.ts.map +1 -1
  207. package/lib/plugin/languages-utils.d.ts +4 -2
  208. package/lib/plugin/languages-utils.d.ts.map +1 -1
  209. package/lib/plugin/languages.d.ts +4 -2
  210. package/lib/plugin/languages.d.ts.map +1 -1
  211. package/lib/plugin/markdown-string.d.ts +4 -2
  212. package/lib/plugin/markdown-string.d.ts.map +1 -1
  213. package/lib/plugin/message-registry.d.ts +4 -2
  214. package/lib/plugin/message-registry.d.ts.map +1 -1
  215. package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts +4 -2
  216. package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts.map +1 -1
  217. package/lib/plugin/notebook/notebook-document.d.ts +4 -2
  218. package/lib/plugin/notebook/notebook-document.d.ts.map +1 -1
  219. package/lib/plugin/notebook/notebook-documents.d.ts +4 -2
  220. package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -1
  221. package/lib/plugin/notebook/notebook-editor.d.ts +4 -2
  222. package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -1
  223. package/lib/plugin/notebook/notebook-editors.d.ts +4 -2
  224. package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -1
  225. package/lib/plugin/notebook/notebook-kernels.d.ts +4 -2
  226. package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
  227. package/lib/plugin/notebook/notebook-renderers.d.ts +4 -2
  228. package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
  229. package/lib/plugin/notebook/notebooks.d.ts +4 -2
  230. package/lib/plugin/notebook/notebooks.d.ts.map +1 -1
  231. package/lib/plugin/notification.d.ts +4 -2
  232. package/lib/plugin/notification.d.ts.map +1 -1
  233. package/lib/plugin/output-channel/log-output-channel.d.ts +4 -2
  234. package/lib/plugin/output-channel/log-output-channel.d.ts.map +1 -1
  235. package/lib/plugin/output-channel/output-channel-item.d.ts +4 -2
  236. package/lib/plugin/output-channel/output-channel-item.d.ts.map +1 -1
  237. package/lib/plugin/output-channel-registry.d.ts +4 -2
  238. package/lib/plugin/output-channel-registry.d.ts.map +1 -1
  239. package/lib/plugin/plugin-context.d.ts +4 -2
  240. package/lib/plugin/plugin-context.d.ts.map +1 -1
  241. package/lib/plugin/plugin-context.js +57 -6
  242. package/lib/plugin/plugin-context.js.map +1 -1
  243. package/lib/plugin/plugin-icon-path.d.ts +2 -1
  244. package/lib/plugin/plugin-icon-path.d.ts.map +1 -1
  245. package/lib/plugin/plugin-icon-path.js +5 -1
  246. package/lib/plugin/plugin-icon-path.js.map +1 -1
  247. package/lib/plugin/plugin-manager.d.ts +7 -3
  248. package/lib/plugin/plugin-manager.d.ts.map +1 -1
  249. package/lib/plugin/plugin-manager.js +13 -1
  250. package/lib/plugin/plugin-manager.js.map +1 -1
  251. package/lib/plugin/plugin-storage.d.ts +4 -2
  252. package/lib/plugin/plugin-storage.d.ts.map +1 -1
  253. package/lib/plugin/preference-registry.d.ts +4 -2
  254. package/lib/plugin/preference-registry.d.ts.map +1 -1
  255. package/lib/plugin/quick-open.d.ts +7 -19
  256. package/lib/plugin/quick-open.d.ts.map +1 -1
  257. package/lib/plugin/quick-open.js +22 -39
  258. package/lib/plugin/quick-open.js.map +1 -1
  259. package/lib/plugin/scm.d.ts +4 -2
  260. package/lib/plugin/scm.d.ts.map +1 -1
  261. package/lib/plugin/secrets-ext.d.ts +4 -2
  262. package/lib/plugin/secrets-ext.d.ts.map +1 -1
  263. package/lib/plugin/status-bar/status-bar-item.d.ts +4 -2
  264. package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
  265. package/lib/plugin/status-bar-message-registry.d.ts +4 -2
  266. package/lib/plugin/status-bar-message-registry.d.ts.map +1 -1
  267. package/lib/plugin/tabs.d.ts +4 -2
  268. package/lib/plugin/tabs.d.ts.map +1 -1
  269. package/lib/plugin/tasks/task-provider.d.ts +4 -2
  270. package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
  271. package/lib/plugin/tasks/tasks.d.ts +4 -2
  272. package/lib/plugin/tasks/tasks.d.ts.map +1 -1
  273. package/lib/plugin/terminal-ext.d.ts +13 -16
  274. package/lib/plugin/terminal-ext.d.ts.map +1 -1
  275. package/lib/plugin/terminal-ext.js +14 -21
  276. package/lib/plugin/terminal-ext.js.map +1 -1
  277. package/lib/plugin/test-item.d.ts +4 -2
  278. package/lib/plugin/test-item.d.ts.map +1 -1
  279. package/lib/plugin/tests.d.ts +11 -8
  280. package/lib/plugin/tests.d.ts.map +1 -1
  281. package/lib/plugin/tests.js +33 -28
  282. package/lib/plugin/tests.js.map +1 -1
  283. package/lib/plugin/text-editor.d.ts +4 -2
  284. package/lib/plugin/text-editor.d.ts.map +1 -1
  285. package/lib/plugin/text-editors.d.ts +4 -2
  286. package/lib/plugin/text-editors.d.ts.map +1 -1
  287. package/lib/plugin/timeline.d.ts +4 -2
  288. package/lib/plugin/timeline.d.ts.map +1 -1
  289. package/lib/plugin/tree/tree-views.d.ts +4 -2
  290. package/lib/plugin/tree/tree-views.d.ts.map +1 -1
  291. package/lib/plugin/tree/tree-views.js.map +1 -1
  292. package/lib/plugin/type-converters.d.ts +7 -6
  293. package/lib/plugin/type-converters.d.ts.map +1 -1
  294. package/lib/plugin/type-converters.js +9 -7
  295. package/lib/plugin/type-converters.js.map +1 -1
  296. package/lib/plugin/types-impl.d.ts +111 -3
  297. package/lib/plugin/types-impl.d.ts.map +1 -1
  298. package/lib/plugin/types-impl.js +134 -4
  299. package/lib/plugin/types-impl.js.map +1 -1
  300. package/lib/plugin/webview-views.d.ts +4 -2
  301. package/lib/plugin/webview-views.d.ts.map +1 -1
  302. package/lib/plugin/webviews.d.ts +4 -2
  303. package/lib/plugin/webviews.d.ts.map +1 -1
  304. package/lib/plugin/window-state.d.ts +4 -2
  305. package/lib/plugin/window-state.d.ts.map +1 -1
  306. package/lib/plugin/workspace.d.ts +4 -2
  307. package/lib/plugin/workspace.d.ts.map +1 -1
  308. package/package.json +29 -29
  309. package/src/common/plugin-api-rpc-model.ts +10 -0
  310. package/src/common/plugin-api-rpc.ts +32 -13
  311. package/src/common/proxy-handler.ts +3 -1
  312. package/src/common/test-types.ts +1 -0
  313. package/src/hosted/browser/hosted-plugin.ts +3 -1
  314. package/src/hosted/browser/worker/worker-env-ext.ts +2 -4
  315. package/src/hosted/browser/worker/worker-main.ts +2 -2
  316. package/src/hosted/node/scanners/scanner-theia.ts +1 -0
  317. package/src/main/browser/debug/debug-main.ts +26 -2
  318. package/src/main/browser/debug/plugin-debug-session-factory.ts +13 -3
  319. package/src/main/browser/documents-main.ts +3 -21
  320. package/src/main/browser/editors-and-documents-main.ts +13 -5
  321. package/src/main/browser/main-context.ts +5 -7
  322. package/src/main/browser/notebooks/renderers/cell-output-webview.tsx +33 -4
  323. package/src/main/browser/notebooks/renderers/output-webview-internal.ts +18 -0
  324. package/src/main/browser/notebooks/renderers/webview-communication.ts +12 -1
  325. package/src/main/browser/quick-open-main.ts +23 -45
  326. package/src/main/browser/tabs/tabs-main.ts +39 -15
  327. package/src/main/browser/terminal-main.ts +26 -6
  328. package/src/main/browser/test-main.ts +8 -3
  329. package/src/main/browser/text-editor-model-service.ts +9 -0
  330. package/src/main/browser/view/tree-views-main.ts +0 -4
  331. package/src/main/browser/view/view-context-key-service.ts +0 -6
  332. package/src/main/browser/window-state-main.ts +1 -1
  333. package/src/plugin/debug/debug-ext.ts +56 -6
  334. package/src/plugin/plugin-context.ts +78 -9
  335. package/src/plugin/plugin-icon-path.ts +5 -2
  336. package/src/plugin/plugin-manager.ts +17 -3
  337. package/src/plugin/quick-open.ts +9 -32
  338. package/src/plugin/terminal-ext.ts +27 -33
  339. package/src/plugin/tests.ts +39 -34
  340. package/src/plugin/tree/tree-views.ts +1 -1
  341. package/src/plugin/type-converters.ts +8 -8
  342. package/src/plugin/types-impl.ts +154 -1
package/package.json CHANGED
@@ -1,37 +1,37 @@
1
1
  {
2
2
  "name": "@theia/plugin-ext",
3
- "version": "1.50.1",
3
+ "version": "1.52.0",
4
4
  "description": "Theia - Plugin Extension",
5
5
  "main": "lib/common/index.js",
6
6
  "typings": "lib/common/index.d.ts",
7
7
  "dependencies": {
8
- "@theia/bulk-edit": "1.50.1",
9
- "@theia/callhierarchy": "1.50.1",
10
- "@theia/console": "1.50.1",
11
- "@theia/core": "1.50.1",
12
- "@theia/debug": "1.50.1",
13
- "@theia/editor": "1.50.1",
14
- "@theia/editor-preview": "1.50.1",
15
- "@theia/file-search": "1.50.1",
16
- "@theia/filesystem": "1.50.1",
17
- "@theia/markers": "1.50.1",
18
- "@theia/messages": "1.50.1",
19
- "@theia/monaco": "1.50.1",
8
+ "@theia/bulk-edit": "1.52.0",
9
+ "@theia/callhierarchy": "1.52.0",
10
+ "@theia/console": "1.52.0",
11
+ "@theia/core": "1.52.0",
12
+ "@theia/debug": "1.52.0",
13
+ "@theia/editor": "1.52.0",
14
+ "@theia/editor-preview": "1.52.0",
15
+ "@theia/file-search": "1.52.0",
16
+ "@theia/filesystem": "1.52.0",
17
+ "@theia/markers": "1.52.0",
18
+ "@theia/messages": "1.52.0",
19
+ "@theia/monaco": "1.52.0",
20
20
  "@theia/monaco-editor-core": "1.83.101",
21
- "@theia/navigator": "1.50.1",
22
- "@theia/notebook": "1.50.1",
23
- "@theia/output": "1.50.1",
24
- "@theia/plugin": "1.50.1",
25
- "@theia/preferences": "1.50.1",
26
- "@theia/scm": "1.50.1",
27
- "@theia/search-in-workspace": "1.50.1",
28
- "@theia/task": "1.50.1",
29
- "@theia/terminal": "1.50.1",
30
- "@theia/test": "1.50.1",
31
- "@theia/timeline": "1.50.1",
32
- "@theia/typehierarchy": "1.50.1",
33
- "@theia/variable-resolver": "1.50.1",
34
- "@theia/workspace": "1.50.1",
21
+ "@theia/navigator": "1.52.0",
22
+ "@theia/notebook": "1.52.0",
23
+ "@theia/output": "1.52.0",
24
+ "@theia/plugin": "1.52.0",
25
+ "@theia/preferences": "1.52.0",
26
+ "@theia/scm": "1.52.0",
27
+ "@theia/search-in-workspace": "1.52.0",
28
+ "@theia/task": "1.52.0",
29
+ "@theia/terminal": "1.52.0",
30
+ "@theia/test": "1.52.0",
31
+ "@theia/timeline": "1.52.0",
32
+ "@theia/typehierarchy": "1.52.0",
33
+ "@theia/variable-resolver": "1.52.0",
34
+ "@theia/workspace": "1.52.0",
35
35
  "@types/mime": "^2.0.1",
36
36
  "@vscode/debugprotocol": "^1.51.0",
37
37
  "@vscode/proxy-agent": "^0.13.2",
@@ -88,7 +88,7 @@
88
88
  "watch": "theiaext watch"
89
89
  },
90
90
  "devDependencies": {
91
- "@theia/ext-scripts": "1.50.1",
91
+ "@theia/ext-scripts": "1.52.0",
92
92
  "@types/decompress": "^4.2.2",
93
93
  "@types/escape-html": "^0.0.20",
94
94
  "@types/lodash.clonedeep": "^4.5.3",
@@ -97,5 +97,5 @@
97
97
  "nyc": {
98
98
  "extends": "../../configs/nyc.json"
99
99
  },
100
- "gitHead": "ffefc7ac2c0f6c63256042b7710551304200e5e1"
100
+ "gitHead": "40ceebcd4ee75f13ec16b9dc7314e9384493c1ac"
101
101
  }
@@ -895,3 +895,13 @@ export interface InlineCompletionsProvider<T extends InlineCompletions = InlineC
895
895
  freeInlineCompletions(completions: T): void;
896
896
  }
897
897
 
898
+ export interface DebugStackFrameDTO {
899
+ readonly sessionId: string,
900
+ readonly frameId: number,
901
+ readonly threadId: number
902
+ }
903
+
904
+ export interface DebugThreadDTO {
905
+ readonly sessionId: string,
906
+ readonly threadId: number
907
+ }
@@ -89,7 +89,9 @@ import {
89
89
  InlineCompletionContext,
90
90
  DocumentDropEdit,
91
91
  DataTransferDTO,
92
- DocumentDropEditProviderMetadata
92
+ DocumentDropEditProviderMetadata,
93
+ DebugStackFrameDTO,
94
+ DebugThreadDTO
93
95
  } from './plugin-api-rpc-model';
94
96
  import { ExtPluginApi } from './plugin-ext-api-contribution';
95
97
  import { KeysToAnyValues, KeysToKeysToAnyValue } from './types';
@@ -159,6 +161,18 @@ export enum UIKind {
159
161
  Web = 2
160
162
  }
161
163
 
164
+ export enum ExtensionKind {
165
+ /**
166
+ * Extension runs where the UI runs.
167
+ */
168
+ UI = 1,
169
+
170
+ /**
171
+ * Extension runs where the remote extension host runs.
172
+ */
173
+ Workspace = 2
174
+ }
175
+
162
176
  export interface EnvInit {
163
177
  queryParams: QueryParameters;
164
178
  language: string;
@@ -178,6 +192,7 @@ export interface PluginManager {
178
192
  getAllPlugins(): Plugin[];
179
193
  getPluginById(pluginId: string): Plugin | undefined;
180
194
  getPluginExport(pluginId: string): PluginAPI | undefined;
195
+ getPluginKind(): theia.ExtensionKind;
181
196
  isRunning(pluginId: string): boolean;
182
197
  isActive(pluginId: string): boolean;
183
198
  activatePlugin(pluginId: string): PromiseLike<void>;
@@ -233,6 +248,7 @@ export interface PluginManagerInitializeParams {
233
248
  globalState: KeysToKeysToAnyValue
234
249
  workspaceState: KeysToKeysToAnyValue
235
250
  env: EnvInit
251
+ pluginKind: ExtensionKind
236
252
  extApi?: ExtPluginApi[]
237
253
  webview: WebviewInitData
238
254
  jsonValidation: PluginJsonValidationContribution[]
@@ -325,7 +341,7 @@ export interface TerminalServiceMain {
325
341
  * Create new Terminal with Terminal options.
326
342
  * @param options - object with parameters to create new terminal.
327
343
  */
328
- $createTerminal(id: string, options: theia.TerminalOptions, parentId?: string, isPseudoTerminal?: boolean): Promise<string>;
344
+ $createTerminal(id: string, options: TerminalOptions, parentId?: string, isPseudoTerminal?: boolean): Promise<string>;
329
345
 
330
346
  /**
331
347
  * Send text to the terminal by id.
@@ -455,6 +471,10 @@ export interface TerminalServiceMain {
455
471
  $unregisterTerminalObserver(id: string): unknown;
456
472
  }
457
473
 
474
+ export interface TerminalOptions extends theia.TerminalOptions {
475
+ iconUrl?: string | { light: string; dark: string } | ThemeIcon;
476
+ }
477
+
458
478
  export interface AutoFocus {
459
479
  autoFocusFirstEntry?: boolean;
460
480
  // TODO
@@ -510,10 +530,10 @@ export interface QuickOpenExt {
510
530
  $onDidChangeSelection(sessionId: number, handles: number[]): void;
511
531
 
512
532
  /* eslint-disable max-len */
513
- showQuickPick(itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options: theia.QuickPickOptions & { canPickMany: true; },
533
+ showQuickPick(plugin: Plugin, itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options: theia.QuickPickOptions & { canPickMany: true; },
514
534
  token?: theia.CancellationToken): Promise<Array<theia.QuickPickItem> | undefined>;
515
- showQuickPick(itemsOrItemsPromise: string[] | Promise<string[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<string | undefined>;
516
- showQuickPick(itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<theia.QuickPickItem | undefined>;
535
+ showQuickPick(plugin: Plugin, itemsOrItemsPromise: string[] | Promise<string[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<string | undefined>;
536
+ showQuickPick(plugin: Plugin, itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<theia.QuickPickItem | undefined>;
517
537
 
518
538
  showInput(options?: theia.InputBoxOptions, token?: theia.CancellationToken): PromiseLike<string | undefined>;
519
539
  // showWorkspaceFolderPick(options?: theia.WorkspaceFolderPickOptions, token?: theia.CancellationToken): Promise<theia.WorkspaceFolder | undefined>
@@ -637,7 +657,7 @@ export interface TransferQuickPickItem {
637
657
  handle: number;
638
658
  kind: 'item' | 'separator',
639
659
  label: string;
640
- iconPath?: UriComponents | { light: UriComponents; dark: UriComponents } | ThemeIcon;
660
+ iconUrl?: string | { light: string; dark: string } | ThemeIcon;
641
661
  description?: string;
642
662
  detail?: string;
643
663
  picked?: boolean;
@@ -661,7 +681,7 @@ export interface TransferQuickPickOptions<T extends TransferQuickPickItem> {
661
681
 
662
682
  export interface TransferQuickInputButton {
663
683
  handle?: number;
664
- readonly iconPath: UriComponents | { light: UriComponents; dark: UriComponents } | ThemeIcon;
684
+ readonly iconUrl?: string | { light: string; dark: string } | ThemeIcon;
665
685
  readonly tooltip?: string | undefined;
666
686
  }
667
687
 
@@ -1388,7 +1408,6 @@ export interface DocumentsMain {
1388
1408
  $tryShowDocument(uri: UriComponents, options?: TextDocumentShowOptions): Promise<void>;
1389
1409
  $tryOpenDocument(uri: UriComponents): Promise<boolean>;
1390
1410
  $trySaveDocument(uri: UriComponents): Promise<boolean>;
1391
- $tryCloseDocument(uri: UriComponents): Promise<boolean>;
1392
1411
  }
1393
1412
 
1394
1413
  export interface EnvMain {
@@ -1501,12 +1520,10 @@ export interface WorkspaceEditEntryMetadataDto {
1501
1520
  needsConfirmation: boolean;
1502
1521
  label: string;
1503
1522
  description?: string;
1504
- iconPath?: {
1505
- id: string;
1506
- } | {
1523
+ iconPath?: ThemeIcon | {
1507
1524
  light: UriComponents;
1508
1525
  dark: UriComponents;
1509
- } | ThemeIcon;
1526
+ };
1510
1527
  }
1511
1528
 
1512
1529
  export interface WorkspaceFileEditDto {
@@ -1966,6 +1983,8 @@ export interface DebugExt {
1966
1983
  debugConfiguration: DebugConfiguration
1967
1984
  ): Promise<theia.DebugConfiguration | undefined | null>;
1968
1985
 
1986
+ $onDidChangeActiveFrame(frame: DebugStackFrameDTO | undefined): void;
1987
+ $onDidChangeActiveThread(thread: DebugThreadDTO | undefined): void;
1969
1988
  $createDebugSession(debugConfiguration: DebugConfiguration, workspaceFolder: string | undefined): Promise<string>;
1970
1989
  $terminateDebugSession(sessionId: string): Promise<void>;
1971
1990
  $getTerminalCreationOptions(debugType: string): Promise<TerminalOptionsExt | undefined>;
@@ -2252,7 +2271,7 @@ export interface TestingMain {
2252
2271
 
2253
2272
  // Test runs
2254
2273
 
2255
- $notifyTestRunCreated(controllerId: string, run: TestRunDTO): void;
2274
+ $notifyTestRunCreated(controllerId: string, run: TestRunDTO, preserveFocus: boolean): void;
2256
2275
  $notifyTestStateChanged(controllerId: string, runId: string, stateChanges: TestStateChangeDTO[], outputChanges: TestOutputDTO[]): void;
2257
2276
  $notifyTestRunEnded(controllerId: string, runId: string): void;
2258
2277
  }
@@ -135,7 +135,9 @@ export class RpcInvocationHandler {
135
135
  }
136
136
 
137
137
  protected onNotification(method: string, args: any[]): void {
138
- this.target[method](...args);
138
+ this.rpcDeferred.promise.then(() => {
139
+ this.target[method](...args);
140
+ });
139
141
  }
140
142
  }
141
143
 
@@ -107,6 +107,7 @@ export interface TestRunRequestDTO {
107
107
  name: string;
108
108
  includedTests: string[][]; // array of paths
109
109
  excludedTests: string[][]; // array of paths
110
+ preserveFocus: boolean;
110
111
  }
111
112
 
112
113
  export interface TestItemReference {
@@ -26,7 +26,7 @@ import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'
26
26
  import { PluginWorker } from './plugin-worker';
27
27
  import { getPluginId, DeployedPlugin, HostedPluginServer } from '../../common/plugin-protocol';
28
28
  import { HostedPluginWatcher } from './hosted-plugin-watcher';
29
- import { MAIN_RPC_CONTEXT, PluginManagerExt, UIKind } from '../../common/plugin-api-rpc';
29
+ import { ExtensionKind, MAIN_RPC_CONTEXT, PluginManagerExt, UIKind } from '../../common/plugin-api-rpc';
30
30
  import { setUpPluginApi } from '../../main/browser/main-context';
31
31
  import { RPCProtocol, RPCProtocolImpl } from '../../common/rpc-protocol';
32
32
  import {
@@ -71,6 +71,7 @@ import {
71
71
  AbstractHostedPluginSupport, PluginContributions, PluginHost,
72
72
  ALL_ACTIVATION_EVENT, isConnectionScopedBackendPlugin
73
73
  } from '../common/hosted-plugin';
74
+ import { isRemote } from '@theia/core/lib/browser/browser';
74
75
 
75
76
  export type DebugActivationEvent = 'onDebugResolve' | 'onDebugInitialConfigurations' | 'onDebugAdapterProtocolTracker' | 'onDebugDynamicConfigurations';
76
77
 
@@ -334,6 +335,7 @@ export class HostedPluginSupport extends AbstractHostedPluginSupport<PluginManag
334
335
  webviewCspSource
335
336
  },
336
337
  jsonValidation,
338
+ pluginKind: isRemote ? ExtensionKind.Workspace : ExtensionKind.UI,
337
339
  supportedActivationEvents
338
340
  });
339
341
  if (toDisconnect.disposed) {
@@ -28,11 +28,9 @@ export class WorkerEnvExtImpl extends EnvExtImpl {
28
28
  super();
29
29
  }
30
30
 
31
- /**
32
- * Throw error for app-root as there is no filesystem in worker context
33
- */
34
31
  override get appRoot(): string {
35
- throw new Error('There is no app root in worker context');
32
+ // The documentation indicates that this should be an empty string
33
+ return '';
36
34
  }
37
35
 
38
36
  get isNewAppInstall(): boolean {
@@ -45,7 +45,7 @@ const pluginsModulesNames = new Map<string, Plugin>();
45
45
  const scripts = new Set<string>();
46
46
 
47
47
  function initialize(contextPath: string, pluginMetadata: PluginMetadata): void {
48
- const path = '/context/' + contextPath;
48
+ const path = './context/' + contextPath;
49
49
 
50
50
  if (!scripts.has(path)) {
51
51
  ctx.importScripts(path);
@@ -70,7 +70,7 @@ pluginManager.setPluginHost({
70
70
  ctx.frontendModuleName = plugin.lifecycle.frontendModuleName;
71
71
  }
72
72
 
73
- ctx.importScripts('/hostedPlugin/' + getPluginId(plugin.model) + '/' + plugin.pluginPath);
73
+ ctx.importScripts('./hostedPlugin/' + getPluginId(plugin.model) + '/' + plugin.pluginPath);
74
74
  }
75
75
  }
76
76
 
@@ -196,6 +196,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
196
196
  for (const c of configurations) {
197
197
  const config = this.readConfiguration(c, rawPlugin.packagePath);
198
198
  if (config) {
199
+ Object.values(config.properties).forEach(property => property.title = config.title);
199
200
  contributions.configuration.push(config);
200
201
  }
201
202
  }
@@ -25,7 +25,7 @@ import {
25
25
  MAIN_RPC_CONTEXT
26
26
  } from '../../../common/plugin-api-rpc';
27
27
  import { DebugSessionManager } from '@theia/debug/lib/browser/debug-session-manager';
28
- import { Breakpoint, WorkspaceFolder } from '../../../common/plugin-api-rpc-model';
28
+ import { Breakpoint, DebugStackFrameDTO, DebugThreadDTO, WorkspaceFolder } from '../../../common/plugin-api-rpc-model';
29
29
  import { LabelProvider } from '@theia/core/lib/browser';
30
30
  import { EditorManager } from '@theia/editor/lib/browser';
31
31
  import { BreakpointManager, BreakpointsChangeEvent } from '@theia/debug/lib/browser/breakpoint/breakpoint-manager';
@@ -56,6 +56,9 @@ import { DebugContribution } from '@theia/debug/lib/browser/debug-contribution';
56
56
  import { ConnectionImpl } from '../../../common/connection';
57
57
  import { WorkspaceService } from '@theia/workspace/lib/browser';
58
58
  import { DebugSessionOptions as TheiaDebugSessionOptions } from '@theia/debug/lib/browser/debug-session-options';
59
+ import { DebugStackFrame } from '@theia/debug/lib/browser/model/debug-stack-frame';
60
+ import { DebugThread } from '@theia/debug/lib/browser/model/debug-thread';
61
+ import { TestService } from '@theia/test/lib/browser/test-service';
59
62
 
60
63
  export class DebugMainImpl implements DebugMain, Disposable {
61
64
  private readonly debugExt: DebugExt;
@@ -75,6 +78,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
75
78
  private readonly fileService: FileService;
76
79
  private readonly pluginService: HostedPluginSupport;
77
80
  private readonly debugContributionProvider: ContributionProvider<DebugContribution>;
81
+ private readonly testService: TestService;
78
82
  private readonly workspaceService: WorkspaceService;
79
83
 
80
84
  private readonly debuggerContributions = new Map<string, DisposableCollection>();
@@ -98,6 +102,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
98
102
  this.debugContributionProvider = container.getNamed(ContributionProvider, DebugContribution);
99
103
  this.fileService = container.get(FileService);
100
104
  this.pluginService = container.get(HostedPluginSupport);
105
+ this.testService = container.get(TestService);
101
106
  this.workspaceService = container.get(WorkspaceService);
102
107
 
103
108
  const fireDidChangeBreakpoints = ({ added, removed, changed }: BreakpointsChangeEvent<SourceBreakpoint | FunctionBreakpoint>) => {
@@ -117,7 +122,9 @@ export class DebugMainImpl implements DebugMain, Disposable {
117
122
  this.sessionManager.onDidStartDebugSession(debugSession => this.debugExt.$sessionDidStart(debugSession.id)),
118
123
  this.sessionManager.onDidDestroyDebugSession(debugSession => this.debugExt.$sessionDidDestroy(debugSession.id)),
119
124
  this.sessionManager.onDidChangeActiveDebugSession(event => this.debugExt.$sessionDidChange(event.current && event.current.id)),
120
- this.sessionManager.onDidReceiveDebugSessionCustomEvent(event => this.debugExt.$onSessionCustomEvent(event.session.id, event.event, event.body))
125
+ this.sessionManager.onDidReceiveDebugSessionCustomEvent(event => this.debugExt.$onSessionCustomEvent(event.session.id, event.event, event.body)),
126
+ this.sessionManager.onDidFocusStackFrame(stackFrame => this.debugExt.$onDidChangeActiveFrame(this.toDebugStackFrameDTO(stackFrame))),
127
+ this.sessionManager.onDidFocusThread(debugThread => this.debugExt.$onDidChangeActiveThread(this.toDebugThreadDTO(debugThread))),
121
128
  ]);
122
129
  }
123
130
 
@@ -161,6 +168,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
161
168
  this.fileService,
162
169
  terminalOptionsExt,
163
170
  this.debugContributionProvider,
171
+ this.testService,
164
172
  this.workspaceService,
165
173
  );
166
174
 
@@ -323,6 +331,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
323
331
  } else {
324
332
  sessionOptions = { ...sessionOptions, ...options, workspaceFolderUri };
325
333
  }
334
+ sessionOptions.testRun = options.testRun;
326
335
 
327
336
  // start options
328
337
  const session = await this.sessionManager.start(sessionOptions);
@@ -340,6 +349,21 @@ export class DebugMainImpl implements DebugMain, Disposable {
340
349
  }
341
350
  }
342
351
 
352
+ private toDebugStackFrameDTO(stackFrame: DebugStackFrame | undefined): DebugStackFrameDTO | undefined {
353
+ return stackFrame ? {
354
+ sessionId: stackFrame.session.id,
355
+ frameId: stackFrame.frameId,
356
+ threadId: stackFrame.thread.threadId
357
+ } : undefined;
358
+ }
359
+
360
+ private toDebugThreadDTO(debugThread: DebugThread | undefined): DebugThreadDTO | undefined {
361
+ return debugThread ? {
362
+ sessionId: debugThread.session.id,
363
+ threadId: debugThread.threadId
364
+ } : undefined;
365
+ }
366
+
343
367
  private toTheiaPluginApiBreakpoints(breakpoints: (SourceBreakpoint | FunctionBreakpoint)[]): Breakpoint[] {
344
368
  return breakpoints.map(b => this.toTheiaPluginApiBreakpoint(b));
345
369
  }
@@ -22,7 +22,7 @@ import { LabelProvider } from '@theia/core/lib/browser/label-provider';
22
22
  import { MessageClient } from '@theia/core/lib/common/message-service-protocol';
23
23
  import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
24
24
  import { DebugPreferences } from '@theia/debug/lib/browser/debug-preferences';
25
- import { DebugConfigurationSessionOptions } from '@theia/debug/lib/browser/debug-session-options';
25
+ import { DebugConfigurationSessionOptions, TestRunReference } from '@theia/debug/lib/browser/debug-session-options';
26
26
  import { DebugSession } from '@theia/debug/lib/browser/debug-session';
27
27
  import { DebugSessionConnection } from '@theia/debug/lib/browser/debug-session-connection';
28
28
  import { TerminalWidgetOptions, TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget';
@@ -32,12 +32,17 @@ import { DebugContribution } from '@theia/debug/lib/browser/debug-contribution';
32
32
  import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
33
33
  import { WorkspaceService } from '@theia/workspace/lib/browser';
34
34
  import { PluginChannel } from '../../../common/connection';
35
+ import { TestService } from '@theia/test/lib/browser/test-service';
36
+ import { DebugSessionManager } from '@theia/debug/lib/browser/debug-session-manager';
35
37
 
36
38
  export class PluginDebugSession extends DebugSession {
37
39
  constructor(
38
40
  override readonly id: string,
39
41
  override readonly options: DebugConfigurationSessionOptions,
40
42
  override readonly parentSession: DebugSession | undefined,
43
+ testService: TestService,
44
+ testRun: TestRunReference | undefined,
45
+ sessionManager: DebugSessionManager,
41
46
  protected override readonly connection: DebugSessionConnection,
42
47
  protected override readonly terminalServer: TerminalService,
43
48
  protected override readonly editorManager: EditorManager,
@@ -48,7 +53,8 @@ export class PluginDebugSession extends DebugSession {
48
53
  protected readonly terminalOptionsExt: TerminalOptionsExt | undefined,
49
54
  protected override readonly debugContributionProvider: ContributionProvider<DebugContribution>,
50
55
  protected override readonly workspaceService: WorkspaceService) {
51
- super(id, options, parentSession, connection, terminalServer, editorManager, breakpoints, labelProvider, messages, fileService, debugContributionProvider,
56
+ super(id, options, parentSession, testService, testRun, sessionManager, connection, terminalServer, editorManager, breakpoints,
57
+ labelProvider, messages, fileService, debugContributionProvider,
52
58
  workspaceService);
53
59
  }
54
60
 
@@ -75,12 +81,13 @@ export class PluginDebugSessionFactory extends DefaultDebugSessionFactory {
75
81
  protected override readonly fileService: FileService,
76
82
  protected readonly terminalOptionsExt: TerminalOptionsExt | undefined,
77
83
  protected override readonly debugContributionProvider: ContributionProvider<DebugContribution>,
84
+ protected override readonly testService: TestService,
78
85
  protected override readonly workspaceService: WorkspaceService,
79
86
  ) {
80
87
  super();
81
88
  }
82
89
 
83
- override get(sessionId: string, options: DebugConfigurationSessionOptions, parentSession?: DebugSession): DebugSession {
90
+ override get(manager: DebugSessionManager, sessionId: string, options: DebugConfigurationSessionOptions, parentSession?: DebugSession): DebugSession {
84
91
  const connection = new DebugSessionConnection(
85
92
  sessionId,
86
93
  this.connectionFactory,
@@ -90,6 +97,9 @@ export class PluginDebugSessionFactory extends DefaultDebugSessionFactory {
90
97
  sessionId,
91
98
  options,
92
99
  parentSession,
100
+ this.testService,
101
+ options.testRun,
102
+ manager,
93
103
  connection,
94
104
  this.terminalService,
95
105
  this.editorManager,
@@ -20,10 +20,10 @@ import { DisposableCollection, Disposable, UntitledResourceResolver } from '@the
20
20
  import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model';
21
21
  import { RPCProtocol } from '../../common/rpc-protocol';
22
22
  import { EditorModelService } from './text-editor-model-service';
23
- import { EditorManager, EditorOpenerOptions } from '@theia/editor/lib/browser';
23
+ import { EditorOpenerOptions } from '@theia/editor/lib/browser';
24
24
  import URI from '@theia/core/lib/common/uri';
25
25
  import { URI as CodeURI } from '@theia/core/shared/vscode-uri';
26
- import { ApplicationShell, Saveable } from '@theia/core/lib/browser';
26
+ import { ApplicationShell } from '@theia/core/lib/browser';
27
27
  import { TextDocumentShowOptions } from '../../common/plugin-api-rpc-model';
28
28
  import { Range } from '@theia/core/shared/vscode-languageserver-protocol';
29
29
  import { OpenerService } from '@theia/core/lib/browser/opener-service';
@@ -94,7 +94,6 @@ export class DocumentsMainImpl implements DocumentsMain, Disposable {
94
94
  notebookDocuments: NotebookDocumentsMainImpl,
95
95
  private readonly modelService: EditorModelService,
96
96
  rpc: RPCProtocol,
97
- private editorManager: EditorManager,
98
97
  private openerService: OpenerService,
99
98
  private shell: ApplicationShell,
100
99
  private untitledResourceResolver: UntitledResourceResolver,
@@ -206,13 +205,7 @@ export class DocumentsMainImpl implements DocumentsMain, Disposable {
206
205
  }
207
206
 
208
207
  async $trySaveDocument(uri: UriComponents): Promise<boolean> {
209
- const widget = await this.editorManager.getByUri(new URI(CodeURI.revive(uri)));
210
- if (widget) {
211
- await Saveable.save(widget);
212
- return true;
213
- }
214
-
215
- return false;
208
+ return this.modelService.save(new URI(CodeURI.revive(uri)));
216
209
  }
217
210
 
218
211
  async $tryOpenDocument(uri: UriComponents): Promise<boolean> {
@@ -226,17 +219,6 @@ export class DocumentsMainImpl implements DocumentsMain, Disposable {
226
219
  }
227
220
  }
228
221
 
229
- async $tryCloseDocument(uri: UriComponents): Promise<boolean> {
230
- const widget = await this.editorManager.getByUri(new URI(CodeURI.revive(uri)));
231
- if (widget) {
232
- await Saveable.save(widget);
233
- widget.close();
234
- return true;
235
- }
236
-
237
- return false;
238
- }
239
-
240
222
  static toEditorOpenerOptions(shell: ApplicationShell, options?: TextDocumentShowOptions): EditorOpenerOptions | undefined {
241
223
  if (!options) {
242
224
  return undefined;
@@ -33,6 +33,7 @@ import { TextEditorMain } from './text-editor-main';
33
33
  import { DisposableCollection, Emitter, URI } from '@theia/core';
34
34
  import { EditorManager, EditorWidget } from '@theia/editor/lib/browser';
35
35
  import { SaveableService } from '@theia/core/lib/browser/saveable-service';
36
+ import { TabsMainImpl } from './tabs/tabs-main';
36
37
 
37
38
  export class EditorsAndDocumentsMain implements Disposable {
38
39
 
@@ -59,14 +60,14 @@ export class EditorsAndDocumentsMain implements Disposable {
59
60
  Disposable.create(() => this.textEditors.clear())
60
61
  );
61
62
 
62
- constructor(rpc: RPCProtocol, container: interfaces.Container) {
63
+ constructor(rpc: RPCProtocol, container: interfaces.Container, tabsMain: TabsMainImpl) {
63
64
  this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.EDITORS_AND_DOCUMENTS_EXT);
64
65
 
65
66
  this.editorManager = container.get(EditorManager);
66
67
  this.modelService = container.get(EditorModelService);
67
68
  this.saveResourceService = container.get(SaveableService);
68
69
 
69
- this.stateComputer = new EditorAndDocumentStateComputer(d => this.onDelta(d), this.editorManager, this.modelService);
70
+ this.stateComputer = new EditorAndDocumentStateComputer(d => this.onDelta(d), this.editorManager, this.modelService, tabsMain);
70
71
  this.toDispose.push(this.stateComputer);
71
72
  this.toDispose.push(this.onTextEditorAddEmitter);
72
73
  this.toDispose.push(this.onTextEditorRemoveEmitter);
@@ -217,18 +218,25 @@ class EditorAndDocumentStateComputer implements Disposable {
217
218
  constructor(
218
219
  private callback: (delta: EditorAndDocumentStateDelta) => void,
219
220
  private readonly editorService: EditorManager,
220
- private readonly modelService: EditorModelService
221
+ private readonly modelService: EditorModelService,
222
+ private readonly tabsMain: TabsMainImpl
221
223
  ) { }
222
224
 
223
225
  listen(): void {
224
226
  if (this.toDispose.disposed) {
225
227
  return;
226
228
  }
227
- this.toDispose.push(this.editorService.onCreated(widget => {
229
+ this.toDispose.push(this.editorService.onCreated(async widget => {
230
+ await this.tabsMain.waitForWidget(widget);
228
231
  this.onTextEditorAdd(widget);
229
232
  this.update();
230
233
  }));
231
- this.toDispose.push(this.editorService.onCurrentEditorChanged(() => this.update()));
234
+ this.toDispose.push(this.editorService.onCurrentEditorChanged(async widget => {
235
+ if (widget) {
236
+ await this.tabsMain.waitForWidget(widget);
237
+ }
238
+ this.update();
239
+ }));
232
240
  this.toDispose.push(this.modelService.onModelAdded(this.onModelAdded, this));
233
241
  this.toDispose.push(this.modelService.onModelRemoved(() => this.update()));
234
242
 
@@ -40,7 +40,6 @@ import { DecorationsMainImpl } from './decorations/decorations-main';
40
40
  import { ClipboardMainImpl } from './clipboard-main';
41
41
  import { DocumentsMainImpl } from './documents-main';
42
42
  import { TextEditorsMainImpl } from './text-editors-main';
43
- import { EditorManager } from '@theia/editor/lib/browser';
44
43
  import { EditorModelService } from './text-editor-model-service';
45
44
  import { OpenerService } from '@theia/core/lib/browser/opener-service';
46
45
  import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell';
@@ -88,19 +87,21 @@ export function setUpPluginApi(rpc: RPCProtocol, container: interfaces.Container
88
87
  const preferenceRegistryMain = new PreferenceRegistryMainImpl(rpc, container);
89
88
  rpc.set(PLUGIN_RPC_CONTEXT.PREFERENCE_REGISTRY_MAIN, preferenceRegistryMain);
90
89
 
91
- const editorsAndDocuments = new EditorsAndDocumentsMain(rpc, container);
90
+ const tabsMain = new TabsMainImpl(rpc, container);
91
+ rpc.set(PLUGIN_RPC_CONTEXT.TABS_MAIN, tabsMain);
92
+
93
+ const editorsAndDocuments = new EditorsAndDocumentsMain(rpc, container, tabsMain);
92
94
 
93
95
  const notebookDocumentsMain = new NotebookDocumentsMainImpl(rpc, container);
94
96
  rpc.set(PLUGIN_RPC_CONTEXT.NOTEBOOK_DOCUMENTS_MAIN, notebookDocumentsMain);
95
97
 
96
98
  const modelService = container.get(EditorModelService);
97
- const editorManager = container.get(EditorManager);
98
99
  const openerService = container.get<OpenerService>(OpenerService);
99
100
  const shell = container.get(ApplicationShell);
100
101
  const untitledResourceResolver = container.get(UntitledResourceResolver);
101
102
  const languageService = container.get(MonacoLanguages);
102
103
  const documentsMain = new DocumentsMainImpl(editorsAndDocuments, notebookDocumentsMain, modelService, rpc,
103
- editorManager, openerService, shell, untitledResourceResolver, languageService);
104
+ openerService, shell, untitledResourceResolver, languageService);
104
105
  rpc.set(PLUGIN_RPC_CONTEXT.DOCUMENTS_MAIN, documentsMain);
105
106
 
106
107
  rpc.set(PLUGIN_RPC_CONTEXT.NOTEBOOKS_MAIN, new NotebooksMainImpl(rpc, container, commandRegistryMain));
@@ -200,9 +201,6 @@ export function setUpPluginApi(rpc: RPCProtocol, container: interfaces.Container
200
201
  const commentsMain = new CommentsMainImp(rpc, container);
201
202
  rpc.set(PLUGIN_RPC_CONTEXT.COMMENTS_MAIN, commentsMain);
202
203
 
203
- const tabsMain = new TabsMainImpl(rpc, container);
204
- rpc.set(PLUGIN_RPC_CONTEXT.TABS_MAIN, tabsMain);
205
-
206
204
  const localizationMain = new LocalizationMainImpl(container);
207
205
  rpc.set(PLUGIN_RPC_CONTEXT.LOCALIZATION_MAIN, localizationMain);
208
206
  }