@theia/plugin-ext 1.46.1 → 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 (408) 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-documents-and-editors-main.d.ts +0 -1
  122. package/lib/main/browser/notebooks/notebook-documents-and-editors-main.d.ts.map +1 -1
  123. package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js +5 -7
  124. package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js.map +1 -1
  125. package/lib/main/browser/notebooks/notebook-kernels-main.d.ts +1 -0
  126. package/lib/main/browser/notebooks/notebook-kernels-main.d.ts.map +1 -1
  127. package/lib/main/browser/notebooks/notebook-kernels-main.js +41 -4
  128. package/lib/main/browser/notebooks/notebook-kernels-main.js.map +1 -1
  129. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +7 -2
  130. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -1
  131. package/lib/main/browser/notebooks/renderers/cell-output-webview.js +79 -45
  132. package/lib/main/browser/notebooks/renderers/cell-output-webview.js.map +1 -1
  133. package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts +1 -0
  134. package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -1
  135. package/lib/main/browser/notebooks/renderers/output-webview-internal.js +74 -1
  136. package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
  137. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts +10 -2
  138. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts.map +1 -1
  139. package/lib/main/browser/output-channel-registry-main.js +4 -12
  140. package/lib/main/browser/output-channel-registry-main.js.map +1 -1
  141. package/lib/main/browser/plugin-authentication-service.js +3 -11
  142. package/lib/main/browser/plugin-authentication-service.js.map +1 -1
  143. package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
  144. package/lib/main/browser/plugin-contribution-handler.js +66 -69
  145. package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
  146. package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
  147. package/lib/main/browser/plugin-ext-frontend-module.js +3 -1
  148. package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
  149. package/lib/main/browser/plugin-ext-widget.js +11 -19
  150. package/lib/main/browser/plugin-ext-widget.js.map +1 -1
  151. package/lib/main/browser/plugin-frontend-contribution.js +4 -12
  152. package/lib/main/browser/plugin-frontend-contribution.js.map +1 -1
  153. package/lib/main/browser/plugin-frontend-view-contribution.js +3 -11
  154. package/lib/main/browser/plugin-frontend-view-contribution.js.map +1 -1
  155. package/lib/main/browser/plugin-icon-service.d.ts +2 -5
  156. package/lib/main/browser/plugin-icon-service.d.ts.map +1 -1
  157. package/lib/main/browser/plugin-icon-service.js +10 -77
  158. package/lib/main/browser/plugin-icon-service.js.map +1 -1
  159. package/lib/main/browser/plugin-icon-theme-service.js +22 -30
  160. package/lib/main/browser/plugin-icon-theme-service.js.map +1 -1
  161. package/lib/main/browser/plugin-shared-style.js +8 -16
  162. package/lib/main/browser/plugin-shared-style.js.map +1 -1
  163. package/lib/main/browser/plugin-terminal-registry.js +2 -7
  164. package/lib/main/browser/plugin-terminal-registry.js.map +1 -1
  165. package/lib/main/browser/quick-open-main.d.ts +8 -7
  166. package/lib/main/browser/quick-open-main.d.ts.map +1 -1
  167. package/lib/main/browser/quick-open-main.js +51 -14
  168. package/lib/main/browser/quick-open-main.js.map +1 -1
  169. package/lib/main/browser/scm-main.js +3 -3
  170. package/lib/main/browser/scm-main.js.map +1 -1
  171. package/lib/main/browser/selection-provider-command.d.ts.map +1 -1
  172. package/lib/main/browser/selection-provider-command.js +5 -14
  173. package/lib/main/browser/selection-provider-command.js.map +1 -1
  174. package/lib/main/browser/test-main.d.ts +3 -1
  175. package/lib/main/browser/test-main.d.ts.map +1 -1
  176. package/lib/main/browser/test-main.js +29 -30
  177. package/lib/main/browser/test-main.js.map +1 -1
  178. package/lib/main/browser/text-editor-model-service.js +5 -16
  179. package/lib/main/browser/text-editor-model-service.js.map +1 -1
  180. package/lib/main/browser/text-editors-main.d.ts +4 -5
  181. package/lib/main/browser/text-editors-main.d.ts.map +1 -1
  182. package/lib/main/browser/text-editors-main.js +15 -9
  183. package/lib/main/browser/text-editors-main.js.map +1 -1
  184. package/lib/main/browser/theme-icon-override.js +13 -19
  185. package/lib/main/browser/theme-icon-override.js.map +1 -1
  186. package/lib/main/browser/view/dnd-file-content-store.js +2 -7
  187. package/lib/main/browser/view/dnd-file-content-store.js.map +1 -1
  188. package/lib/main/browser/view/plugin-tree-view-node-label-provider.js +8 -16
  189. package/lib/main/browser/view/plugin-tree-view-node-label-provider.js.map +1 -1
  190. package/lib/main/browser/view/plugin-view-registry.d.ts +2 -0
  191. package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
  192. package/lib/main/browser/view/plugin-view-registry.js +49 -44
  193. package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
  194. package/lib/main/browser/view/plugin-view-widget.d.ts.map +1 -1
  195. package/lib/main/browser/view/plugin-view-widget.js +16 -25
  196. package/lib/main/browser/view/plugin-view-widget.js.map +1 -1
  197. package/lib/main/browser/view/tree-view-decorator-service.js +6 -17
  198. package/lib/main/browser/view/tree-view-decorator-service.js.map +1 -1
  199. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  200. package/lib/main/browser/view/tree-view-widget.js +41 -50
  201. package/lib/main/browser/view/tree-view-widget.js.map +1 -1
  202. package/lib/main/browser/view/view-context-key-service.js +8 -16
  203. package/lib/main/browser/view/view-context-key-service.js.map +1 -1
  204. package/lib/main/browser/view-column-service.js +4 -15
  205. package/lib/main/browser/view-column-service.js.map +1 -1
  206. package/lib/main/browser/webview/webview-context-keys.js +10 -18
  207. package/lib/main/browser/webview/webview-context-keys.js.map +1 -1
  208. package/lib/main/browser/webview/webview-environment.js +8 -16
  209. package/lib/main/browser/webview/webview-environment.js.map +1 -1
  210. package/lib/main/browser/webview/webview-frontend-security-warnings.js +8 -16
  211. package/lib/main/browser/webview/webview-frontend-security-warnings.js.map +1 -1
  212. package/lib/main/browser/webview/webview-resource-cache.js +3 -11
  213. package/lib/main/browser/webview/webview-resource-cache.js.map +1 -1
  214. package/lib/main/browser/webview/webview-theme-data-provider.js +14 -22
  215. package/lib/main/browser/webview/webview-theme-data-provider.js.map +1 -1
  216. package/lib/main/browser/webview/webview.js +37 -45
  217. package/lib/main/browser/webview/webview.js.map +1 -1
  218. package/lib/main/browser/webview-views/webview-views-main.js +3 -11
  219. package/lib/main/browser/webview-views/webview-views-main.js.map +1 -1
  220. package/lib/main/browser/workspace-main.js +2 -7
  221. package/lib/main/browser/workspace-main.js.map +1 -1
  222. package/lib/main/common/plugin-theia-environment.js +4 -12
  223. package/lib/main/common/plugin-theia-environment.js.map +1 -1
  224. package/lib/main/node/errors.spec.js +2 -2
  225. package/lib/main/node/errors.spec.js.map +1 -1
  226. package/lib/main/node/handlers/plugin-theia-directory-handler.js +6 -14
  227. package/lib/main/node/handlers/plugin-theia-directory-handler.js.map +1 -1
  228. package/lib/main/node/handlers/plugin-theia-file-handler.js +5 -13
  229. package/lib/main/node/handlers/plugin-theia-file-handler.js.map +1 -1
  230. package/lib/main/node/paths/plugin-paths-service.js +10 -18
  231. package/lib/main/node/paths/plugin-paths-service.js.map +1 -1
  232. package/lib/main/node/plugin-cli-contribution.js +2 -7
  233. package/lib/main/node/plugin-cli-contribution.js.map +1 -1
  234. package/lib/main/node/plugin-deployer-contribution.js +6 -14
  235. package/lib/main/node/plugin-deployer-contribution.js.map +1 -1
  236. package/lib/main/node/plugin-deployer-impl.js +18 -26
  237. package/lib/main/node/plugin-deployer-impl.js.map +1 -1
  238. package/lib/main/node/plugin-deployer-proxy-entry-impl.js +3 -11
  239. package/lib/main/node/plugin-deployer-proxy-entry-impl.js.map +1 -1
  240. package/lib/main/node/plugin-github-resolver.js +5 -13
  241. package/lib/main/node/plugin-github-resolver.js.map +1 -1
  242. package/lib/main/node/plugin-http-resolver.js +5 -13
  243. package/lib/main/node/plugin-http-resolver.js.map +1 -1
  244. package/lib/main/node/plugin-localization-server.js +4 -12
  245. package/lib/main/node/plugin-localization-server.js.map +1 -1
  246. package/lib/main/node/plugin-mgmt-cli-contribution.js +4 -12
  247. package/lib/main/node/plugin-mgmt-cli-contribution.js.map +1 -1
  248. package/lib/main/node/plugin-server-handler.js +6 -14
  249. package/lib/main/node/plugin-server-handler.js.map +1 -1
  250. package/lib/main/node/plugin-service.js +10 -18
  251. package/lib/main/node/plugin-service.js.map +1 -1
  252. package/lib/main/node/plugin-theia-deployer-participant.js +4 -12
  253. package/lib/main/node/plugin-theia-deployer-participant.js.map +1 -1
  254. package/lib/main/node/plugin-uninstallation-manager.js +2 -7
  255. package/lib/main/node/plugin-uninstallation-manager.js.map +1 -1
  256. package/lib/main/node/plugins-key-value-storage.js +12 -20
  257. package/lib/main/node/plugins-key-value-storage.js.map +1 -1
  258. package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.js +2 -7
  259. package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.js.map +1 -1
  260. package/lib/main/node/resolvers/local-plugin-deployer-resolver.js +2 -7
  261. package/lib/main/node/resolvers/local-plugin-deployer-resolver.js.map +1 -1
  262. package/lib/main/node/webview-backend-security-warnings.js +2 -7
  263. package/lib/main/node/webview-backend-security-warnings.js.map +1 -1
  264. package/lib/plugin/clipboard-ext.js +8 -16
  265. package/lib/plugin/clipboard-ext.js.map +1 -1
  266. package/lib/plugin/custom-editors.js +1 -1
  267. package/lib/plugin/custom-editors.js.map +1 -1
  268. package/lib/plugin/debug/debug-ext.js +11 -19
  269. package/lib/plugin/debug/debug-ext.js.map +1 -1
  270. package/lib/plugin/editors-and-documents.js +4 -12
  271. package/lib/plugin/editors-and-documents.js.map +1 -1
  272. package/lib/plugin/env.js +12 -20
  273. package/lib/plugin/env.js.map +1 -1
  274. package/lib/plugin/file-system-ext-impl.d.ts +2 -1
  275. package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
  276. package/lib/plugin/file-system-ext-impl.js +13 -1
  277. package/lib/plugin/file-system-ext-impl.js.map +1 -1
  278. package/lib/plugin/known-commands.d.ts.map +1 -1
  279. package/lib/plugin/known-commands.js +1 -0
  280. package/lib/plugin/known-commands.js.map +1 -1
  281. package/lib/plugin/languages/diagnostics.js +2 -2
  282. package/lib/plugin/languages/diagnostics.js.map +1 -1
  283. package/lib/plugin/languages/link-provider.d.ts.map +1 -1
  284. package/lib/plugin/languages/link-provider.js +3 -1
  285. package/lib/plugin/languages/link-provider.js.map +1 -1
  286. package/lib/plugin/localization-ext.js +8 -16
  287. package/lib/plugin/localization-ext.js.map +1 -1
  288. package/lib/plugin/markdown-string.d.ts +3 -3
  289. package/lib/plugin/markdown-string.d.ts.map +1 -1
  290. package/lib/plugin/markdown-string.js +17 -36
  291. package/lib/plugin/markdown-string.js.map +1 -1
  292. package/lib/plugin/message-registry.js +8 -16
  293. package/lib/plugin/message-registry.js.map +1 -1
  294. package/lib/plugin/node/env-node-ext.js +5 -13
  295. package/lib/plugin/node/env-node-ext.js.map +1 -1
  296. package/lib/plugin/notebook/notebook-kernels.d.ts +5 -6
  297. package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
  298. package/lib/plugin/notebook/notebook-kernels.js +24 -23
  299. package/lib/plugin/notebook/notebook-kernels.js.map +1 -1
  300. package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
  301. package/lib/plugin/notebook/notebook-renderers.js.map +1 -1
  302. package/lib/plugin/notebook/notebooks.d.ts +1 -0
  303. package/lib/plugin/notebook/notebooks.d.ts.map +1 -1
  304. package/lib/plugin/notebook/notebooks.js +19 -0
  305. package/lib/plugin/notebook/notebooks.js.map +1 -1
  306. package/lib/plugin/plugin-context.d.ts.map +1 -1
  307. package/lib/plugin/plugin-context.js +18 -21
  308. package/lib/plugin/plugin-context.js.map +1 -1
  309. package/lib/plugin/plugin-manager.js +23 -31
  310. package/lib/plugin/plugin-manager.js.map +1 -1
  311. package/lib/plugin/plugin-storage.js +4 -15
  312. package/lib/plugin/plugin-storage.js.map +1 -1
  313. package/lib/plugin/preference-registry.js +12 -20
  314. package/lib/plugin/preference-registry.js.map +1 -1
  315. package/lib/plugin/quick-open.d.ts +2 -9
  316. package/lib/plugin/quick-open.d.ts.map +1 -1
  317. package/lib/plugin/quick-open.js +6 -22
  318. package/lib/plugin/quick-open.js.map +1 -1
  319. package/lib/plugin/secrets-ext.js +4 -15
  320. package/lib/plugin/secrets-ext.js.map +1 -1
  321. package/lib/plugin/terminal-ext.js +6 -17
  322. package/lib/plugin/terminal-ext.js.map +1 -1
  323. package/lib/plugin/test-item.js +17 -25
  324. package/lib/plugin/test-item.js.map +1 -1
  325. package/lib/plugin/tests.d.ts +8 -1
  326. package/lib/plugin/tests.d.ts.map +1 -1
  327. package/lib/plugin/tests.js +35 -21
  328. package/lib/plugin/tests.js.map +1 -1
  329. package/lib/plugin/text-editors.d.ts +2 -0
  330. package/lib/plugin/text-editors.d.ts.map +1 -1
  331. package/lib/plugin/text-editors.js +6 -0
  332. package/lib/plugin/text-editors.js.map +1 -1
  333. package/lib/plugin/type-converters.d.ts +10 -1
  334. package/lib/plugin/type-converters.d.ts.map +1 -1
  335. package/lib/plugin/type-converters.js +49 -10
  336. package/lib/plugin/type-converters.js.map +1 -1
  337. package/lib/plugin/types-impl.d.ts +2 -2
  338. package/lib/plugin/types-impl.d.ts.map +1 -1
  339. package/lib/plugin/types-impl.js +167 -180
  340. package/lib/plugin/types-impl.js.map +1 -1
  341. package/lib/plugin/webviews.d.ts +14 -1
  342. package/lib/plugin/webviews.d.ts.map +1 -1
  343. package/lib/plugin/webviews.js +32 -24
  344. package/lib/plugin/webviews.js.map +1 -1
  345. package/lib/plugin/workspace.js +12 -20
  346. package/lib/plugin/workspace.js.map +1 -1
  347. package/package.json +31 -31
  348. package/src/common/plugin-api-rpc-model.ts +1 -1
  349. package/src/common/plugin-api-rpc.ts +36 -20
  350. package/src/common/plugin-protocol.ts +12 -1
  351. package/src/common/uri-components.ts +1 -5
  352. package/src/hosted/browser/hosted-plugin.ts +2 -2
  353. package/src/hosted/node/hosted-plugin-deployer-handler.ts +2 -2
  354. package/src/hosted/node/scanners/scanner-theia.ts +8 -2
  355. package/src/main/browser/command-registry-main.ts +7 -0
  356. package/src/main/browser/comments/comments-contribution.ts +7 -3
  357. package/src/main/browser/comments/comments-main.ts +2 -2
  358. package/src/main/browser/custom-editors/custom-editor-opener.tsx +2 -2
  359. package/src/main/browser/custom-editors/custom-editor-widget.ts +3 -1
  360. package/src/main/browser/custom-editors/custom-editors-main.ts +1 -1
  361. package/src/main/browser/data-transfer/data-transfer-type-converters.ts +4 -6
  362. package/src/main/browser/editors-and-documents-main.ts +27 -5
  363. package/src/main/browser/file-system-main-impl.ts +9 -5
  364. package/src/main/browser/languages-main.ts +9 -5
  365. package/src/main/browser/main-context.ts +1 -3
  366. package/src/main/browser/menus/menus-contribution-handler.ts +1 -1
  367. package/src/main/browser/menus/plugin-menu-command-adapter.ts +4 -1
  368. package/src/main/browser/menus/vscode-theia-menu-mappings.ts +10 -2
  369. package/src/main/browser/notebooks/notebook-documents-and-editors-main.ts +5 -8
  370. package/src/main/browser/notebooks/notebook-kernels-main.ts +46 -5
  371. package/src/main/browser/notebooks/renderers/cell-output-webview.tsx +72 -21
  372. package/src/main/browser/notebooks/renderers/output-webview-internal.ts +93 -2
  373. package/src/main/browser/notebooks/renderers/webview-communication.ts +12 -2
  374. package/src/main/browser/plugin-contribution-handler.ts +9 -1
  375. package/src/main/browser/plugin-ext-frontend-module.ts +6 -2
  376. package/src/main/browser/plugin-icon-service.ts +8 -72
  377. package/src/main/browser/quick-open-main.ts +77 -28
  378. package/src/main/browser/scm-main.ts +1 -1
  379. package/src/main/browser/selection-provider-command.ts +1 -2
  380. package/src/main/browser/test-main.ts +11 -2
  381. package/src/main/browser/text-editors-main.ts +18 -10
  382. package/src/main/browser/theme-icon-override.ts +13 -19
  383. package/src/main/browser/view/plugin-tree-view-node-label-provider.ts +1 -1
  384. package/src/main/browser/view/plugin-view-registry.ts +21 -6
  385. package/src/main/browser/view/plugin-view-widget.ts +0 -1
  386. package/src/main/browser/view/tree-view-widget.tsx +2 -3
  387. package/src/main/node/errors.spec.ts +2 -2
  388. package/src/plugin/custom-editors.ts +1 -1
  389. package/src/plugin/debug/debug-ext.ts +2 -2
  390. package/src/plugin/env.ts +3 -3
  391. package/src/plugin/file-system-ext-impl.ts +15 -2
  392. package/src/plugin/known-commands.ts +1 -0
  393. package/src/plugin/languages/diagnostics.ts +2 -2
  394. package/src/plugin/languages/link-provider.ts +3 -1
  395. package/src/plugin/markdown-string.ts +3 -3
  396. package/src/plugin/node/env-node-ext.ts +2 -2
  397. package/src/plugin/notebook/notebook-kernels.ts +29 -29
  398. package/src/plugin/notebook/notebook-renderers.ts +0 -1
  399. package/src/plugin/notebook/notebooks.ts +20 -0
  400. package/src/plugin/plugin-context.ts +12 -3
  401. package/src/plugin/preference-registry.ts +2 -2
  402. package/src/plugin/quick-open.ts +10 -24
  403. package/src/plugin/terminal-ext.ts +1 -1
  404. package/src/plugin/tests.ts +33 -4
  405. package/src/plugin/text-editors.ts +9 -2
  406. package/src/plugin/type-converters.ts +45 -9
  407. package/src/plugin/types-impl.ts +4 -4
  408. package/src/plugin/webviews.ts +22 -5
@@ -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';
@@ -109,6 +109,16 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
109
109
 
110
110
  private readonly webviewViewRevivals = new Map<string, { readonly webview: WebviewView; readonly revival: Deferred<void> }>();
111
111
 
112
+ private nextViewContainerId = 0;
113
+
114
+ private static readonly BUILTIN_VIEW_CONTAINERS = new Set<string>([
115
+ 'explorer',
116
+ 'scm',
117
+ 'search',
118
+ 'test',
119
+ 'debug'
120
+ ]);
121
+
112
122
  private static readonly ID_MAPPINGS: Map<string, string> = new Map([
113
123
  // VS Code Viewlets
114
124
  [EXPLORER_VIEW_CONTAINER_ID, 'workbench.view.explorer'],
@@ -266,14 +276,15 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
266
276
  }
267
277
 
268
278
  registerViewContainer(location: string, viewContainer: ViewContainer): Disposable {
269
- if (this.viewContainers.has(viewContainer.id)) {
279
+ const containerId = `workbench.view.extension.${viewContainer.id}`;
280
+ if (this.viewContainers.has(containerId)) {
270
281
  console.warn('view container such id already registered: ', JSON.stringify(viewContainer));
271
282
  return Disposable.NULL;
272
283
  }
273
284
  const toDispose = new DisposableCollection();
274
285
  const containerClass = 'theia-plugin-view-container';
275
286
  let themeIconClass = '';
276
- const iconClass = 'plugin-view-container-icon-' + viewContainer.id;
287
+ const iconClass = 'plugin-view-container-icon-' + this.nextViewContainerId++; // having dots in class would not work for css, so we need to generate an id.
277
288
 
278
289
  if (viewContainer.themeIcon) {
279
290
  const icon = ThemeIcon.fromString(viewContainer.themeIcon);
@@ -290,7 +301,7 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
290
301
  `));
291
302
  }
292
303
 
293
- toDispose.push(this.doRegisterViewContainer(viewContainer.id, location, {
304
+ toDispose.push(this.doRegisterViewContainer(containerId, location, {
294
305
  label: viewContainer.title,
295
306
  // The container class automatically sets a mask; if we're using a theme icon, we don't want one.
296
307
  iconClass: (themeIconClass || containerClass) + ' ' + iconClass,
@@ -349,6 +360,10 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
349
360
  }
350
361
 
351
362
  registerView(viewContainerId: string, view: View): Disposable {
363
+ if (!PluginViewRegistry.BUILTIN_VIEW_CONTAINERS.has(viewContainerId)) {
364
+ // if it's not a built-in view container, it must be a contributed view container, see https://github.com/eclipse-theia/theia/issues/13249
365
+ viewContainerId = `workbench.view.extension.${viewContainerId}`;
366
+ }
352
367
  if (this.views.has(view.id)) {
353
368
  console.warn('view with such id already registered: ', JSON.stringify(view));
354
369
  return Disposable.NULL;
@@ -425,7 +440,7 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
425
440
  protected async createNewWebviewView(viewId: string): Promise<WebviewView> {
426
441
  const webview = await this.widgetManager.getOrCreateWidget<WebviewWidget>(
427
442
  WebviewWidget.FACTORY_ID, <WebviewWidgetIdentifier>{
428
- id: v4(),
443
+ id: generateUuid(),
429
444
  viewId,
430
445
  });
431
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)', () => {
@@ -129,7 +129,7 @@ export class CustomEditorsExtImpl implements CustomEditorsExt {
129
129
  if (!entry) {
130
130
  throw new Error(`No provider found for '${viewType}'`);
131
131
  }
132
- const panel = this.webviewExt.createWebviewPanel(viewType, title, {}, options, entry.plugin, handler);
132
+ const panel = this.webviewExt.createWebviewPanel(viewType, title, {}, options, entry.plugin, handler, false);
133
133
  const webviewOptions = WebviewImpl.toWebviewOptions(options, this.workspace, entry.plugin);
134
134
  await this.proxy.$createCustomEditorPanel(handler, title, widgetOpenerOptions, webviewOptions);
135
135
 
@@ -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
  }