@theia/plugin-ext 1.53.2 → 1.55.0-next.14

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 (310) hide show
  1. package/lib/common/plugin-api-rpc-model.d.ts +10 -1
  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 +7 -6
  5. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  6. package/lib/common/plugin-api-rpc.js.map +1 -1
  7. package/lib/common/test-types.d.ts +11 -1
  8. package/lib/common/test-types.d.ts.map +1 -1
  9. package/lib/common/test-types.js +9 -1
  10. package/lib/common/test-types.js.map +1 -1
  11. package/lib/main/browser/authentication-main.d.ts +6 -6
  12. package/lib/main/browser/authentication-main.d.ts.map +1 -1
  13. package/lib/main/browser/authentication-main.js +15 -9
  14. package/lib/main/browser/authentication-main.js.map +1 -1
  15. package/lib/main/browser/command-registry-main.d.ts +0 -1
  16. package/lib/main/browser/command-registry-main.d.ts.map +1 -1
  17. package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +5 -3
  18. package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
  19. package/lib/main/browser/custom-editors/custom-editor-opener.js +16 -3
  20. package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
  21. package/lib/main/browser/custom-editors/custom-editors-main.d.ts +0 -1
  22. package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
  23. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts +2 -1
  24. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts.map +1 -1
  25. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js +6 -2
  26. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js.map +1 -1
  27. package/lib/main/browser/debug/plugin-debug-service.d.ts +0 -1
  28. package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
  29. package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
  30. package/lib/main/browser/editors-and-documents-main.js +17 -2
  31. package/lib/main/browser/editors-and-documents-main.js.map +1 -1
  32. package/lib/main/browser/languages-main.d.ts +0 -1
  33. package/lib/main/browser/languages-main.d.ts.map +1 -1
  34. package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts.map +1 -1
  35. package/lib/main/browser/menus/plugin-menu-command-adapter.js +2 -2
  36. package/lib/main/browser/menus/plugin-menu-command-adapter.js.map +1 -1
  37. package/lib/main/browser/notebooks/notebook-documents-and-editors-main.d.ts.map +1 -1
  38. package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js +10 -7
  39. package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js.map +1 -1
  40. package/lib/main/browser/notebooks/notebooks-main.d.ts +0 -1
  41. package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -1
  42. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +22 -12
  43. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -1
  44. package/lib/main/browser/notebooks/renderers/cell-output-webview.js +145 -74
  45. package/lib/main/browser/notebooks/renderers/cell-output-webview.js.map +1 -1
  46. package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -1
  47. package/lib/main/browser/notebooks/renderers/output-webview-internal.js +198 -69
  48. package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
  49. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts +56 -6
  50. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts.map +1 -1
  51. package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
  52. package/lib/main/browser/plugin-ext-frontend-module.js +2 -1
  53. package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
  54. package/lib/main/browser/quick-open-main.d.ts +0 -1
  55. package/lib/main/browser/quick-open-main.d.ts.map +1 -1
  56. package/lib/main/browser/tabs/tabs-main.d.ts +1 -1
  57. package/lib/main/browser/tabs/tabs-main.d.ts.map +1 -1
  58. package/lib/main/browser/tabs/tabs-main.js +1 -1
  59. package/lib/main/browser/tabs/tabs-main.js.map +1 -1
  60. package/lib/main/browser/terminal-main.d.ts +0 -1
  61. package/lib/main/browser/terminal-main.d.ts.map +1 -1
  62. package/lib/main/browser/test-main.d.ts.map +1 -1
  63. package/lib/main/browser/test-main.js.map +1 -1
  64. package/lib/main/browser/text-editor-main.d.ts +6 -3
  65. package/lib/main/browser/text-editor-main.d.ts.map +1 -1
  66. package/lib/main/browser/text-editor-main.js +39 -5
  67. package/lib/main/browser/text-editor-main.js.map +1 -1
  68. package/lib/main/browser/view/tree-view-decorator-service.d.ts +0 -1
  69. package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -1
  70. package/lib/main/browser/view/tree-view-widget.d.ts +0 -1
  71. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  72. package/lib/main/browser/view/tree-views-main.d.ts +0 -1
  73. package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
  74. package/lib/main/browser/webview/webview.d.ts +0 -1
  75. package/lib/main/browser/webview/webview.d.ts.map +1 -1
  76. package/lib/main/browser/webview-views/webview-views-main.d.ts +0 -1
  77. package/lib/main/browser/webview-views/webview-views-main.d.ts.map +1 -1
  78. package/lib/main/browser/webviews-main.d.ts +0 -1
  79. package/lib/main/browser/webviews-main.d.ts.map +1 -1
  80. package/lib/main/browser/workspace-main.d.ts +0 -1
  81. package/lib/main/browser/workspace-main.d.ts.map +1 -1
  82. package/lib/plugin/authentication-ext.d.ts +3 -3
  83. package/lib/plugin/authentication-ext.d.ts.map +1 -1
  84. package/lib/plugin/authentication-ext.js +8 -5
  85. package/lib/plugin/authentication-ext.js.map +1 -1
  86. package/lib/plugin/clipboard-ext.d.ts +0 -1
  87. package/lib/plugin/clipboard-ext.d.ts.map +1 -1
  88. package/lib/plugin/command-registry.d.ts +0 -1
  89. package/lib/plugin/command-registry.d.ts.map +1 -1
  90. package/lib/plugin/comments.d.ts +0 -1
  91. package/lib/plugin/comments.d.ts.map +1 -1
  92. package/lib/plugin/custom-editors.d.ts +0 -1
  93. package/lib/plugin/custom-editors.d.ts.map +1 -1
  94. package/lib/plugin/debug/debug-ext.d.ts +0 -1
  95. package/lib/plugin/debug/debug-ext.d.ts.map +1 -1
  96. package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts +0 -1
  97. package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts.map +1 -1
  98. package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +0 -1
  99. package/lib/plugin/debug/plugin-debug-adapter-session.d.ts.map +1 -1
  100. package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts +0 -1
  101. package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts.map +1 -1
  102. package/lib/plugin/decorations.d.ts +0 -1
  103. package/lib/plugin/decorations.d.ts.map +1 -1
  104. package/lib/plugin/dialogs.d.ts +0 -1
  105. package/lib/plugin/dialogs.d.ts.map +1 -1
  106. package/lib/plugin/document-data.d.ts +0 -1
  107. package/lib/plugin/document-data.d.ts.map +1 -1
  108. package/lib/plugin/documents.d.ts +0 -1
  109. package/lib/plugin/documents.d.ts.map +1 -1
  110. package/lib/plugin/env.d.ts +0 -1
  111. package/lib/plugin/env.d.ts.map +1 -1
  112. package/lib/plugin/file-system-event-service-ext-impl.d.ts +0 -1
  113. package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
  114. package/lib/plugin/file-system-ext-impl.d.ts +27 -4
  115. package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
  116. package/lib/plugin/file-system-ext-impl.js +4 -2
  117. package/lib/plugin/file-system-ext-impl.js.map +1 -1
  118. package/lib/plugin/label-service.d.ts +0 -1
  119. package/lib/plugin/label-service.d.ts.map +1 -1
  120. package/lib/plugin/languages/call-hierarchy.d.ts +0 -1
  121. package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
  122. package/lib/plugin/languages/code-action.d.ts +0 -1
  123. package/lib/plugin/languages/code-action.d.ts.map +1 -1
  124. package/lib/plugin/languages/color.d.ts +0 -1
  125. package/lib/plugin/languages/color.d.ts.map +1 -1
  126. package/lib/plugin/languages/completion.d.ts +0 -1
  127. package/lib/plugin/languages/completion.d.ts.map +1 -1
  128. package/lib/plugin/languages/declaration.d.ts +0 -1
  129. package/lib/plugin/languages/declaration.d.ts.map +1 -1
  130. package/lib/plugin/languages/definition.d.ts +0 -1
  131. package/lib/plugin/languages/definition.d.ts.map +1 -1
  132. package/lib/plugin/languages/diagnostics.d.ts +0 -1
  133. package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
  134. package/lib/plugin/languages/document-drop-edit.d.ts +0 -1
  135. package/lib/plugin/languages/document-drop-edit.d.ts.map +1 -1
  136. package/lib/plugin/languages/document-formatting.d.ts +0 -1
  137. package/lib/plugin/languages/document-formatting.d.ts.map +1 -1
  138. package/lib/plugin/languages/document-highlight.d.ts +0 -1
  139. package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
  140. package/lib/plugin/languages/evaluatable-expression.d.ts +0 -1
  141. package/lib/plugin/languages/evaluatable-expression.d.ts.map +1 -1
  142. package/lib/plugin/languages/folding.d.ts +0 -1
  143. package/lib/plugin/languages/folding.d.ts.map +1 -1
  144. package/lib/plugin/languages/hover.d.ts +0 -1
  145. package/lib/plugin/languages/hover.d.ts.map +1 -1
  146. package/lib/plugin/languages/implementation.d.ts +0 -1
  147. package/lib/plugin/languages/implementation.d.ts.map +1 -1
  148. package/lib/plugin/languages/inlay-hints.d.ts +0 -1
  149. package/lib/plugin/languages/inlay-hints.d.ts.map +1 -1
  150. package/lib/plugin/languages/inline-completion.d.ts +0 -1
  151. package/lib/plugin/languages/inline-completion.d.ts.map +1 -1
  152. package/lib/plugin/languages/inline-values.d.ts +0 -1
  153. package/lib/plugin/languages/inline-values.d.ts.map +1 -1
  154. package/lib/plugin/languages/lens.d.ts +0 -1
  155. package/lib/plugin/languages/lens.d.ts.map +1 -1
  156. package/lib/plugin/languages/link-provider.d.ts +0 -1
  157. package/lib/plugin/languages/link-provider.d.ts.map +1 -1
  158. package/lib/plugin/languages/linked-editing-range.d.ts +0 -1
  159. package/lib/plugin/languages/linked-editing-range.d.ts.map +1 -1
  160. package/lib/plugin/languages/on-type-formatting.d.ts +0 -1
  161. package/lib/plugin/languages/on-type-formatting.d.ts.map +1 -1
  162. package/lib/plugin/languages/outline.d.ts +0 -1
  163. package/lib/plugin/languages/outline.d.ts.map +1 -1
  164. package/lib/plugin/languages/range-formatting.d.ts +0 -1
  165. package/lib/plugin/languages/range-formatting.d.ts.map +1 -1
  166. package/lib/plugin/languages/reference.d.ts +0 -1
  167. package/lib/plugin/languages/reference.d.ts.map +1 -1
  168. package/lib/plugin/languages/rename.d.ts +0 -1
  169. package/lib/plugin/languages/rename.d.ts.map +1 -1
  170. package/lib/plugin/languages/selection-range.d.ts +0 -1
  171. package/lib/plugin/languages/selection-range.d.ts.map +1 -1
  172. package/lib/plugin/languages/semantic-highlighting.d.ts +0 -1
  173. package/lib/plugin/languages/semantic-highlighting.d.ts.map +1 -1
  174. package/lib/plugin/languages/signature.d.ts +0 -1
  175. package/lib/plugin/languages/signature.d.ts.map +1 -1
  176. package/lib/plugin/languages/type-definition.d.ts +0 -1
  177. package/lib/plugin/languages/type-definition.d.ts.map +1 -1
  178. package/lib/plugin/languages/type-hierarchy.d.ts +0 -1
  179. package/lib/plugin/languages/type-hierarchy.d.ts.map +1 -1
  180. package/lib/plugin/languages/util.d.ts +0 -1
  181. package/lib/plugin/languages/util.d.ts.map +1 -1
  182. package/lib/plugin/languages/workspace-symbol.d.ts +0 -1
  183. package/lib/plugin/languages/workspace-symbol.d.ts.map +1 -1
  184. package/lib/plugin/languages-utils.d.ts +0 -1
  185. package/lib/plugin/languages-utils.d.ts.map +1 -1
  186. package/lib/plugin/languages.d.ts +0 -1
  187. package/lib/plugin/languages.d.ts.map +1 -1
  188. package/lib/plugin/markdown-string.d.ts +0 -1
  189. package/lib/plugin/markdown-string.d.ts.map +1 -1
  190. package/lib/plugin/message-registry.d.ts +0 -1
  191. package/lib/plugin/message-registry.d.ts.map +1 -1
  192. package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts +0 -1
  193. package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts.map +1 -1
  194. package/lib/plugin/notebook/notebook-document.d.ts +0 -1
  195. package/lib/plugin/notebook/notebook-document.d.ts.map +1 -1
  196. package/lib/plugin/notebook/notebook-documents.d.ts +0 -1
  197. package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -1
  198. package/lib/plugin/notebook/notebook-editor.d.ts +0 -1
  199. package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -1
  200. package/lib/plugin/notebook/notebook-editors.d.ts +0 -1
  201. package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -1
  202. package/lib/plugin/notebook/notebook-kernels.d.ts +0 -1
  203. package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
  204. package/lib/plugin/notebook/notebook-renderers.d.ts +0 -1
  205. package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
  206. package/lib/plugin/notebook/notebooks.d.ts +1 -1
  207. package/lib/plugin/notebook/notebooks.d.ts.map +1 -1
  208. package/lib/plugin/notebook/notebooks.js +23 -3
  209. package/lib/plugin/notebook/notebooks.js.map +1 -1
  210. package/lib/plugin/notification.d.ts +0 -1
  211. package/lib/plugin/notification.d.ts.map +1 -1
  212. package/lib/plugin/output-channel/log-output-channel.d.ts +0 -1
  213. package/lib/plugin/output-channel/log-output-channel.d.ts.map +1 -1
  214. package/lib/plugin/output-channel/output-channel-item.d.ts +0 -1
  215. package/lib/plugin/output-channel/output-channel-item.d.ts.map +1 -1
  216. package/lib/plugin/output-channel-registry.d.ts +0 -1
  217. package/lib/plugin/output-channel-registry.d.ts.map +1 -1
  218. package/lib/plugin/plugin-context.d.ts +1 -1
  219. package/lib/plugin/plugin-context.d.ts.map +1 -1
  220. package/lib/plugin/plugin-context.js +37 -15
  221. package/lib/plugin/plugin-context.js.map +1 -1
  222. package/lib/plugin/plugin-manager.d.ts +0 -1
  223. package/lib/plugin/plugin-manager.d.ts.map +1 -1
  224. package/lib/plugin/plugin-storage.d.ts +0 -1
  225. package/lib/plugin/plugin-storage.d.ts.map +1 -1
  226. package/lib/plugin/preference-registry.d.ts +0 -1
  227. package/lib/plugin/preference-registry.d.ts.map +1 -1
  228. package/lib/plugin/quick-open.d.ts +0 -1
  229. package/lib/plugin/quick-open.d.ts.map +1 -1
  230. package/lib/plugin/scm.d.ts +1 -1
  231. package/lib/plugin/scm.d.ts.map +1 -1
  232. package/lib/plugin/scm.js +3 -3
  233. package/lib/plugin/scm.js.map +1 -1
  234. package/lib/plugin/secrets-ext.d.ts +0 -1
  235. package/lib/plugin/secrets-ext.d.ts.map +1 -1
  236. package/lib/plugin/status-bar/status-bar-item.d.ts +0 -1
  237. package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
  238. package/lib/plugin/status-bar-message-registry.d.ts +0 -1
  239. package/lib/plugin/status-bar-message-registry.d.ts.map +1 -1
  240. package/lib/plugin/tabs.d.ts +0 -1
  241. package/lib/plugin/tabs.d.ts.map +1 -1
  242. package/lib/plugin/tasks/task-provider.d.ts +0 -1
  243. package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
  244. package/lib/plugin/tasks/tasks.d.ts +0 -1
  245. package/lib/plugin/tasks/tasks.d.ts.map +1 -1
  246. package/lib/plugin/terminal-ext.d.ts +1 -1
  247. package/lib/plugin/terminal-ext.d.ts.map +1 -1
  248. package/lib/plugin/terminal-ext.js +1 -0
  249. package/lib/plugin/terminal-ext.js.map +1 -1
  250. package/lib/plugin/test-item.d.ts +0 -1
  251. package/lib/plugin/test-item.d.ts.map +1 -1
  252. package/lib/plugin/tests.d.ts +8 -2
  253. package/lib/plugin/tests.d.ts.map +1 -1
  254. package/lib/plugin/tests.js +24 -1
  255. package/lib/plugin/tests.js.map +1 -1
  256. package/lib/plugin/text-editor.d.ts +1 -2
  257. package/lib/plugin/text-editor.d.ts.map +1 -1
  258. package/lib/plugin/text-editor.js.map +1 -1
  259. package/lib/plugin/text-editors.d.ts +0 -1
  260. package/lib/plugin/text-editors.d.ts.map +1 -1
  261. package/lib/plugin/timeline.d.ts +0 -1
  262. package/lib/plugin/timeline.d.ts.map +1 -1
  263. package/lib/plugin/tree/tree-views.d.ts +0 -1
  264. package/lib/plugin/tree/tree-views.d.ts.map +1 -1
  265. package/lib/plugin/type-converters.d.ts +13 -2
  266. package/lib/plugin/type-converters.d.ts.map +1 -1
  267. package/lib/plugin/type-converters.js +55 -5
  268. package/lib/plugin/type-converters.js.map +1 -1
  269. package/lib/plugin/types-impl.d.ts +7 -1
  270. package/lib/plugin/types-impl.d.ts.map +1 -1
  271. package/lib/plugin/types-impl.js +9 -1
  272. package/lib/plugin/types-impl.js.map +1 -1
  273. package/lib/plugin/uri-ext.d.ts +0 -1
  274. package/lib/plugin/uri-ext.d.ts.map +1 -1
  275. package/lib/plugin/webview-views.d.ts +0 -1
  276. package/lib/plugin/webview-views.d.ts.map +1 -1
  277. package/lib/plugin/webviews.d.ts +0 -1
  278. package/lib/plugin/webviews.d.ts.map +1 -1
  279. package/lib/plugin/window-state.d.ts +0 -1
  280. package/lib/plugin/window-state.d.ts.map +1 -1
  281. package/lib/plugin/workspace.d.ts +0 -1
  282. package/lib/plugin/workspace.d.ts.map +1 -1
  283. package/package.json +29 -29
  284. package/src/common/plugin-api-rpc-model.ts +11 -0
  285. package/src/common/plugin-api-rpc.ts +7 -5
  286. package/src/common/test-types.ts +15 -1
  287. package/src/main/browser/authentication-main.ts +24 -11
  288. package/src/main/browser/custom-editors/custom-editor-opener.tsx +19 -4
  289. package/src/main/browser/custom-editors/plugin-custom-editor-registry.ts +7 -3
  290. package/src/main/browser/editors-and-documents-main.ts +27 -2
  291. package/src/main/browser/menus/plugin-menu-command-adapter.ts +2 -2
  292. package/src/main/browser/notebooks/notebook-documents-and-editors-main.ts +13 -9
  293. package/src/main/browser/notebooks/notebook-kernels-main.ts +2 -2
  294. package/src/main/browser/notebooks/renderers/cell-output-webview.tsx +170 -74
  295. package/src/main/browser/notebooks/renderers/output-webview-internal.ts +237 -73
  296. package/src/main/browser/notebooks/renderers/webview-communication.ts +78 -7
  297. package/src/main/browser/plugin-ext-frontend-module.ts +6 -5
  298. package/src/main/browser/tabs/tabs-main.ts +6 -2
  299. package/src/main/browser/test-main.ts +4 -1
  300. package/src/main/browser/text-editor-main.ts +55 -14
  301. package/src/plugin/authentication-ext.ts +9 -5
  302. package/src/plugin/file-system-ext-impl.ts +7 -3
  303. package/src/plugin/notebook/notebooks.ts +22 -1
  304. package/src/plugin/plugin-context.ts +40 -15
  305. package/src/plugin/scm.ts +5 -4
  306. package/src/plugin/terminal-ext.ts +1 -0
  307. package/src/plugin/tests.ts +34 -3
  308. package/src/plugin/text-editor.ts +1 -1
  309. package/src/plugin/type-converters.ts +58 -6
  310. package/src/plugin/types-impl.ts +10 -1
@@ -74,6 +74,12 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
74
74
  const theia = acquireVsCodeApi();
75
75
  const renderFallbackErrorName = 'vscode.fallbackToNextRenderer';
76
76
 
77
+ document.body.style.overflow = 'hidden';
78
+ const container = document.createElement('div');
79
+ container.id = 'container';
80
+ container.classList.add('widgetarea');
81
+ document.body.appendChild(container);
82
+
77
83
  function createEmitter<T>(listenerChange: (listeners: Set<Listener<T>>) => void = () => undefined): EmitterLike<T> {
78
84
  const listeners = new Set<Listener<T>>();
79
85
  return {
@@ -138,19 +144,124 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
138
144
  return module.activate(createKernelContext());
139
145
  }
140
146
 
141
- class Output {
147
+ class OutputCell {
148
+ readonly element: HTMLElement;
149
+ readonly outputElements: OutputContainer[] = [];
150
+
151
+ constructor(public cellHandle: number, cellIndex?: number) {
152
+ this.element = document.createElement('div');
153
+ this.element.style.outline = '0';
154
+
155
+ this.element.id = `cellHandle${cellHandle}`;
156
+ this.element.classList.add('cell_container');
157
+
158
+ this.element.addEventListener('focusin', e => {
159
+ theia.postMessage({ type: 'cellFocusChanged', cellHandle: cellHandle });
160
+ });
161
+
162
+ if (cellIndex && cellIndex < container.children.length) {
163
+ container.insertBefore(this.element, container.children[cellIndex]);
164
+ } else {
165
+ container.appendChild(this.element);
166
+ }
167
+ this.element = this.element;
168
+
169
+ theia.postMessage({ type: 'cellHeightRequest', cellHandle: cellHandle });
170
+ }
171
+
172
+ public dispose(): void {
173
+ this.element.remove();
174
+ }
175
+
176
+ calcTotalOutputHeight(): number {
177
+ return this.outputElements.reduce((acc, output) => acc + output.element.clientHeight, 0) + 5;
178
+ }
179
+
180
+ createOutputElement(index: number, output: webviewCommunication.Output, items: rendererApi.OutputItem[]): OutputContainer {
181
+ let outputContainer = this.outputElements.find(o => o.outputId === output.id);
182
+ if (!outputContainer) {
183
+ outputContainer = new OutputContainer(output, items, this);
184
+ this.element.appendChild(outputContainer.containerElement);
185
+ this.outputElements.splice(index, 0, outputContainer);
186
+ }
187
+
188
+ return outputContainer;
189
+ }
190
+
191
+ public clearOutputs(start: number, deleteCount: number): void {
192
+ for (const output of this.outputElements.splice(start, deleteCount)) {
193
+ output?.clear();
194
+ output.containerElement.remove();
195
+ }
196
+ }
197
+
198
+ public show(outputId: string, top: number): void {
199
+ const outputContainer = this.outputElements.find(o => o.outputId === outputId);
200
+ if (!outputContainer) {
201
+ return;
202
+ }
203
+ }
204
+
205
+ public hide(): void {
206
+ this.element.style.visibility = 'hidden';
207
+ }
208
+
209
+ public updateCellHeight(cellKind: number, height: number): void {
210
+ let additionalHeight = 54.5;
211
+ additionalHeight -= cells[0] === this ? 2.5 : 0; // first cell
212
+ additionalHeight -= this.outputElements.length ? 0 : 5.5; // no outputs
213
+ this.element.style.paddingTop = `${height + additionalHeight}px`;
214
+ }
215
+
216
+ public outputVisibilityChanged(visible: boolean): void {
217
+ this.outputElements.forEach(output => {
218
+ output.element.style.display = visible ? 'initial' : 'none';
219
+ });
220
+ if (visible) {
221
+ this.element.getElementsByClassName('output-hidden')?.[0].remove();
222
+ } else {
223
+ const outputHiddenElement = document.createElement('div');
224
+ outputHiddenElement.classList.add('output-hidden');
225
+ outputHiddenElement.style.height = '16px';
226
+ this.element.appendChild(outputHiddenElement);
227
+ }
228
+ }
229
+
230
+ // public updateScroll(request: webviewCommunication.IContentWidgetTopRequest): void {
231
+ // this.element.style.top = `${request.cellTop}px`;
232
+
233
+ // const outputElement = this.outputElements.get(request.outputId);
234
+ // if (outputElement) {
235
+ // outputElement.updateScroll(request.outputOffset);
236
+
237
+ // if (request.forceDisplay && outputElement.element) {
238
+ // // TODO @rebornix @mjbvz, there is a misalignment here.
239
+ // // We set output visibility on cell container, other than output container or output node itself.
240
+ // outputElement.element.style.visibility = '';
241
+ // }
242
+ // }
243
+
244
+ // if (request.forceDisplay) {
245
+ // this.element.style.visibility = '';
246
+ // }
247
+ }
248
+
249
+ const cells: OutputCell[] = [];
250
+
251
+ class OutputContainer {
142
252
  readonly outputId: string;
253
+ readonly cellId: string;
143
254
  renderedItem?: rendererApi.OutputItem;
144
255
  allItems: rendererApi.OutputItem[];
145
256
 
146
257
  renderer: Renderer;
147
258
 
148
259
  element: HTMLElement;
149
- container: HTMLElement;
260
+ containerElement: HTMLElement;
150
261
 
151
- constructor(output: webviewCommunication.Output, items: rendererApi.OutputItem[]) {
152
- this.createHtmlElement(output.id);
262
+ constructor(output: webviewCommunication.Output, items: rendererApi.OutputItem[], private cell: OutputCell) {
153
263
  this.outputId = output.id;
264
+ this.createHtmlElement();
154
265
  this.allItems = items;
155
266
  }
156
267
 
@@ -169,27 +280,23 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
169
280
  this.element.innerHTML = '';
170
281
  }
171
282
 
172
- private createHtmlElement(id: string): void {
173
- // Recreates the output container structure used in VS Code
174
- this.container = document.createElement('div');
175
- this.container.id = 'container';
176
- this.container.classList.add('widgetarea');
177
- const cellContainer = document.createElement('div');
178
- cellContainer.classList.add('cell_container');
179
- cellContainer.id = id;
180
- this.container.appendChild(cellContainer);
181
- const outputContainer = document.createElement('div');
182
- outputContainer.classList.add('output-container');
183
- cellContainer.appendChild(outputContainer);
283
+ preferredMimeTypeChange(mimeType: string): void {
284
+ this.containerElement.remove();
285
+ this.createHtmlElement();
286
+ this.cell.element.appendChild(this.containerElement);
287
+ renderers.render(this.cell, this, mimeType, undefined, new AbortController().signal);
288
+ }
289
+
290
+ private createHtmlElement(): void {
291
+ this.containerElement = document.createElement('div');
292
+ this.containerElement.classList.add('output-container');
184
293
  this.element = document.createElement('div');
185
- this.element.id = id;
294
+ this.element.id = this.outputId;
186
295
  this.element.classList.add('output');
187
- outputContainer.appendChild(this.element);
188
- document.body.appendChild(this.container);
296
+ this.containerElement.appendChild(this.element);
189
297
  }
190
- }
191
298
 
192
- const outputs: Output[] = [];
299
+ }
193
300
 
194
301
  class Renderer {
195
302
 
@@ -330,7 +437,8 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
330
437
  this.renderers.get(rendererId)?.disposeOutputItem(outputId);
331
438
  }
332
439
 
333
- public async render(output: Output, preferredMimeType: string | undefined, preferredRendererId: string | undefined, signal: AbortSignal): Promise<void> {
440
+ public async render(cell: OutputCell, output: OutputContainer, preferredMimeType: string | undefined,
441
+ preferredRendererId: string | undefined, signal: AbortSignal): Promise<void> {
334
442
  const item = output.findItemToRender(preferredMimeType);
335
443
  const primaryRenderer = this.findRenderer(preferredRendererId, item);
336
444
  if (!primaryRenderer) {
@@ -341,7 +449,7 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
341
449
  // Try primary renderer first
342
450
  if (!(await this.doRender(item, output.element, primaryRenderer, signal)).continue) {
343
451
  output.renderer = primaryRenderer;
344
- this.onRenderCompleted();
452
+ this.onRenderCompleted(cell, output);
345
453
  return;
346
454
  }
347
455
 
@@ -360,7 +468,7 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
360
468
  if (renderer) {
361
469
  if (!(await this.doRender(additionalItem, output.element, renderer, signal)).continue) {
362
470
  output.renderer = renderer;
363
- this.onRenderCompleted();
471
+ this.onRenderCompleted(cell, output);
364
472
  return; // We rendered successfully
365
473
  }
366
474
  }
@@ -371,28 +479,39 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
371
479
  this.showRenderError(item, output.element, 'No fallback renderers found or all fallback renderers failed.');
372
480
  }
373
481
 
374
- private onRenderCompleted(): void {
482
+ private onRenderCompleted(cell: OutputCell, output: OutputContainer): void {
375
483
  // we need to check for all images are loaded. Otherwise we can't determine the correct height of the output
376
484
  const images = Array.from(document.images);
377
485
  if (images.length > 0) {
378
- Promise.all(images.filter(img => !img.complete).map(img => new Promise(resolve => { img.onload = img.onerror = resolve; }))).then(() => {
379
- theia.postMessage(<webviewCommunication.OnDidRenderOutput>{ type: 'didRenderOutput', contentHeight: document.body.clientHeight });
380
- new ResizeObserver(() =>
381
- theia.postMessage(<webviewCommunication.OnDidRenderOutput>{ type: 'didRenderOutput', contentHeight: document.body.clientHeight }))
382
- .observe(document.body);
383
- });
486
+ Promise.all(images
487
+ .filter(img => !img.complete && !img.dataset.waiting)
488
+ .map(img => {
489
+ img.dataset.waiting = 'true'; // mark to avoid overriding onload a second time
490
+ return new Promise(resolve => { img.onload = img.onerror = resolve; });
491
+ })).then(() => {
492
+ this.sendDidRenderMessage(cell, output);
493
+ new ResizeObserver(() => this.sendDidRenderMessage(cell, output)).observe(cell.element);
494
+ });
384
495
  } else {
385
- theia.postMessage(<webviewCommunication.OnDidRenderOutput>{ type: 'didRenderOutput', contentHeight: document.body.clientHeight });
386
- new ResizeObserver(() =>
387
- theia.postMessage(<webviewCommunication.OnDidRenderOutput>{ type: 'didRenderOutput', contentHeight: document.body.clientHeight }))
388
- .observe(document.body);
496
+ this.sendDidRenderMessage(cell, output);
497
+ new ResizeObserver(() => this.sendDidRenderMessage(cell, output)).observe(cell.element);
389
498
  }
390
499
 
391
500
  }
392
501
 
502
+ private sendDidRenderMessage(cell: OutputCell, output: OutputContainer): void {
503
+ theia.postMessage(<webviewCommunication.OnDidRenderOutput>{
504
+ type: 'didRenderOutput',
505
+ cellHandle: cell.cellHandle,
506
+ outputId: output.outputId,
507
+ outputHeight: cell.calcTotalOutputHeight(),
508
+ bodyHeight: document.body.clientHeight
509
+ });
510
+ }
511
+
393
512
  private async doRender(item: rendererApi.OutputItem, element: HTMLElement, renderer: Renderer, signal: AbortSignal): Promise<{ continue: boolean }> {
394
513
  try {
395
- (await renderer.getOrLoad())?.renderOutputItem(item, element, signal);
514
+ await (await renderer.getOrLoad())?.renderOutputItem(item, element, signal);
396
515
  return { continue: false }; // We rendered successfully
397
516
  } catch (e) {
398
517
  if (signal.aborted) {
@@ -482,40 +601,66 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
482
601
 
483
602
  await Promise.all(ctx.staticPreloadsData.map(preload => kernelPreloads.load(preload)));
484
603
 
485
- function clearOutput(output: Output): void {
486
- output.clear();
487
- output.container.remove();
488
- }
604
+ async function outputsChanged(changedEvent: webviewCommunication.OutputChangedMessage): Promise<void> {
605
+ for (const cellChange of changedEvent.changes) {
606
+ let cell = cells.find(c => c.cellHandle === cellChange.cellHandle);
607
+ if (!cell) {
608
+ cell = new OutputCell(cellChange.cellHandle);
609
+ cells.push(cell);
610
+ }
489
611
 
490
- function outputsChanged(changedEvent: webviewCommunication.OutputChangedMessage): void {
491
- for (const output of outputs.splice(changedEvent.deleteStart ?? 0, changedEvent.deleteCount ?? 0)) {
492
- clearOutput(output);
493
- }
612
+ cell.clearOutputs(cellChange.start, cellChange.deleteCount);
494
613
 
495
- for (const outputData of changedEvent.newOutputs ?? []) {
496
- const apiItems: rendererApi.OutputItem[] = outputData.items.map((item, index) => ({
497
- id: `${outputData.id}-${index}`,
498
- mime: item.mime,
499
- metadata: outputData.metadata,
500
- data(): Uint8Array {
501
- return item.data;
502
- },
503
- text(): string {
504
- return new TextDecoder().decode(this.data());
505
- },
506
- json(): unknown {
507
- return JSON.parse(this.text());
508
- },
509
- blob(): Blob {
510
- return new Blob([this.data()], { type: this.mime });
511
- },
614
+ for (const outputData of cellChange.newOutputs ?? []) {
615
+ const apiItems: rendererApi.OutputItem[] = outputData.items.map((item, index) => ({
616
+ id: `${outputData.id}-${index}`,
617
+ mime: item.mime,
618
+ metadata: outputData.metadata,
619
+ data(): Uint8Array {
620
+ return item.data;
621
+ },
622
+ text(): string {
623
+ return new TextDecoder().decode(this.data());
624
+ },
625
+ json(): unknown {
626
+ return JSON.parse(this.text());
627
+ },
628
+ blob(): Blob {
629
+ return new Blob([this.data()], { type: this.mime });
630
+ },
631
+
632
+ }));
633
+ const output = cell.createOutputElement(cellChange.start, outputData, apiItems);
512
634
 
513
- }));
635
+ await renderers.render(cell, output, undefined, undefined, new AbortController().signal);
514
636
 
515
- const output = new Output(outputData, apiItems);
516
- outputs.push(output);
637
+ theia.postMessage(<webviewCommunication.OnDidRenderOutput>{
638
+ type: 'didRenderOutput',
639
+ cellHandle: cell.cellHandle,
640
+ outputId: outputData.id,
641
+ outputHeight: document.getElementById(output.outputId)?.clientHeight ?? 0,
642
+ bodyHeight: document.body.clientHeight
643
+ });
644
+
645
+ }
646
+ }
647
+ }
517
648
 
518
- renderers.render(output, undefined, undefined, new AbortController().signal);
649
+ function cellsChanged(changes: (webviewCommunication.CellsMoved | webviewCommunication.CellsSpliced)[]): void {
650
+ for (const change of changes) {
651
+ if (change.type === 'cellMoved') {
652
+ const currentIndex = cells.findIndex(c => c.cellHandle === change.cellHandle);
653
+ const cell = cells[currentIndex];
654
+ cells.splice(change.toIndex, 0, cells.splice(currentIndex, 1)[0]);
655
+ if (change.toIndex < cells.length - 1) {
656
+ container.insertBefore(cell.element, container.children[change.toIndex + (change.toIndex > currentIndex ? 1 : 0)]);
657
+ } else {
658
+ container.appendChild(cell.element);
659
+ }
660
+ } else if (change.type === 'cellsSpliced') {
661
+ const deltedCells = cells.splice(change.start, change.deleteCount, ...change.newCells.map((cellHandle, i) => new OutputCell(cellHandle, change.start + i)));
662
+ deltedCells.forEach(cell => cell.dispose());
663
+ }
519
664
  }
520
665
  }
521
666
 
@@ -565,6 +710,7 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
565
710
 
566
711
  window.addEventListener('message', async rawEvent => {
567
712
  const event = rawEvent as ({ data: webviewCommunication.ToWebviewMessage });
713
+ let cellHandle: number | undefined;
568
714
  switch (event.data.type) {
569
715
  case 'updateRenderers':
570
716
  renderers.updateRendererData(event.data.rendererData);
@@ -572,27 +718,28 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
572
718
  case 'outputChanged':
573
719
  outputsChanged(event.data);
574
720
  break;
721
+ case 'cellsChanged':
722
+ cellsChanged(event.data.changes);
723
+ break;
575
724
  case 'customRendererMessage':
576
725
  renderers.getRenderer(event.data.rendererId)?.receiveMessage(event.data.message);
577
726
  break;
578
727
  case 'changePreferredMimetype':
728
+ cellHandle = event.data.cellHandle;
579
729
  const mimeType = event.data.mimeType;
580
- outputs.forEach(output => {
581
- output.element.innerHTML = '';
582
- renderers.render(output, mimeType, undefined, new AbortController().signal);
583
- });
730
+ cells.find(c => c.cellHandle === cellHandle)
731
+ ?.outputElements.forEach(o => o.preferredMimeTypeChange(mimeType));
584
732
  break;
585
733
  case 'customKernelMessage':
586
734
  onDidReceiveKernelMessage.fire(event.data.message);
587
735
  break;
588
- case 'preload': {
736
+ case 'preload':
589
737
  const resources = event.data.resources;
590
738
  for (const uri of resources) {
591
739
  kernelPreloads.load(uri);
592
740
  }
593
741
  break;
594
- }
595
- case 'notebookStyles': {
742
+ case 'notebookStyles':
596
743
  const documentStyle = window.document.documentElement.style;
597
744
 
598
745
  for (let i = documentStyle.length - 1; i >= 0; i--) {
@@ -609,7 +756,17 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
609
756
  documentStyle.setProperty(`--${name}`, value);
610
757
  }
611
758
  break;
612
- }
759
+ case 'cellHeightUpdate':
760
+ cellHandle = event.data.cellHandle;
761
+ const cell = cells.find(c => c.cellHandle === cellHandle);
762
+ if (cell) {
763
+ cell.updateCellHeight(event.data.cellKind, event.data.height);
764
+ }
765
+ break;
766
+ case 'outputVisibilityChanged':
767
+ cellHandle = event.data.cellHandle;
768
+ cells.find(c => c.cellHandle === cellHandle)?.outputVisibilityChanged(event.data.visible);
769
+ break;
613
770
  }
614
771
  });
615
772
  window.addEventListener('wheel', handleWheel);
@@ -632,5 +789,12 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
632
789
 
633
790
  window.addEventListener('focusout', (event: FocusEvent) => focusChange(event, false));
634
791
 
792
+ new ResizeObserver(() => {
793
+ theia.postMessage({
794
+ type: 'bodyHeightChange',
795
+ height: document.body.clientHeight
796
+ } as webviewCommunication.BodyHeightChange);
797
+ }).observe(document.body);
798
+
635
799
  theia.postMessage(<webviewCommunication.WebviewInitialized>{ type: 'initialized' });
636
800
  }
@@ -36,15 +36,21 @@ export interface UpdateRenderersMessage {
36
36
  readonly rendererData: readonly RendererMetadata[];
37
37
  }
38
38
 
39
+ export interface CellOutputChange {
40
+ readonly cellHandle: number;
41
+ readonly newOutputs?: Output[];
42
+ readonly start: number;
43
+ readonly deleteCount: number;
44
+ }
45
+
39
46
  export interface OutputChangedMessage {
40
47
  readonly type: 'outputChanged';
41
- readonly newOutputs?: Output[];
42
- readonly deleteStart?: number;
43
- readonly deleteCount?: number;
48
+ changes: CellOutputChange[];
44
49
  }
45
50
 
46
51
  export interface ChangePreferredMimetypeMessage {
47
52
  readonly type: 'changePreferredMimetype';
53
+ readonly cellHandle: number;
48
54
  readonly outputId: string;
49
55
  readonly mimeType: string;
50
56
  }
@@ -64,13 +70,53 @@ export interface notebookStylesMessage {
64
70
  styles: Record<string, string>;
65
71
  }
66
72
 
73
+ export interface CellHeigthsMessage {
74
+ type: 'cellHeigths';
75
+ cellHeigths: Record<number, number>;
76
+ }
77
+
78
+ export interface CellsMoved {
79
+ type: 'cellMoved';
80
+ cellHandle: number;
81
+ toIndex: number;
82
+ }
83
+
84
+ export interface CellsSpliced {
85
+ type: 'cellsSpliced';
86
+ start: number;
87
+ deleteCount: number;
88
+ newCells: number[];
89
+ }
90
+
91
+ export interface CellsChangedMessage {
92
+ type: 'cellsChanged';
93
+ changes: Array<CellsMoved | CellsSpliced>;
94
+ }
95
+
96
+ export interface CellHeightUpdateMessage {
97
+ type: 'cellHeightUpdate';
98
+ cellKind: number;
99
+ cellHandle: number;
100
+ height: number;
101
+ }
102
+
103
+ export interface OutputVisibilityChangedMessage {
104
+ type: 'outputVisibilityChanged';
105
+ cellHandle: number;
106
+ visible: boolean;
107
+ }
108
+
67
109
  export type ToWebviewMessage = UpdateRenderersMessage
68
110
  | OutputChangedMessage
69
111
  | ChangePreferredMimetypeMessage
70
112
  | CustomRendererMessage
71
113
  | KernelMessage
72
114
  | PreloadMessage
73
- | notebookStylesMessage;
115
+ | notebookStylesMessage
116
+ | CellHeigthsMessage
117
+ | CellHeightUpdateMessage
118
+ | CellsChangedMessage
119
+ | OutputVisibilityChangedMessage;
74
120
 
75
121
  export interface WebviewInitialized {
76
122
  readonly type: 'initialized';
@@ -78,7 +124,10 @@ export interface WebviewInitialized {
78
124
 
79
125
  export interface OnDidRenderOutput {
80
126
  readonly type: 'didRenderOutput';
81
- contentHeight: number;
127
+ cellHandle: number;
128
+ outputId: string;
129
+ outputHeight: number;
130
+ bodyHeight: number;
82
131
  }
83
132
 
84
133
  export interface WheelMessage {
@@ -92,7 +141,30 @@ export interface InputFocusChange {
92
141
  readonly focused: boolean;
93
142
  }
94
143
 
95
- export type FromWebviewMessage = WebviewInitialized | OnDidRenderOutput | WheelMessage | CustomRendererMessage | KernelMessage | InputFocusChange;
144
+ export interface CellOuputFocus {
145
+ readonly type: 'cellFocusChanged';
146
+ readonly cellHandle: number;
147
+ }
148
+
149
+ export interface CellHeightRequest {
150
+ readonly type: 'cellHeightRequest';
151
+ readonly cellHandle: number;
152
+ }
153
+
154
+ export interface BodyHeightChange {
155
+ readonly type: 'bodyHeightChange';
156
+ readonly height: number;
157
+ }
158
+
159
+ export type FromWebviewMessage = WebviewInitialized
160
+ | OnDidRenderOutput
161
+ | WheelMessage
162
+ | CustomRendererMessage
163
+ | KernelMessage
164
+ | InputFocusChange
165
+ | CellOuputFocus
166
+ | CellHeightRequest
167
+ | BodyHeightChange;
96
168
 
97
169
  export interface Output {
98
170
  id: string
@@ -104,4 +176,3 @@ export interface OutputItem {
104
176
  readonly mime: string;
105
177
  readonly data: Uint8Array;
106
178
  }
107
-
@@ -22,7 +22,9 @@ import { ContainerModule } from '@theia/core/shared/inversify';
22
22
  import {
23
23
  FrontendApplicationContribution, WidgetFactory, bindViewContribution,
24
24
  ViewContainerIdentifier, ViewContainer, createTreeContainer, TreeWidget, LabelProviderContribution, LabelProvider,
25
- UndoRedoHandler, DiffUris, Navigatable, SplitWidget
25
+ UndoRedoHandler, DiffUris, Navigatable, SplitWidget,
26
+ noopWidgetStatusBarContribution,
27
+ WidgetStatusBarContribution
26
28
  } from '@theia/core/lib/browser';
27
29
  import { MaybePromise, CommandContribution, ResourceResolver, bindContributionProvider, URI, generateUuid } from '@theia/core/lib/common';
28
30
  import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging';
@@ -86,8 +88,6 @@ import { LanguagePackService, languagePackServicePath } from '../../common/langu
86
88
  import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
87
89
  import { CellOutputWebviewFactory } from '@theia/notebook/lib/browser';
88
90
  import { CellOutputWebviewImpl, createCellOutputWebviewContainer } from './notebooks/renderers/cell-output-webview';
89
- import { NotebookCellModel } from '@theia/notebook/lib/browser/view-model/notebook-cell-model';
90
- import { NotebookModel } from '@theia/notebook/lib/browser/view-model/notebook-model';
91
91
  import { ArgumentProcessorContribution } from './command-registry-main';
92
92
  import { WebviewSecondaryWindowSupport } from './webview/webview-secondary-window-support';
93
93
  import { CustomEditorUndoRedoHandler } from './custom-editors/custom-editor-undo-redo-handler';
@@ -191,6 +191,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
191
191
  bind(WebviewSecondaryWindowSupport).toSelf().inSingletonScope();
192
192
  bind(FrontendApplicationContribution).toService(WebviewSecondaryWindowSupport);
193
193
  bind(FrontendApplicationContribution).toService(WebviewContextKeys);
194
+ bind(WidgetStatusBarContribution).toConstantValue(noopWidgetStatusBarContribution(WebviewWidget));
194
195
 
195
196
  bind(PluginCustomEditorRegistry).toSelf().inSingletonScope();
196
197
  bind(CustomEditorService).toSelf().inSingletonScope();
@@ -283,8 +284,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
283
284
  return provider.createProxy<LanguagePackService>(languagePackServicePath);
284
285
  }).inSingletonScope();
285
286
 
286
- bind(CellOutputWebviewFactory).toFactory(ctx => async (cell: NotebookCellModel, notebook: NotebookModel) =>
287
- createCellOutputWebviewContainer(ctx.container, cell, notebook).getAsync(CellOutputWebviewImpl)
287
+ bind(CellOutputWebviewFactory).toFactory(ctx => () =>
288
+ createCellOutputWebviewContainer(ctx.container).get(CellOutputWebviewImpl)
288
289
  );
289
290
  bindContributionProvider(bind, ArgumentProcessorContribution);
290
291
 
@@ -231,9 +231,13 @@ export class TabsMainImpl implements TabsMain, Disposable {
231
231
  return { kind: TabInputKind.UnknownInput };
232
232
  }
233
233
 
234
- protected connectToSignal<T>(disposableList: DisposableCollection, signal: { connect(listener: T, context: unknown): void, disconnect(listener: T): void }, listener: T): void {
234
+ protected connectToSignal<T>(disposableList: DisposableCollection,
235
+ signal: {
236
+ connect(listener: T, context: unknown): void,
237
+ disconnect(listener: T, context: unknown): void
238
+ }, listener: T): void {
235
239
  signal.connect(listener, this);
236
- disposableList.push(Disposable.create(() => signal.disconnect(listener)));
240
+ disposableList.push(Disposable.create(() => signal.disconnect(listener, this)));
237
241
  }
238
242
 
239
243
  protected tabDtosEqual(a: TabDto, b: TabDto): boolean {
@@ -27,7 +27,10 @@ import { CancellationToken, Disposable, Event, URI } from '@theia/core';
27
27
  import { MAIN_RPC_CONTEXT, TestControllerUpdate, TestingExt, TestingMain } from '../../common';
28
28
  import { RPCProtocol } from '../../common/rpc-protocol';
29
29
  import { interfaces } from '@theia/core/shared/inversify';
30
- import { TestExecutionState, TestItemDTO, TestItemReference, TestOutputDTO, TestRunDTO, TestRunProfileDTO, TestStateChangeDTO } from '../../common/test-types';
30
+ import {
31
+ TestExecutionState, TestItemDTO, TestItemReference, TestOutputDTO,
32
+ TestRunDTO, TestRunProfileDTO, TestStateChangeDTO
33
+ } from '../../common/test-types';
31
34
  import { TestRunProfileKind } from '../../plugin/types-impl';
32
35
  import { CommandRegistryMainImpl } from './command-registry-main';
33
36