@theia/plugin-ext 1.47.0-next.0 → 1.47.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 (394) hide show
  1. package/lib/common/index.js +4 -13
  2. package/lib/common/index.js.map +1 -1
  3. package/lib/common/plugin-api-rpc-model.d.ts +1 -1
  4. package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
  5. package/lib/common/plugin-api-rpc.d.ts +41 -20
  6. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  7. package/lib/common/plugin-api-rpc.js +1 -1
  8. package/lib/common/plugin-api-rpc.js.map +1 -1
  9. package/lib/common/plugin-protocol.d.ts +10 -0
  10. package/lib/common/plugin-protocol.d.ts.map +1 -1
  11. package/lib/common/plugin-protocol.js.map +1 -1
  12. package/lib/common/uri-components.d.ts +1 -2
  13. package/lib/common/uri-components.d.ts.map +1 -1
  14. package/lib/common/uri-components.js +1 -5
  15. package/lib/common/uri-components.js.map +1 -1
  16. package/lib/hosted/browser/hosted-plugin-watcher.js +2 -7
  17. package/lib/hosted/browser/hosted-plugin-watcher.js.map +1 -1
  18. package/lib/hosted/browser/hosted-plugin.js +59 -67
  19. package/lib/hosted/browser/hosted-plugin.js.map +1 -1
  20. package/lib/hosted/browser/plugin-worker.js +3 -11
  21. package/lib/hosted/browser/plugin-worker.js.map +1 -1
  22. package/lib/hosted/browser/worker/worker-env-ext.js +3 -11
  23. package/lib/hosted/browser/worker/worker-env-ext.js.map +1 -1
  24. package/lib/hosted/common/hosted-plugin.js +21 -29
  25. package/lib/hosted/common/hosted-plugin.js.map +1 -1
  26. package/lib/hosted/node/hosted-plugin-cli-contribution.js +2 -7
  27. package/lib/hosted/node/hosted-plugin-cli-contribution.js.map +1 -1
  28. package/lib/hosted/node/hosted-plugin-deployer-handler.js +14 -22
  29. package/lib/hosted/node/hosted-plugin-deployer-handler.js.map +1 -1
  30. package/lib/hosted/node/hosted-plugin-localization-service.js +8 -16
  31. package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -1
  32. package/lib/hosted/node/hosted-plugin-process.js +14 -22
  33. package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
  34. package/lib/hosted/node/hosted-plugin.js +12 -20
  35. package/lib/hosted/node/hosted-plugin.js.map +1 -1
  36. package/lib/hosted/node/metadata-scanner.js +6 -17
  37. package/lib/hosted/node/metadata-scanner.js.map +1 -1
  38. package/lib/hosted/node/plugin-host-rpc.js +42 -53
  39. package/lib/hosted/node/plugin-host-rpc.js.map +1 -1
  40. package/lib/hosted/node/plugin-language-pack-service.js +2 -7
  41. package/lib/hosted/node/plugin-language-pack-service.js.map +1 -1
  42. package/lib/hosted/node/plugin-reader.js +8 -16
  43. package/lib/hosted/node/plugin-reader.js.map +1 -1
  44. package/lib/hosted/node/plugin-service.js +22 -33
  45. package/lib/hosted/node/plugin-service.js.map +1 -1
  46. package/lib/hosted/node/scanners/file-plugin-uri-factory.js +2 -7
  47. package/lib/hosted/node/scanners/file-plugin-uri-factory.js.map +1 -1
  48. package/lib/hosted/node/scanners/grammars-reader.js +2 -7
  49. package/lib/hosted/node/scanners/grammars-reader.js.map +1 -1
  50. package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
  51. package/lib/hosted/node/scanners/scanner-theia.js +17 -19
  52. package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
  53. package/lib/hosted/node-electron/scanner-theia-electron.js +2 -7
  54. package/lib/hosted/node-electron/scanner-theia-electron.js.map +1 -1
  55. package/lib/main/browser/command-registry-main.d.ts +1 -0
  56. package/lib/main/browser/command-registry-main.d.ts.map +1 -1
  57. package/lib/main/browser/command-registry-main.js +6 -1
  58. package/lib/main/browser/command-registry-main.js.map +1 -1
  59. package/lib/main/browser/commands.js +5 -16
  60. package/lib/main/browser/commands.js.map +1 -1
  61. package/lib/main/browser/comments/comments-context-key-service.js +8 -16
  62. package/lib/main/browser/comments/comments-context-key-service.js.map +1 -1
  63. package/lib/main/browser/comments/comments-contribution.d.ts.map +1 -1
  64. package/lib/main/browser/comments/comments-contribution.js +17 -25
  65. package/lib/main/browser/comments/comments-contribution.js.map +1 -1
  66. package/lib/main/browser/comments/comments-decorator.js +3 -11
  67. package/lib/main/browser/comments/comments-decorator.js.map +1 -1
  68. package/lib/main/browser/comments/comments-main.js +2 -2
  69. package/lib/main/browser/comments/comments-main.js.map +1 -1
  70. package/lib/main/browser/comments/comments-service.js +2 -7
  71. package/lib/main/browser/comments/comments-service.js.map +1 -1
  72. package/lib/main/browser/custom-editors/custom-editor-contribution.js +4 -12
  73. package/lib/main/browser/custom-editors/custom-editor-contribution.js.map +1 -1
  74. package/lib/main/browser/custom-editors/custom-editor-opener.js +7 -18
  75. package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
  76. package/lib/main/browser/custom-editors/custom-editor-service.js +2 -7
  77. package/lib/main/browser/custom-editors/custom-editor-service.js.map +1 -1
  78. package/lib/main/browser/custom-editors/custom-editor-widget.d.ts.map +1 -1
  79. package/lib/main/browser/custom-editors/custom-editor-widget.js +15 -21
  80. package/lib/main/browser/custom-editors/custom-editor-widget.js.map +1 -1
  81. package/lib/main/browser/custom-editors/custom-editors-main.js +1 -1
  82. package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
  83. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js +18 -26
  84. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js.map +1 -1
  85. package/lib/main/browser/data-transfer/data-transfer-type-converters.d.ts +2 -2
  86. package/lib/main/browser/data-transfer/data-transfer-type-converters.d.ts.map +1 -1
  87. package/lib/main/browser/data-transfer/data-transfer-type-converters.js +2 -4
  88. package/lib/main/browser/data-transfer/data-transfer-type-converters.js.map +1 -1
  89. package/lib/main/browser/debug/plugin-debug-service.js +10 -18
  90. package/lib/main/browser/debug/plugin-debug-service.js.map +1 -1
  91. package/lib/main/browser/debug/plugin-debug-session-contribution-registry.js +8 -16
  92. package/lib/main/browser/debug/plugin-debug-session-contribution-registry.js.map +1 -1
  93. package/lib/main/browser/dialogs/modal-notification.js +3 -11
  94. package/lib/main/browser/dialogs/modal-notification.js.map +1 -1
  95. package/lib/main/browser/editors-and-documents-main.d.ts +5 -1
  96. package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
  97. package/lib/main/browser/editors-and-documents-main.js +22 -3
  98. package/lib/main/browser/editors-and-documents-main.js.map +1 -1
  99. package/lib/main/browser/file-system-main-impl.d.ts +2 -1
  100. package/lib/main/browser/file-system-main-impl.d.ts.map +1 -1
  101. package/lib/main/browser/file-system-main-impl.js +5 -3
  102. package/lib/main/browser/file-system-main-impl.js.map +1 -1
  103. package/lib/main/browser/keybindings/keybindings-contribution-handler.js +4 -12
  104. package/lib/main/browser/keybindings/keybindings-contribution-handler.js.map +1 -1
  105. package/lib/main/browser/languages-main.d.ts +2 -2
  106. package/lib/main/browser/languages-main.d.ts.map +1 -1
  107. package/lib/main/browser/languages-main.js +19 -27
  108. package/lib/main/browser/languages-main.js.map +1 -1
  109. package/lib/main/browser/main-context.d.ts.map +1 -1
  110. package/lib/main/browser/main-context.js +1 -3
  111. package/lib/main/browser/main-context.js.map +1 -1
  112. package/lib/main/browser/menus/menus-contribution-handler.js +23 -31
  113. package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
  114. package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts.map +1 -1
  115. package/lib/main/browser/menus/plugin-menu-command-adapter.js +20 -25
  116. package/lib/main/browser/menus/plugin-menu-command-adapter.js.map +1 -1
  117. package/lib/main/browser/menus/vscode-theia-menu-mappings.d.ts +2 -2
  118. package/lib/main/browser/menus/vscode-theia-menu-mappings.d.ts.map +1 -1
  119. package/lib/main/browser/menus/vscode-theia-menu-mappings.js +11 -9
  120. package/lib/main/browser/menus/vscode-theia-menu-mappings.js.map +1 -1
  121. package/lib/main/browser/notebooks/notebook-kernels-main.d.ts +1 -0
  122. package/lib/main/browser/notebooks/notebook-kernels-main.d.ts.map +1 -1
  123. package/lib/main/browser/notebooks/notebook-kernels-main.js +41 -4
  124. package/lib/main/browser/notebooks/notebook-kernels-main.js.map +1 -1
  125. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +7 -2
  126. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -1
  127. package/lib/main/browser/notebooks/renderers/cell-output-webview.js +79 -45
  128. package/lib/main/browser/notebooks/renderers/cell-output-webview.js.map +1 -1
  129. package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts +1 -0
  130. package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -1
  131. package/lib/main/browser/notebooks/renderers/output-webview-internal.js +74 -1
  132. package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
  133. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts +10 -2
  134. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts.map +1 -1
  135. package/lib/main/browser/output-channel-registry-main.js +4 -12
  136. package/lib/main/browser/output-channel-registry-main.js.map +1 -1
  137. package/lib/main/browser/plugin-authentication-service.js +3 -11
  138. package/lib/main/browser/plugin-authentication-service.js.map +1 -1
  139. package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
  140. package/lib/main/browser/plugin-contribution-handler.js +66 -69
  141. package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
  142. package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
  143. package/lib/main/browser/plugin-ext-frontend-module.js +3 -1
  144. package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
  145. package/lib/main/browser/plugin-ext-widget.js +11 -19
  146. package/lib/main/browser/plugin-ext-widget.js.map +1 -1
  147. package/lib/main/browser/plugin-frontend-contribution.js +4 -12
  148. package/lib/main/browser/plugin-frontend-contribution.js.map +1 -1
  149. package/lib/main/browser/plugin-frontend-view-contribution.js +3 -11
  150. package/lib/main/browser/plugin-frontend-view-contribution.js.map +1 -1
  151. package/lib/main/browser/plugin-icon-service.d.ts +2 -5
  152. package/lib/main/browser/plugin-icon-service.d.ts.map +1 -1
  153. package/lib/main/browser/plugin-icon-service.js +10 -77
  154. package/lib/main/browser/plugin-icon-service.js.map +1 -1
  155. package/lib/main/browser/plugin-icon-theme-service.js +22 -30
  156. package/lib/main/browser/plugin-icon-theme-service.js.map +1 -1
  157. package/lib/main/browser/plugin-shared-style.js +8 -16
  158. package/lib/main/browser/plugin-shared-style.js.map +1 -1
  159. package/lib/main/browser/plugin-terminal-registry.js +2 -7
  160. package/lib/main/browser/plugin-terminal-registry.js.map +1 -1
  161. package/lib/main/browser/quick-open-main.d.ts +8 -7
  162. package/lib/main/browser/quick-open-main.d.ts.map +1 -1
  163. package/lib/main/browser/quick-open-main.js +51 -14
  164. package/lib/main/browser/quick-open-main.js.map +1 -1
  165. package/lib/main/browser/scm-main.js +3 -3
  166. package/lib/main/browser/scm-main.js.map +1 -1
  167. package/lib/main/browser/selection-provider-command.d.ts.map +1 -1
  168. package/lib/main/browser/selection-provider-command.js +5 -14
  169. package/lib/main/browser/selection-provider-command.js.map +1 -1
  170. package/lib/main/browser/test-main.d.ts +3 -1
  171. package/lib/main/browser/test-main.d.ts.map +1 -1
  172. package/lib/main/browser/test-main.js +29 -30
  173. package/lib/main/browser/test-main.js.map +1 -1
  174. package/lib/main/browser/text-editor-model-service.js +5 -16
  175. package/lib/main/browser/text-editor-model-service.js.map +1 -1
  176. package/lib/main/browser/text-editors-main.d.ts +4 -5
  177. package/lib/main/browser/text-editors-main.d.ts.map +1 -1
  178. package/lib/main/browser/text-editors-main.js +15 -9
  179. package/lib/main/browser/text-editors-main.js.map +1 -1
  180. package/lib/main/browser/theme-icon-override.js +13 -19
  181. package/lib/main/browser/theme-icon-override.js.map +1 -1
  182. package/lib/main/browser/view/dnd-file-content-store.js +2 -7
  183. package/lib/main/browser/view/dnd-file-content-store.js.map +1 -1
  184. package/lib/main/browser/view/plugin-tree-view-node-label-provider.js +8 -16
  185. package/lib/main/browser/view/plugin-tree-view-node-label-provider.js.map +1 -1
  186. package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
  187. package/lib/main/browser/view/plugin-view-registry.js +33 -41
  188. package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
  189. package/lib/main/browser/view/plugin-view-widget.d.ts.map +1 -1
  190. package/lib/main/browser/view/plugin-view-widget.js +16 -25
  191. package/lib/main/browser/view/plugin-view-widget.js.map +1 -1
  192. package/lib/main/browser/view/tree-view-decorator-service.js +6 -17
  193. package/lib/main/browser/view/tree-view-decorator-service.js.map +1 -1
  194. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  195. package/lib/main/browser/view/tree-view-widget.js +41 -50
  196. package/lib/main/browser/view/tree-view-widget.js.map +1 -1
  197. package/lib/main/browser/view/view-context-key-service.js +8 -16
  198. package/lib/main/browser/view/view-context-key-service.js.map +1 -1
  199. package/lib/main/browser/view-column-service.js +4 -15
  200. package/lib/main/browser/view-column-service.js.map +1 -1
  201. package/lib/main/browser/webview/webview-context-keys.js +10 -18
  202. package/lib/main/browser/webview/webview-context-keys.js.map +1 -1
  203. package/lib/main/browser/webview/webview-environment.js +8 -16
  204. package/lib/main/browser/webview/webview-environment.js.map +1 -1
  205. package/lib/main/browser/webview/webview-frontend-security-warnings.js +8 -16
  206. package/lib/main/browser/webview/webview-frontend-security-warnings.js.map +1 -1
  207. package/lib/main/browser/webview/webview-resource-cache.js +3 -11
  208. package/lib/main/browser/webview/webview-resource-cache.js.map +1 -1
  209. package/lib/main/browser/webview/webview-theme-data-provider.js +14 -22
  210. package/lib/main/browser/webview/webview-theme-data-provider.js.map +1 -1
  211. package/lib/main/browser/webview/webview.js +37 -45
  212. package/lib/main/browser/webview/webview.js.map +1 -1
  213. package/lib/main/browser/webview-views/webview-views-main.js +3 -11
  214. package/lib/main/browser/webview-views/webview-views-main.js.map +1 -1
  215. package/lib/main/browser/workspace-main.js +2 -7
  216. package/lib/main/browser/workspace-main.js.map +1 -1
  217. package/lib/main/common/plugin-theia-environment.js +4 -12
  218. package/lib/main/common/plugin-theia-environment.js.map +1 -1
  219. package/lib/main/node/errors.spec.js +2 -2
  220. package/lib/main/node/errors.spec.js.map +1 -1
  221. package/lib/main/node/handlers/plugin-theia-directory-handler.js +6 -14
  222. package/lib/main/node/handlers/plugin-theia-directory-handler.js.map +1 -1
  223. package/lib/main/node/handlers/plugin-theia-file-handler.js +5 -13
  224. package/lib/main/node/handlers/plugin-theia-file-handler.js.map +1 -1
  225. package/lib/main/node/paths/plugin-paths-service.js +10 -18
  226. package/lib/main/node/paths/plugin-paths-service.js.map +1 -1
  227. package/lib/main/node/plugin-cli-contribution.js +2 -7
  228. package/lib/main/node/plugin-cli-contribution.js.map +1 -1
  229. package/lib/main/node/plugin-deployer-contribution.js +6 -14
  230. package/lib/main/node/plugin-deployer-contribution.js.map +1 -1
  231. package/lib/main/node/plugin-deployer-impl.js +18 -26
  232. package/lib/main/node/plugin-deployer-impl.js.map +1 -1
  233. package/lib/main/node/plugin-deployer-proxy-entry-impl.js +3 -11
  234. package/lib/main/node/plugin-deployer-proxy-entry-impl.js.map +1 -1
  235. package/lib/main/node/plugin-github-resolver.js +5 -13
  236. package/lib/main/node/plugin-github-resolver.js.map +1 -1
  237. package/lib/main/node/plugin-http-resolver.js +5 -13
  238. package/lib/main/node/plugin-http-resolver.js.map +1 -1
  239. package/lib/main/node/plugin-localization-server.js +4 -12
  240. package/lib/main/node/plugin-localization-server.js.map +1 -1
  241. package/lib/main/node/plugin-mgmt-cli-contribution.js +4 -12
  242. package/lib/main/node/plugin-mgmt-cli-contribution.js.map +1 -1
  243. package/lib/main/node/plugin-server-handler.js +6 -14
  244. package/lib/main/node/plugin-server-handler.js.map +1 -1
  245. package/lib/main/node/plugin-service.js +10 -18
  246. package/lib/main/node/plugin-service.js.map +1 -1
  247. package/lib/main/node/plugin-theia-deployer-participant.js +4 -12
  248. package/lib/main/node/plugin-theia-deployer-participant.js.map +1 -1
  249. package/lib/main/node/plugin-uninstallation-manager.js +2 -7
  250. package/lib/main/node/plugin-uninstallation-manager.js.map +1 -1
  251. package/lib/main/node/plugins-key-value-storage.js +12 -20
  252. package/lib/main/node/plugins-key-value-storage.js.map +1 -1
  253. package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.js +2 -7
  254. package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.js.map +1 -1
  255. package/lib/main/node/resolvers/local-plugin-deployer-resolver.js +2 -7
  256. package/lib/main/node/resolvers/local-plugin-deployer-resolver.js.map +1 -1
  257. package/lib/main/node/webview-backend-security-warnings.js +2 -7
  258. package/lib/main/node/webview-backend-security-warnings.js.map +1 -1
  259. package/lib/plugin/clipboard-ext.js +8 -16
  260. package/lib/plugin/clipboard-ext.js.map +1 -1
  261. package/lib/plugin/debug/debug-ext.js +11 -19
  262. package/lib/plugin/debug/debug-ext.js.map +1 -1
  263. package/lib/plugin/editors-and-documents.js +4 -12
  264. package/lib/plugin/editors-and-documents.js.map +1 -1
  265. package/lib/plugin/env.js +12 -20
  266. package/lib/plugin/env.js.map +1 -1
  267. package/lib/plugin/file-system-ext-impl.d.ts +2 -1
  268. package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
  269. package/lib/plugin/file-system-ext-impl.js +13 -1
  270. package/lib/plugin/file-system-ext-impl.js.map +1 -1
  271. package/lib/plugin/known-commands.d.ts.map +1 -1
  272. package/lib/plugin/known-commands.js +1 -0
  273. package/lib/plugin/known-commands.js.map +1 -1
  274. package/lib/plugin/languages/diagnostics.js +2 -2
  275. package/lib/plugin/languages/diagnostics.js.map +1 -1
  276. package/lib/plugin/languages/link-provider.d.ts.map +1 -1
  277. package/lib/plugin/languages/link-provider.js +3 -1
  278. package/lib/plugin/languages/link-provider.js.map +1 -1
  279. package/lib/plugin/localization-ext.js +8 -16
  280. package/lib/plugin/localization-ext.js.map +1 -1
  281. package/lib/plugin/markdown-string.d.ts +3 -3
  282. package/lib/plugin/markdown-string.d.ts.map +1 -1
  283. package/lib/plugin/markdown-string.js +17 -36
  284. package/lib/plugin/markdown-string.js.map +1 -1
  285. package/lib/plugin/message-registry.js +8 -16
  286. package/lib/plugin/message-registry.js.map +1 -1
  287. package/lib/plugin/node/env-node-ext.js +5 -13
  288. package/lib/plugin/node/env-node-ext.js.map +1 -1
  289. package/lib/plugin/notebook/notebook-kernels.d.ts +4 -5
  290. package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
  291. package/lib/plugin/notebook/notebook-kernels.js +20 -19
  292. package/lib/plugin/notebook/notebook-kernels.js.map +1 -1
  293. package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
  294. package/lib/plugin/notebook/notebook-renderers.js.map +1 -1
  295. package/lib/plugin/plugin-context.d.ts.map +1 -1
  296. package/lib/plugin/plugin-context.js +16 -20
  297. package/lib/plugin/plugin-context.js.map +1 -1
  298. package/lib/plugin/plugin-manager.js +23 -31
  299. package/lib/plugin/plugin-manager.js.map +1 -1
  300. package/lib/plugin/plugin-storage.js +4 -15
  301. package/lib/plugin/plugin-storage.js.map +1 -1
  302. package/lib/plugin/preference-registry.js +12 -20
  303. package/lib/plugin/preference-registry.js.map +1 -1
  304. package/lib/plugin/quick-open.d.ts +2 -9
  305. package/lib/plugin/quick-open.d.ts.map +1 -1
  306. package/lib/plugin/quick-open.js +6 -22
  307. package/lib/plugin/quick-open.js.map +1 -1
  308. package/lib/plugin/secrets-ext.js +4 -15
  309. package/lib/plugin/secrets-ext.js.map +1 -1
  310. package/lib/plugin/terminal-ext.js +6 -17
  311. package/lib/plugin/terminal-ext.js.map +1 -1
  312. package/lib/plugin/test-item.js +17 -25
  313. package/lib/plugin/test-item.js.map +1 -1
  314. package/lib/plugin/tests.d.ts +8 -1
  315. package/lib/plugin/tests.d.ts.map +1 -1
  316. package/lib/plugin/tests.js +35 -21
  317. package/lib/plugin/tests.js.map +1 -1
  318. package/lib/plugin/text-editors.d.ts +2 -0
  319. package/lib/plugin/text-editors.d.ts.map +1 -1
  320. package/lib/plugin/text-editors.js +6 -0
  321. package/lib/plugin/text-editors.js.map +1 -1
  322. package/lib/plugin/type-converters.d.ts +10 -1
  323. package/lib/plugin/type-converters.d.ts.map +1 -1
  324. package/lib/plugin/type-converters.js +49 -10
  325. package/lib/plugin/type-converters.js.map +1 -1
  326. package/lib/plugin/types-impl.d.ts +2 -2
  327. package/lib/plugin/types-impl.d.ts.map +1 -1
  328. package/lib/plugin/types-impl.js +167 -180
  329. package/lib/plugin/types-impl.js.map +1 -1
  330. package/lib/plugin/webviews.d.ts +1 -0
  331. package/lib/plugin/webviews.d.ts.map +1 -1
  332. package/lib/plugin/webviews.js +18 -23
  333. package/lib/plugin/webviews.js.map +1 -1
  334. package/lib/plugin/workspace.js +12 -20
  335. package/lib/plugin/workspace.js.map +1 -1
  336. package/package.json +31 -31
  337. package/src/common/plugin-api-rpc-model.ts +1 -1
  338. package/src/common/plugin-api-rpc.ts +36 -20
  339. package/src/common/plugin-protocol.ts +12 -1
  340. package/src/common/uri-components.ts +1 -5
  341. package/src/hosted/browser/hosted-plugin.ts +2 -2
  342. package/src/hosted/node/hosted-plugin-deployer-handler.ts +2 -2
  343. package/src/hosted/node/scanners/scanner-theia.ts +8 -2
  344. package/src/main/browser/command-registry-main.ts +7 -0
  345. package/src/main/browser/comments/comments-contribution.ts +7 -3
  346. package/src/main/browser/comments/comments-main.ts +2 -2
  347. package/src/main/browser/custom-editors/custom-editor-opener.tsx +2 -2
  348. package/src/main/browser/custom-editors/custom-editor-widget.ts +3 -1
  349. package/src/main/browser/custom-editors/custom-editors-main.ts +1 -1
  350. package/src/main/browser/data-transfer/data-transfer-type-converters.ts +4 -6
  351. package/src/main/browser/editors-and-documents-main.ts +27 -5
  352. package/src/main/browser/file-system-main-impl.ts +9 -5
  353. package/src/main/browser/languages-main.ts +9 -5
  354. package/src/main/browser/main-context.ts +1 -3
  355. package/src/main/browser/menus/menus-contribution-handler.ts +1 -1
  356. package/src/main/browser/menus/plugin-menu-command-adapter.ts +4 -1
  357. package/src/main/browser/menus/vscode-theia-menu-mappings.ts +10 -2
  358. package/src/main/browser/notebooks/notebook-kernels-main.ts +46 -5
  359. package/src/main/browser/notebooks/renderers/cell-output-webview.tsx +72 -21
  360. package/src/main/browser/notebooks/renderers/output-webview-internal.ts +93 -2
  361. package/src/main/browser/notebooks/renderers/webview-communication.ts +12 -2
  362. package/src/main/browser/plugin-contribution-handler.ts +9 -1
  363. package/src/main/browser/plugin-ext-frontend-module.ts +6 -2
  364. package/src/main/browser/plugin-icon-service.ts +8 -72
  365. package/src/main/browser/quick-open-main.ts +77 -28
  366. package/src/main/browser/scm-main.ts +1 -1
  367. package/src/main/browser/selection-provider-command.ts +1 -2
  368. package/src/main/browser/test-main.ts +11 -2
  369. package/src/main/browser/text-editors-main.ts +18 -10
  370. package/src/main/browser/theme-icon-override.ts +13 -19
  371. package/src/main/browser/view/plugin-tree-view-node-label-provider.ts +1 -1
  372. package/src/main/browser/view/plugin-view-registry.ts +3 -3
  373. package/src/main/browser/view/plugin-view-widget.ts +0 -1
  374. package/src/main/browser/view/tree-view-widget.tsx +2 -3
  375. package/src/main/node/errors.spec.ts +2 -2
  376. package/src/plugin/debug/debug-ext.ts +2 -2
  377. package/src/plugin/env.ts +3 -3
  378. package/src/plugin/file-system-ext-impl.ts +15 -2
  379. package/src/plugin/known-commands.ts +1 -0
  380. package/src/plugin/languages/diagnostics.ts +2 -2
  381. package/src/plugin/languages/link-provider.ts +3 -1
  382. package/src/plugin/markdown-string.ts +3 -3
  383. package/src/plugin/node/env-node-ext.ts +2 -2
  384. package/src/plugin/notebook/notebook-kernels.ts +25 -25
  385. package/src/plugin/notebook/notebook-renderers.ts +0 -1
  386. package/src/plugin/plugin-context.ts +10 -2
  387. package/src/plugin/preference-registry.ts +2 -2
  388. package/src/plugin/quick-open.ts +10 -24
  389. package/src/plugin/terminal-ext.ts +1 -1
  390. package/src/plugin/tests.ts +33 -4
  391. package/src/plugin/text-editors.ts +9 -2
  392. package/src/plugin/type-converters.ts +45 -9
  393. package/src/plugin/types-impl.ts +4 -4
  394. package/src/plugin/webviews.ts +6 -3
@@ -14,7 +14,6 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { URI } from '@theia/core/shared/vscode-uri';
18
17
  import {
19
18
  TextEditorsMain,
20
19
  MAIN_RPC_CONTEXT,
@@ -40,12 +39,14 @@ import { TextEditorMain } from './text-editor-main';
40
39
  import { disposed } from '../../common/errors';
41
40
  import { toMonacoWorkspaceEdit } from './languages-main';
42
41
  import { MonacoBulkEditService } from '@theia/monaco/lib/browser/monaco-bulk-edit-service';
43
- import { MonacoEditorService } from '@theia/monaco/lib/browser/monaco-editor-service';
44
- import { theiaUritoUriComponents, UriComponents } from '../../common/uri-components';
42
+ import { UriComponents } from '../../common/uri-components';
45
43
  import { Endpoint } from '@theia/core/lib/browser/endpoint';
46
44
  import * as monaco from '@theia/monaco-editor-core';
47
45
  import { ResourceEdit } from '@theia/monaco-editor-core/esm/vs/editor/browser/services/bulkEditService';
48
46
  import { IDecorationRenderOptions } from '@theia/monaco-editor-core/esm/vs/editor/common/editorCommon';
47
+ import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
48
+ import { ICodeEditorService } from '@theia/monaco-editor-core/esm/vs/editor/browser/services/codeEditorService';
49
+ import { URI } from '@theia/core';
49
50
 
50
51
  export class TextEditorsMainImpl implements TextEditorsMain, Disposable {
51
52
 
@@ -59,7 +60,6 @@ export class TextEditorsMainImpl implements TextEditorsMain, Disposable {
59
60
  private readonly documents: DocumentsMain,
60
61
  rpc: RPCProtocol,
61
62
  private readonly bulkEditService: MonacoBulkEditService,
62
- private readonly monacoEditorService: MonacoEditorService,
63
63
  ) {
64
64
  this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.TEXT_EDITORS_EXT);
65
65
  this.toDispose.push(editorsAndDocuments);
@@ -131,8 +131,8 @@ export class TextEditorsMainImpl implements TextEditorsMain, Disposable {
131
131
  const workspaceEdit = toMonacoWorkspaceEdit(dto);
132
132
  try {
133
133
  const edits = ResourceEdit.convert(workspaceEdit);
134
- const { success } = await this.bulkEditService.apply(edits, { respectAutoSaveConfig: metadata?.isRefactoring });
135
- return success;
134
+ const { isApplied } = await this.bulkEditService.apply(edits, { respectAutoSaveConfig: metadata?.isRefactoring });
135
+ return isApplied;
136
136
  } catch {
137
137
  return false;
138
138
  }
@@ -145,9 +145,9 @@ export class TextEditorsMainImpl implements TextEditorsMain, Disposable {
145
145
  return Promise.resolve(this.editorsAndDocuments.getEditor(id)!.insertSnippet(template, ranges, opts));
146
146
  }
147
147
 
148
- $registerTextEditorDecorationType(key: string, options: DecorationRenderOptions | IDecorationRenderOptions): void {
148
+ $registerTextEditorDecorationType(key: string, options: DecorationRenderOptions): void {
149
149
  this.injectRemoteUris(options);
150
- this.monacoEditorService.registerDecorationType('Plugin decoration', key, options as IDecorationRenderOptions);
150
+ StandaloneServices.get(ICodeEditorService).registerDecorationType('Plugin decoration', key, options as IDecorationRenderOptions);
151
151
  this.toDispose.push(Disposable.create(() => this.$removeTextEditorDecorationType(key)));
152
152
  }
153
153
 
@@ -171,13 +171,13 @@ export class TextEditorsMainImpl implements TextEditorsMain, Disposable {
171
171
 
172
172
  protected toRemoteUri(uri?: UriComponents): UriComponents | undefined {
173
173
  if (uri && uri.scheme === 'file') {
174
- return theiaUritoUriComponents(this.fileEndpoint.withQuery(URI.revive(uri).toString()));
174
+ return this.fileEndpoint.withQuery(URI.fromComponents(uri).toString()).toComponents();
175
175
  }
176
176
  return uri;
177
177
  }
178
178
 
179
179
  $removeTextEditorDecorationType(key: string): void {
180
- this.monacoEditorService.removeDecorationType(key);
180
+ StandaloneServices.get(ICodeEditorService).removeDecorationType(key);
181
181
  }
182
182
 
183
183
  $tryHideEditor(id: string): Promise<void> {
@@ -200,6 +200,14 @@ export class TextEditorsMainImpl implements TextEditorsMain, Disposable {
200
200
  return Promise.resolve();
201
201
  }
202
202
 
203
+ $save(uri: UriComponents): PromiseLike<UriComponents | undefined> {
204
+ return this.editorsAndDocuments.save(URI.fromComponents(uri)).then(u => u?.toComponents());
205
+ }
206
+
207
+ $saveAs(uri: UriComponents): PromiseLike<UriComponents | undefined> {
208
+ return this.editorsAndDocuments.saveAs(URI.fromComponents(uri)).then(u => u?.toComponents());
209
+ }
210
+
203
211
  $saveAll(includeUntitled?: boolean): Promise<boolean> {
204
212
  return this.editorsAndDocuments.saveAll(includeUntitled);
205
213
  }
@@ -14,7 +14,7 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { ThemeIcon } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/themeService';
17
+ import { getIconRegistry } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/iconRegistry';
18
18
 
19
19
  // @monaco-uplift
20
20
  // Keep this up-to-date with the table at https://code.visualstudio.com/api/references/icons-in-labels#icon-listing
@@ -27,11 +27,12 @@ const codeIconMap: Record<string, string> = {
27
27
  'callhierarchy-outgoing': 'call-outgoing',
28
28
  'callstack-view-icon': 'debug-alt',
29
29
  'callstack-view-session': 'bug',
30
+ 'chat-editor-label-icon': 'comment-discussion',
30
31
  'comments-view-icon': 'comment-discussion',
31
32
  'debug-breakpoint': 'debug-breakpoint',
32
33
  'debug-breakpoint-conditional': 'debug-breakpoint-conditional',
33
34
  'debug-breakpoint-conditional-disabled': 'debug-breakpoint-conditional-disabled',
34
- 'debug-breakpoint-conditional-verified': 'debug-breakpoint-conditional-unverified',
35
+ 'debug-breakpoint-conditional-unverified': 'debug-breakpoint-conditional-unverified',
35
36
  'debug-breakpoint-data': 'debug-breakpoint-data',
36
37
  'debug-breakpoint-data-disabled': 'debug-breakpoint-data-disabled',
37
38
  'debug-breakpoint-data-unverified': 'debug-breakpoint-data-unverified',
@@ -173,9 +174,11 @@ const codeIconMap: Record<string, string> = {
173
174
  'remote-explorer-view-icon': 'remote-explorer',
174
175
  'review-comment-collapse': 'chevron-up',
175
176
  'run-view-icon': 'debug-alt',
177
+ 'runtime-extensions-editor-label-icon': ' extensions',
176
178
  'search-clear-results': 'clear-all',
177
179
  'search-collapse-results': 'collapse-all',
178
180
  'search-details': 'ellipsis',
181
+ 'search-editor-label-icon': 'search',
179
182
  'search-expand-results': 'expand-all',
180
183
  'search-hide-replace': 'chevron-right',
181
184
  'search-new-editor': 'new-file',
@@ -190,6 +193,7 @@ const codeIconMap: Record<string, string> = {
190
193
  'settings-add': 'add',
191
194
  'settings-discard': 'discard',
192
195
  'settings-edit': 'edit',
196
+ 'settings-editor-label-icon': 'settings',
193
197
  'settings-folder-dropdown': 'triangle-down',
194
198
  'settings-group-collapsed': 'chevron-right',
195
199
  'settings-group-expanded': 'chevron-down',
@@ -229,24 +233,14 @@ const codeIconMap: Record<string, string> = {
229
233
  'watch-expressions-add-function-breakpoint': 'add',
230
234
  'watch-expressions-remove-all': 'close-all',
231
235
  'watch-view-icon': 'debug-alt',
232
- 'widget-close': 'close'
236
+ 'widget-close': 'close',
237
+ 'workspace-trust-editor-label-icon': ' shield'
233
238
  };
234
239
 
235
- const originalAsCSSSelector = ThemeIcon.asCSSSelector;
236
- const originalAsClassName = ThemeIcon.asClassName;
237
- const originalAsClassNameArray = ThemeIcon.asClassNameArray;
240
+ const registry = getIconRegistry();
238
241
 
239
- function buildMappedIcon(icon: ThemeIcon): ThemeIcon {
240
- const id = codeIconMap[icon.id] ?? icon.id;
241
- const newIcon: ThemeIcon = {
242
- ...icon,
243
- id
244
- };
245
- return newIcon;
242
+ for (const key in codeIconMap) {
243
+ if (codeIconMap.hasOwnProperty(key)) {
244
+ registry.registerIcon(key, { id: codeIconMap[key] }, key);
245
+ }
246
246
  }
247
-
248
- Object.assign(ThemeIcon, {
249
- asCSSSelector: (icon: ThemeIcon) => originalAsCSSSelector(buildMappedIcon(icon)),
250
- asClassName: (icon: ThemeIcon) => originalAsClassName(buildMappedIcon(icon)),
251
- asClassNameArray: (icon: ThemeIcon) => originalAsClassNameArray(buildMappedIcon(icon))
252
- });
@@ -20,7 +20,7 @@ import { LabelProviderContribution, LabelProvider, URIIconReference } from '@the
20
20
  import { TreeLabelProvider } from '@theia/core/lib/browser/tree/tree-label-provider';
21
21
  import { TreeViewNode } from './tree-view-widget';
22
22
  import { TreeNode } from '@theia/core/lib/browser/tree/tree';
23
- import { ThemeIcon } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/themeService';
23
+ import { ThemeIcon } from '@theia/monaco-editor-core/esm/vs/base/common/themables';
24
24
 
25
25
  @injectable()
26
26
  export class PluginTreeViewNodeLabelProvider implements LabelProviderContribution {
@@ -40,14 +40,14 @@ import { DebugConsoleContribution } from '@theia/debug/lib/browser/console/debug
40
40
  import { TreeViewWidget } from './tree-view-widget';
41
41
  import { SEARCH_VIEW_CONTAINER_ID } from '@theia/search-in-workspace/lib/browser/search-in-workspace-factory';
42
42
  import { TEST_VIEW_CONTAINER_ID } from '@theia/test/lib/browser/view/test-view-contribution';
43
- import { ThemeIcon } from '@theia/monaco-editor-core/esm/vs/platform/theme/common/themeService';
44
43
  import { WebviewView, WebviewViewResolver } from '../webview-views/webview-views';
45
44
  import { WebviewWidget, WebviewWidgetIdentifier } from '../webview/webview';
46
45
  import { CancellationToken } from '@theia/core/lib/common/cancellation';
47
- import { v4 } from 'uuid';
46
+ import { generateUuid } from '@theia/core/lib/common/uuid';
48
47
  import { nls } from '@theia/core';
49
48
  import { TheiaDockPanel } from '@theia/core/lib/browser/shell/theia-dock-panel';
50
49
  import { Deferred } from '@theia/core/lib/common/promise-util';
50
+ import { ThemeIcon } from '@theia/monaco-editor-core/esm/vs/base/common/themables';
51
51
 
52
52
  export const PLUGIN_VIEW_FACTORY_ID = 'plugin-view';
53
53
  export const PLUGIN_VIEW_CONTAINER_FACTORY_ID = 'plugin-view-container';
@@ -440,7 +440,7 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
440
440
  protected async createNewWebviewView(viewId: string): Promise<WebviewView> {
441
441
  const webview = await this.widgetManager.getOrCreateWidget<WebviewWidget>(
442
442
  WebviewWidget.FACTORY_ID, <WebviewWidgetIdentifier>{
443
- id: v4(),
443
+ id: generateUuid(),
444
444
  viewId,
445
445
  });
446
446
  webview.setContentOptions({ allowScripts: true });
@@ -75,7 +75,6 @@ export class PluginViewWidget extends Panel implements StatefulWidget, Descripti
75
75
  this.id = this.options.id;
76
76
  const localContext = this.contextKeyService.createScoped(this.node);
77
77
  localContext.setContext('view', this.options.viewId);
78
- this.toDispose.push(localContext);
79
78
  }
80
79
 
81
80
  get onDidChangeDescription(): Event<void> {
@@ -669,7 +669,7 @@ export class TreeViewWidget extends TreeViewWelcomeWidget {
669
669
 
670
670
  this.model.proxy!.$dragStarted(this.options.id, selectedNodes.map(selected => selected.id), CancellationToken.None).then(maybeUris => {
671
671
  if (maybeUris) {
672
- this.applicationShell.addAdditionalDraggedEditorUris(maybeUris.map(URI.fromComponents));
672
+ this.applicationShell.addAdditionalDraggedEditorUris(maybeUris.map(uri => URI.fromComponents(uri)));
673
673
  }
674
674
  });
675
675
  }
@@ -921,8 +921,7 @@ export class TreeViewWidget extends TreeViewWelcomeWidget {
921
921
  menuPath: contextMenuPath,
922
922
  anchor: { x, y },
923
923
  args,
924
- contextKeyService,
925
- onHide: () => contextKeyService.dispose(),
924
+ contextKeyService
926
925
  }), 10);
927
926
  }
928
927
  }
@@ -17,13 +17,13 @@
17
17
  import { rejects } from 'assert';
18
18
  import { strictEqual } from 'assert/strict';
19
19
  import { promises as fs } from 'fs';
20
- import { v4 } from 'uuid';
20
+ import { generateUuid } from '@theia/core/lib/common/uuid';
21
21
  import { isENOENT } from '../../common/errors';
22
22
 
23
23
  describe('errors', () => {
24
24
  describe('errno-exception', () => {
25
25
  it('should be ENOENT error', async () => {
26
- await rejects(fs.readFile(v4()), reason => isENOENT(reason));
26
+ await rejects(fs.readFile(generateUuid()), reason => isENOENT(reason));
27
27
  });
28
28
 
29
29
  it('should not be ENOENT error (no code)', () => {
@@ -28,7 +28,7 @@ import { DEBUG_SCHEME, SCHEME_PATTERN } from '@theia/debug/lib/common/debug-uri-
28
28
  import { Disposable, Breakpoint as BreakpointExt, SourceBreakpoint, FunctionBreakpoint, Location, Range, URI as URIImpl } from '../types-impl';
29
29
  import { PluginDebugAdapterSession } from './plugin-debug-adapter-session';
30
30
  import { PluginDebugAdapterTracker } from './plugin-debug-adapter-tracker';
31
- import uuid = require('uuid');
31
+ import { generateUuid } from '@theia/core/lib/common/uuid';
32
32
  import { DebugAdapter } from '@theia/debug/lib/common/debug-model';
33
33
  import { PluginDebugAdapterCreator } from './plugin-debug-adapter-creator';
34
34
  import { NodeDebugAdapterCreator } from '../node/debug/plugin-node-debug-adapter-creator';
@@ -345,7 +345,7 @@ export class DebugExtImpl implements DebugExt {
345
345
  }
346
346
 
347
347
  async $createDebugSession(debugConfiguration: DebugConfiguration, workspaceFolderUri: string | undefined): Promise<string> {
348
- const sessionId = uuid.v4();
348
+ const sessionId = generateUuid();
349
349
 
350
350
  const parentSession = debugConfiguration.parentSessionId ? this.sessions.get(debugConfiguration.parentSessionId) : undefined;
351
351
  const theiaSession: theia.DebugSession = {
package/src/plugin/env.ts CHANGED
@@ -19,7 +19,7 @@ import * as theia from '@theia/plugin';
19
19
  import { RPCProtocol } from '../common/rpc-protocol';
20
20
  import { EnvMain, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
21
21
  import { QueryParameters } from '../common/env';
22
- import { v4 } from 'uuid';
22
+ import { generateUuid } from '@theia/core/lib/common/uuid';
23
23
 
24
24
  @injectable()
25
25
  export abstract class EnvExtImpl {
@@ -38,8 +38,8 @@ export abstract class EnvExtImpl {
38
38
  private _remoteName: string | undefined;
39
39
 
40
40
  constructor() {
41
- this.envSessionId = v4();
42
- this.envMachineId = v4();
41
+ this.envSessionId = generateUuid();
42
+ this.envMachineId = generateUuid();
43
43
  this._remoteName = undefined;
44
44
  }
45
45
 
@@ -41,6 +41,7 @@ import { commonPrefixLength } from '@theia/core/lib/common/strings';
41
41
  import { CharCode } from '@theia/core/lib/common/char-code';
42
42
  import { BinaryBuffer } from '@theia/core/lib/common/buffer';
43
43
  import { Emitter } from '@theia/core/shared/vscode-languageserver-protocol';
44
+ import { MarkdownString } from '../common/plugin-api-rpc-model';
44
45
 
45
46
  type IDisposable = vscode.Disposable;
46
47
 
@@ -223,7 +224,7 @@ export class FileSystemExtImpl implements FileSystemExt {
223
224
  this.onWillRegisterFileSystemProviderEmitter.dispose();
224
225
  }
225
226
 
226
- registerFileSystemProvider(scheme: string, provider: vscode.FileSystemProvider, options: { isCaseSensitive?: boolean, isReadonly?: boolean } = {}) {
227
+ registerFileSystemProvider(scheme: string, provider: vscode.FileSystemProvider, options: { isCaseSensitive?: boolean, isReadonly?: boolean | MarkdownString } = {}) {
227
228
 
228
229
  if (this._usedSchemes.has(scheme)) {
229
230
  throw new Error(`a provider for the scheme '${scheme}' is already registered`);
@@ -252,7 +253,19 @@ export class FileSystemExtImpl implements FileSystemExt {
252
253
  capabilities += files.FileSystemProviderCapabilities.FileOpenReadWriteClose;
253
254
  }
254
255
 
255
- this._proxy.$registerFileSystemProvider(handle, scheme, capabilities);
256
+ let readonlyMessage: MarkdownString | undefined;
257
+ if (options.isReadonly && MarkdownString.is(options.isReadonly)) {
258
+ readonlyMessage = {
259
+ value: options.isReadonly.value,
260
+ isTrusted: options.isReadonly.isTrusted,
261
+ supportThemeIcons: options.isReadonly.supportThemeIcons,
262
+ supportHtml: options.isReadonly.supportHtml,
263
+ baseUri: options.isReadonly.baseUri,
264
+ uris: options.isReadonly.uris
265
+ };
266
+ }
267
+
268
+ this._proxy.$registerFileSystemProvider(handle, scheme, capabilities, readonlyMessage);
256
269
 
257
270
  const subscription = provider.onDidChangeFile(event => {
258
271
  const mapped: IFileChangeDto[] = [];
@@ -261,6 +261,7 @@ export namespace KnownCommands {
261
261
  mappings['closeReferenceSearch'] = ['closeReferenceSearch', CONVERT_VSCODE_TO_MONACO];
262
262
  mappings['goToNextReference'] = ['goToNextReference', CONVERT_VSCODE_TO_MONACO];
263
263
  mappings['goToPreviousReference'] = ['goToPreviousReference', CONVERT_VSCODE_TO_MONACO];
264
+ mappings['setContext'] = ['_setContext', CONVERT_VSCODE_TO_MONACO];
264
265
 
265
266
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
266
267
  const CONVERT_MONACO_TO_VSCODE = (args: any | undefined) => {
@@ -22,7 +22,7 @@ import { MarkerData } from '../../common/plugin-api-rpc-model';
22
22
  import { RPCProtocol } from '../../common/rpc-protocol';
23
23
  import { PLUGIN_RPC_CONTEXT, LanguagesMain } from '../../common/plugin-api-rpc';
24
24
  import { URI } from '@theia/core/shared/vscode-uri';
25
- import { v4 } from 'uuid';
25
+ import { generateUuid } from '@theia/core/lib/common/uuid';
26
26
 
27
27
  export class DiagnosticCollection implements theia.DiagnosticCollection {
28
28
  private static DIAGNOSTICS_PRIORITY = [
@@ -288,7 +288,7 @@ export class Diagnostics {
288
288
  }
289
289
 
290
290
  private getNextId(): string {
291
- return v4();
291
+ return generateUuid();
292
292
  }
293
293
 
294
294
  private getAllDiagnosticsForResource(uri: URI): theia.Diagnostic[] {
@@ -33,7 +33,9 @@ export class LinkProviderAdapter {
33
33
  provideLinks(resource: URI, token: theia.CancellationToken): Promise<DocumentLink[] | undefined> {
34
34
  const document = this.documents.getDocumentData(resource);
35
35
  if (!document) {
36
- return Promise.reject(new Error(`There is no document for ${resource}`));
36
+ // not all documents are replicated to the plugin host (e.g. breakpoint input)
37
+ console.warn(`There is no document for ${resource}`);
38
+ return Promise.resolve(undefined);
37
39
  }
38
40
 
39
41
  const doc = document.document;
@@ -15,7 +15,7 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { Mutable } from '@theia/core';
18
- import { MarkdownStringImpl as BaseMarkdownString, MarkdownString as MarkdownStringInterface } from '@theia/core/lib/common/markdown-rendering';
18
+ import { MarkdownStringImpl as BaseMarkdownString, MarkdownString as MarkdownStringInterface, MarkdownStringTrustedOptions } from '@theia/core/lib/common/markdown-rendering';
19
19
  import * as pluginAPI from '@theia/plugin';
20
20
  import { es5ClassCompat } from '../common/types';
21
21
  import { URI } from './types-impl';
@@ -49,11 +49,11 @@ export class MarkdownString implements pluginAPI.MarkdownString {
49
49
  this.#delegate.value = value;
50
50
  }
51
51
 
52
- get isTrusted(): boolean | undefined {
52
+ get isTrusted(): boolean | MarkdownStringTrustedOptions | undefined {
53
53
  return this.#delegate.isTrusted;
54
54
  }
55
55
 
56
- set isTrusted(value: boolean | undefined) {
56
+ set isTrusted(value: boolean | MarkdownStringTrustedOptions | undefined) {
57
57
  this.#delegate.isTrusted = value;
58
58
  }
59
59
 
@@ -18,7 +18,7 @@ import { injectable } from '@theia/core/shared/inversify';
18
18
  import * as mac from 'macaddress';
19
19
  import { EnvExtImpl } from '../env';
20
20
  import { createHash } from 'crypto';
21
- import { v4 } from 'uuid';
21
+ import { generateUuid } from '@theia/core/lib/common/uuid';
22
22
  import fs = require('fs');
23
23
 
24
24
  /**
@@ -36,7 +36,7 @@ export class EnvNodeExtImpl extends EnvExtImpl {
36
36
 
37
37
  mac.one((err, macAddress) => {
38
38
  if (err) {
39
- this.macMachineId = v4();
39
+ this.macMachineId = generateUuid();
40
40
  } else {
41
41
  this.macMachineId = createHash('sha256').update(macAddress, 'utf8').digest('hex');
42
42
  }
@@ -18,14 +18,13 @@
18
18
  * Licensed under the MIT License. See License.txt in the project root for license information.
19
19
  *--------------------------------------------------------------------------------------------*/
20
20
 
21
- import { CancellationToken } from '@theia/plugin';
22
21
  import {
23
- CellExecuteUpdateDto, NotebookKernelDto, NotebookKernelsExt, NotebookKernelsMain, NotebookKernelSourceActionDto, NotebookOutputDto, PLUGIN_RPC_CONTEXT
22
+ CellExecuteUpdateDto, NotebookKernelDto, NotebookKernelsExt, NotebookKernelsMain,
23
+ NotebookKernelSourceActionDto, NotebookOutputDto, PluginModel, PluginPackage, PLUGIN_RPC_CONTEXT
24
24
  } from '../../common';
25
25
  import { RPCProtocol } from '../../common/rpc-protocol';
26
26
  import { UriComponents } from '../../common/uri-components';
27
- import * as theia from '@theia/plugin';
28
- import { CancellationTokenSource, Disposable, DisposableCollection, Emitter } from '@theia/core';
27
+ import { CancellationTokenSource, Disposable, DisposableCollection, Emitter, Path } from '@theia/core';
29
28
  import { Cell } from './notebook-document';
30
29
  import { NotebooksExtImpl } from './notebooks';
31
30
  import { NotebookCellOutputConverter, NotebookCellOutputItem, NotebookKernelSourceAction } from '../type-converters';
@@ -33,6 +32,8 @@ import { timeout, Deferred } from '@theia/core/lib/common/promise-util';
33
32
  import { CellExecutionUpdateType, NotebookCellExecutionState } from '@theia/notebook/lib/common';
34
33
  import { CommandRegistryImpl } from '../command-registry';
35
34
  import { NotebookCellOutput, NotebookRendererScript, URI } from '../types-impl';
35
+ import { toUriComponents } from '../../main/browser/hierarchy/hierarchy-types-converters';
36
+ import type * as theia from '@theia/plugin';
36
37
 
37
38
  interface KernelData {
38
39
  extensionId: string;
@@ -62,18 +63,18 @@ export class NotebookKernelsExtImpl implements NotebookKernelsExt {
62
63
  constructor(
63
64
  rpc: RPCProtocol,
64
65
  private readonly notebooks: NotebooksExtImpl,
65
- private readonly commands: CommandRegistryImpl
66
+ private readonly commands: CommandRegistryImpl,
66
67
  ) {
67
68
  this.proxy = rpc.getProxy(PLUGIN_RPC_CONTEXT.NOTEBOOK_KERNELS_MAIN);
68
69
  }
69
70
 
70
71
  private currentHandle = 0;
71
72
 
72
- createNotebookController(extensionId: string, id: string, viewType: string, label: string, handler?: (cells: theia.NotebookCell[],
73
+ createNotebookController(extension: PluginModel, id: string, viewType: string, label: string, handler?: (cells: theia.NotebookCell[],
73
74
  notebook: theia.NotebookDocument, controller: theia.NotebookController) => void | Thenable<void>, rendererScripts?: NotebookRendererScript[]): theia.NotebookController {
74
75
 
75
76
  for (const kernelData of this.kernelData.values()) {
76
- if (kernelData.controller.id === id && extensionId === kernelData.extensionId) {
77
+ if (kernelData.controller.id === id && extension.id === kernelData.extensionId) {
77
78
  throw new Error(`notebook controller with id '${id}' ALREADY exist`);
78
79
  }
79
80
  }
@@ -81,9 +82,9 @@ export class NotebookKernelsExtImpl implements NotebookKernelsExt {
81
82
  const handle = this.currentHandle++;
82
83
  const that = this;
83
84
 
84
- console.debug(`NotebookController[${handle}], CREATED by ${extensionId}, ${id}`);
85
+ console.debug(`NotebookController[${handle}], CREATED by ${extension.id}, ${id}`);
85
86
 
86
- const defaultExecuteHandler = () => console.warn(`NO execute handler from notebook controller '${data.id}' of extension: '${extensionId}'`);
87
+ const defaultExecuteHandler = () => console.warn(`NO execute handler from notebook controller '${data.id}' of extension: '${extension.id}'`);
87
88
 
88
89
  let isDisposed = false;
89
90
  const commandDisposables = new DisposableCollection();
@@ -92,10 +93,12 @@ export class NotebookKernelsExtImpl implements NotebookKernelsExt {
92
93
  const onDidReceiveMessage = new Emitter<{ editor: theia.NotebookEditor; message: unknown }>();
93
94
 
94
95
  const data: NotebookKernelDto = {
95
- id: createKernelId(extensionId, id),
96
+ id: createKernelId(extension.id, id),
96
97
  notebookType: viewType,
97
- extensionId: extensionId,
98
- label: label || extensionId,
98
+ extensionId: extension.id,
99
+ extensionLocation: toUriComponents(extension.packageUri),
100
+ label: label || extension.id,
101
+ preloads: rendererScripts?.map(preload => ({ uri: toUriComponents(preload.uri.toString()), provides: preload.provides })) ?? []
99
102
  };
100
103
 
101
104
  //
@@ -131,12 +134,11 @@ export class NotebookKernelsExtImpl implements NotebookKernelsExt {
131
134
  get id(): string { return id; },
132
135
  get notebookType(): string { return data.notebookType; },
133
136
  onDidChangeSelectedNotebooks: onDidChangeSelection.event,
134
- onDidReceiveMessage: onDidReceiveMessage.event,
135
137
  get label(): string {
136
138
  return data.label;
137
139
  },
138
140
  set label(value) {
139
- data.label = value ?? extensionId;
141
+ data.label = value ?? extension.id;
140
142
  update();
141
143
  },
142
144
  get detail(): string {
@@ -168,11 +170,7 @@ export class NotebookKernelsExtImpl implements NotebookKernelsExt {
168
170
  update();
169
171
  },
170
172
  get rendererScripts(): NotebookRendererScript[] {
171
- return data.rendererScripts ?? [];
172
- },
173
- set rendererScripts(value) {
174
- data.rendererScripts = value;
175
- update();
173
+ return data.preloads?.map(preload => (new NotebookRendererScript(URI.from(preload.uri), preload.provides))) ?? [];
176
174
  },
177
175
  get executeHandler(): (cells: theia.NotebookCell[], notebook: theia.NotebookDocument, controller: theia.NotebookController) => void | Thenable<void> {
178
176
  return executeHandler;
@@ -197,7 +195,7 @@ export class NotebookKernelsExtImpl implements NotebookKernelsExt {
197
195
  Array.from(associatedNotebooks.keys()).map(u => u.toString()));
198
196
  throw new Error(`notebook controller is NOT associated to notebook: ${cell.notebook.uri.toString()}`);
199
197
  }
200
- return that.createNotebookCellExecution(cell, createKernelId(extensionId, this.id));
198
+ return that.createNotebookCellExecution(cell, createKernelId(extension.id, this.id));
201
199
  },
202
200
  dispose: () => {
203
201
  if (!isDisposed) {
@@ -213,16 +211,18 @@ export class NotebookKernelsExtImpl implements NotebookKernelsExt {
213
211
  updateNotebookAffinity(notebook, priority): void {
214
212
  that.proxy.$updateNotebookPriority(handle, notebook.uri, priority);
215
213
  },
214
+ onDidReceiveMessage: onDidReceiveMessage.event,
216
215
  async postMessage(message: unknown, editor?: theia.NotebookEditor): Promise<boolean> {
217
- return Promise.resolve(true); // TODO needs implementation
216
+ return that.proxy.$postMessage(handle, 'notebook:' + editor?.notebook.uri.toString(), message);
218
217
  },
219
218
  asWebviewUri(localResource: theia.Uri): theia.Uri {
220
- throw new Error('Method not implemented.');
219
+ const basePath = PluginPackage.toPluginUrl(extension, '');
220
+ return URI.from({ path: new Path(basePath).join(localResource.path).toString(), scheme: 'https' });
221
221
  }
222
222
  };
223
223
 
224
224
  this.kernelData.set(handle, {
225
- extensionId: extensionId,
225
+ extensionId: extension.id,
226
226
  controller,
227
227
  onDidReceiveMessage,
228
228
  onDidChangeSelection,
@@ -376,7 +376,7 @@ export class NotebookKernelsExtImpl implements NotebookKernelsExt {
376
376
  // Proposed Api though seems needed by jupyter for telemetry
377
377
  }
378
378
 
379
- async $provideKernelSourceActions(handle: number, token: CancellationToken): Promise<NotebookKernelSourceActionDto[]> {
379
+ async $provideKernelSourceActions(handle: number, token: theia.CancellationToken): Promise<NotebookKernelSourceActionDto[]> {
380
380
  const provider = this.kernelSourceActionProviders.get(handle);
381
381
  if (provider) {
382
382
  const disposables = new DisposableCollection();
@@ -496,7 +496,7 @@ class NotebookCellExecutionTask implements Disposable {
496
496
  asApiObject(): theia.NotebookCellExecution {
497
497
  const that = this;
498
498
  const result: theia.NotebookCellExecution = {
499
- get token(): CancellationToken { return that.tokenSource.token; },
499
+ get token(): theia.CancellationToken { return that.tokenSource.token; },
500
500
  get cell(): theia.NotebookCell { return that.cell.apiCell; },
501
501
  get executionOrder(): number | undefined { return that.executionOrder; },
502
502
  set executionOrder(v: number | undefined) {
@@ -43,7 +43,6 @@ export class NotebookRenderersExtImpl implements NotebookRenderersExt {
43
43
  const messaging: theia.NotebookRendererMessaging = {
44
44
  onDidReceiveMessage: (listener, thisArg, disposables) => this.getOrCreateEmitterFor(rendererId).event(listener, thisArg, disposables),
45
45
  postMessage: (message, editorOrAlias) => {
46
-
47
46
  const extHostEditor = editorOrAlias && NotebookEditor.apiEditorsToExtHost.get(editorOrAlias);
48
47
  return this.proxy.$postMessage(extHostEditor?.id, rendererId, message);
49
48
  },
@@ -722,6 +722,13 @@ export function createAPIFactory(
722
722
  callbackOrToken?: CancellationToken | ((result: theia.TextSearchResult) => void), token?: CancellationToken): Promise<theia.TextSearchComplete> {
723
723
  return workspaceExt.findTextInFiles(query, optionsOrCallback, callbackOrToken, token);
724
724
  },
725
+ save(uri: theia.Uri): PromiseLike<theia.Uri | undefined> {
726
+ return editors.save(uri);
727
+ },
728
+
729
+ saveAs(uri: theia.Uri): PromiseLike<theia.Uri | undefined> {
730
+ return editors.saveAs(uri);
731
+ },
725
732
  saveAll(includeUntitled?: boolean): PromiseLike<boolean> {
726
733
  return editors.saveAll(includeUntitled);
727
734
  },
@@ -731,7 +738,8 @@ export function createAPIFactory(
731
738
  registerTextDocumentContentProvider(scheme: string, provider: theia.TextDocumentContentProvider): theia.Disposable {
732
739
  return workspaceExt.registerTextDocumentContentProvider(scheme, provider);
733
740
  },
734
- registerFileSystemProvider(scheme: string, provider: theia.FileSystemProvider, options?: { isCaseSensitive?: boolean, isReadonly?: boolean }): theia.Disposable {
741
+ registerFileSystemProvider(scheme: string, provider: theia.FileSystemProvider, options?: { isCaseSensitive?: boolean, isReadonly?: boolean | MarkdownString}):
742
+ theia.Disposable {
735
743
  return fileSystemExt.registerFileSystemProvider(scheme, provider, options);
736
744
  },
737
745
  getWorkspaceFolder(uri: theia.Uri): theia.WorkspaceFolder | undefined {
@@ -1176,7 +1184,7 @@ export function createAPIFactory(
1176
1184
  controller: theia.NotebookController) => void | Thenable<void>,
1177
1185
  rendererScripts?: NotebookRendererScript[]
1178
1186
  ) {
1179
- return notebookKernels.createNotebookController(plugin.model.id, id, notebookType, label, handler, rendererScripts);
1187
+ return notebookKernels.createNotebookController(plugin.model, id, notebookType, label, handler, rendererScripts);
1180
1188
  },
1181
1189
  createRendererMessaging(rendererId) {
1182
1190
  return notebookRenderers.createRendererMessaging(rendererId);
@@ -25,7 +25,7 @@ import { IConfigurationOverrides } from '@theia/monaco-editor-core/esm/vs/platfo
25
25
  import { Configuration, ConfigurationModel, ConfigurationModelParser } from '@theia/monaco-editor-core/esm/vs/platform/configuration/common/configurationModels';
26
26
  import { Workspace, WorkspaceFolder } from '@theia/monaco-editor-core/esm/vs/platform/workspace/common/workspace';
27
27
  import * as theia from '@theia/plugin';
28
- import { v4 } from 'uuid';
28
+ import { generateUuid } from '@theia/core/lib/common/uuid';
29
29
  import {
30
30
  PLUGIN_RPC_CONTEXT, PreferenceChangeExt, PreferenceData, PreferenceRegistryExt,
31
31
  PreferenceRegistryMain
@@ -75,7 +75,7 @@ function lookUp(tree: any, key: string): any {
75
75
  export class TheiaWorkspace extends Workspace {
76
76
  constructor(ext: WorkspaceExtImpl) {
77
77
  const folders = (ext.workspaceFolders ?? []).map(folder => new WorkspaceFolder(folder));
78
- super(v4(), folders, false, ext.workspaceFile ?? null, () => isOSX || isWindows);
78
+ super(generateUuid(), folders, false, ext.workspaceFile ?? null, () => isOSX || isWindows);
79
79
  }
80
80
  }
81
81