@theia/plugin-ext 1.68.0-next.9 → 1.68.1

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 (413) hide show
  1. package/lib/common/arrays.js +5 -6
  2. package/lib/common/arrays.js.map +1 -1
  3. package/lib/common/assert.js +1 -2
  4. package/lib/common/assert.js.map +1 -1
  5. package/lib/common/cache.js +1 -1
  6. package/lib/common/cache.js.map +1 -1
  7. package/lib/common/collections.js +2 -3
  8. package/lib/common/collections.js.map +1 -1
  9. package/lib/common/disposable-util.js +1 -2
  10. package/lib/common/disposable-util.js.map +1 -1
  11. package/lib/common/editor-options.js +2 -2
  12. package/lib/common/editor-options.js.map +1 -1
  13. package/lib/common/errors.d.ts.map +1 -1
  14. package/lib/common/errors.js +4 -5
  15. package/lib/common/errors.js.map +1 -1
  16. package/lib/common/lm-protocol.d.ts.map +1 -1
  17. package/lib/common/objects.js +1 -2
  18. package/lib/common/objects.js.map +1 -1
  19. package/lib/common/paths-util.js +3 -4
  20. package/lib/common/paths-util.js.map +1 -1
  21. package/lib/common/plugin-api-rpc-model.d.ts +13 -0
  22. package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
  23. package/lib/common/plugin-api-rpc-model.js +9 -4
  24. package/lib/common/plugin-api-rpc-model.js.map +1 -1
  25. package/lib/common/plugin-api-rpc.d.ts +19 -3
  26. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  27. package/lib/common/plugin-api-rpc.js.map +1 -1
  28. package/lib/common/plugin-protocol.d.ts +0 -1
  29. package/lib/common/plugin-protocol.d.ts.map +1 -1
  30. package/lib/common/plugin-protocol.js +3 -3
  31. package/lib/common/plugin-protocol.js.map +1 -1
  32. package/lib/common/rpc-protocol.js +3 -3
  33. package/lib/common/rpc-protocol.js.map +1 -1
  34. package/lib/common/semantic-tokens-dto.js +2 -3
  35. package/lib/common/semantic-tokens-dto.js.map +1 -1
  36. package/lib/common/types.js +8 -8
  37. package/lib/common/types.js.map +1 -1
  38. package/lib/common/uint.js +1 -2
  39. package/lib/common/uint.js.map +1 -1
  40. package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
  41. package/lib/hosted/browser/hosted-plugin.js +27 -28
  42. package/lib/hosted/browser/hosted-plugin.js.map +1 -1
  43. package/lib/hosted/browser/worker/debug-stub.js +1 -2
  44. package/lib/hosted/browser/worker/debug-stub.js.map +1 -1
  45. package/lib/hosted/browser/worker/plugin-manifest-loader.js +2 -4
  46. package/lib/hosted/browser/worker/plugin-manifest-loader.js.map +1 -1
  47. package/lib/hosted/common/hosted-plugin.d.ts +0 -1
  48. package/lib/hosted/common/hosted-plugin.d.ts.map +1 -1
  49. package/lib/hosted/common/hosted-plugin.js +6 -7
  50. package/lib/hosted/common/hosted-plugin.js.map +1 -1
  51. package/lib/hosted/node/hosted-plugin-cli-contribution.d.ts +0 -1
  52. package/lib/hosted/node/hosted-plugin-cli-contribution.d.ts.map +1 -1
  53. package/lib/hosted/node/hosted-plugin-cli-contribution.js +5 -4
  54. package/lib/hosted/node/hosted-plugin-cli-contribution.js.map +1 -1
  55. package/lib/hosted/node/hosted-plugin-localization-service.js +10 -15
  56. package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -1
  57. package/lib/hosted/node/hosted-plugin-process.js +1 -1
  58. package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
  59. package/lib/hosted/node/plugin-activation-events.js +1 -2
  60. package/lib/hosted/node/plugin-activation-events.js.map +1 -1
  61. package/lib/hosted/node/plugin-deployer-handler-impl.js +5 -8
  62. package/lib/hosted/node/plugin-deployer-handler-impl.js.map +1 -1
  63. package/lib/hosted/node/plugin-ext-hosted-backend-module.js +2 -3
  64. package/lib/hosted/node/plugin-ext-hosted-backend-module.js.map +1 -1
  65. package/lib/hosted/node/plugin-host-logger.js +1 -2
  66. package/lib/hosted/node/plugin-host-logger.js.map +1 -1
  67. package/lib/hosted/node/plugin-host-module.js +1 -2
  68. package/lib/hosted/node/plugin-host-module.js.map +1 -1
  69. package/lib/hosted/node/plugin-host-proxy.js +3 -4
  70. package/lib/hosted/node/plugin-host-proxy.js.map +1 -1
  71. package/lib/hosted/node/plugin-host.js +1 -1
  72. package/lib/hosted/node/plugin-host.js.map +1 -1
  73. package/lib/hosted/node/plugin-language-pack-service.js +2 -4
  74. package/lib/hosted/node/plugin-language-pack-service.js.map +1 -1
  75. package/lib/hosted/node/plugin-manifest-loader.js +2 -4
  76. package/lib/hosted/node/plugin-manifest-loader.js.map +1 -1
  77. package/lib/hosted/node/plugin-reader.d.ts +0 -1
  78. package/lib/hosted/node/plugin-reader.d.ts.map +1 -1
  79. package/lib/hosted/node/plugin-require-override.js +1 -2
  80. package/lib/hosted/node/plugin-require-override.js.map +1 -1
  81. package/lib/hosted/node/plugin-service.js +3 -5
  82. package/lib/hosted/node/plugin-service.js.map +1 -1
  83. package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
  84. package/lib/hosted/node/scanners/scanner-theia.js +6 -12
  85. package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
  86. package/lib/hosted/node-electron/plugin-ext-hosted-electron-backend-module.js +1 -2
  87. package/lib/hosted/node-electron/plugin-ext-hosted-electron-backend-module.js.map +1 -1
  88. package/lib/main/browser/authentication-main.js +6 -7
  89. package/lib/main/browser/authentication-main.js.map +1 -1
  90. package/lib/main/browser/commands.js +3 -3
  91. package/lib/main/browser/commands.js.map +1 -1
  92. package/lib/main/browser/comments/comment-thread-widget.d.ts +0 -1
  93. package/lib/main/browser/comments/comment-thread-widget.d.ts.map +1 -1
  94. package/lib/main/browser/comments/comment-thread-widget.js +14 -22
  95. package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
  96. package/lib/main/browser/comments/comments-contribution.js +1 -2
  97. package/lib/main/browser/comments/comments-contribution.js.map +1 -1
  98. package/lib/main/browser/comments/comments-main.js +2 -2
  99. package/lib/main/browser/comments/comments-main.js.map +1 -1
  100. package/lib/main/browser/custom-editors/custom-editor-opener.js +8 -9
  101. package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
  102. package/lib/main/browser/custom-editors/custom-editor-service.js +3 -3
  103. package/lib/main/browser/custom-editors/custom-editor-service.js.map +1 -1
  104. package/lib/main/browser/custom-editors/custom-editor-widget.js +6 -7
  105. package/lib/main/browser/custom-editors/custom-editor-widget.js.map +1 -1
  106. package/lib/main/browser/custom-editors/custom-editors-main.js +1 -2
  107. package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
  108. package/lib/main/browser/debug/debug-main.js +1 -2
  109. package/lib/main/browser/debug/debug-main.js.map +1 -1
  110. package/lib/main/browser/debug/plugin-debug-service.d.ts +0 -1
  111. package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
  112. package/lib/main/browser/decorations/decorations-main.js +2 -2
  113. package/lib/main/browser/decorations/decorations-main.js.map +1 -1
  114. package/lib/main/browser/dialogs-main.js +1 -2
  115. package/lib/main/browser/dialogs-main.js.map +1 -1
  116. package/lib/main/browser/documents-main.js +6 -7
  117. package/lib/main/browser/documents-main.js.map +1 -1
  118. package/lib/main/browser/editors-and-documents-main.js +3 -4
  119. package/lib/main/browser/editors-and-documents-main.js.map +1 -1
  120. package/lib/main/browser/env-main.js +2 -2
  121. package/lib/main/browser/env-main.js.map +1 -1
  122. package/lib/main/browser/file-system-main-impl.js +1 -1
  123. package/lib/main/browser/file-system-main-impl.js.map +1 -1
  124. package/lib/main/browser/hierarchy/hierarchy-types-converters.js +15 -15
  125. package/lib/main/browser/hierarchy/hierarchy-types-converters.js.map +1 -1
  126. package/lib/main/browser/languages-main.d.ts +2 -2
  127. package/lib/main/browser/languages-main.d.ts.map +1 -1
  128. package/lib/main/browser/languages-main.js +14 -10
  129. package/lib/main/browser/languages-main.js.map +1 -1
  130. package/lib/main/browser/localization-main.js +1 -2
  131. package/lib/main/browser/localization-main.js.map +1 -1
  132. package/lib/main/browser/main-context.js +1 -2
  133. package/lib/main/browser/main-context.js.map +1 -1
  134. package/lib/main/browser/main-file-system-event-service.js +2 -2
  135. package/lib/main/browser/main-file-system-event-service.js.map +1 -1
  136. package/lib/main/browser/menus/menus-contribution-handler.js +2 -3
  137. package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
  138. package/lib/main/browser/menus/plugin-menu-command-adapter.js +2 -4
  139. package/lib/main/browser/menus/plugin-menu-command-adapter.js.map +1 -1
  140. package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js +8 -9
  141. package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js.map +1 -1
  142. package/lib/main/browser/notebooks/notebook-documents-main.js +1 -2
  143. package/lib/main/browser/notebooks/notebook-documents-main.js.map +1 -1
  144. package/lib/main/browser/notebooks/notebook-editors-main.js +2 -3
  145. package/lib/main/browser/notebooks/notebook-editors-main.js.map +1 -1
  146. package/lib/main/browser/notebooks/notebook-kernels-main.js +8 -11
  147. package/lib/main/browser/notebooks/notebook-kernels-main.js.map +1 -1
  148. package/lib/main/browser/notebooks/notebooks-main.js +5 -8
  149. package/lib/main/browser/notebooks/notebooks-main.js.map +1 -1
  150. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +0 -1
  151. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -1
  152. package/lib/main/browser/notebooks/renderers/cell-output-webview.js +7 -10
  153. package/lib/main/browser/notebooks/renderers/cell-output-webview.js.map +1 -1
  154. package/lib/main/browser/notebooks/renderers/output-webview-internal.js +15 -23
  155. package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
  156. package/lib/main/browser/plugin-authentication-service.js +2 -2
  157. package/lib/main/browser/plugin-authentication-service.js.map +1 -1
  158. package/lib/main/browser/plugin-contribution-handler.js +6 -9
  159. package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
  160. package/lib/main/browser/plugin-ext-widget.d.ts +0 -1
  161. package/lib/main/browser/plugin-ext-widget.d.ts.map +1 -1
  162. package/lib/main/browser/plugin-frontend-contribution.js +7 -6
  163. package/lib/main/browser/plugin-frontend-contribution.js.map +1 -1
  164. package/lib/main/browser/plugin-frontend-view-contribution.js +3 -2
  165. package/lib/main/browser/plugin-frontend-view-contribution.js.map +1 -1
  166. package/lib/main/browser/plugin-icon-theme-service.d.ts +0 -1
  167. package/lib/main/browser/plugin-icon-theme-service.d.ts.map +1 -1
  168. package/lib/main/browser/plugin-icon-theme-service.js +1 -2
  169. package/lib/main/browser/plugin-icon-theme-service.js.map +1 -1
  170. package/lib/main/browser/plugin-shared-style.js +2 -3
  171. package/lib/main/browser/plugin-shared-style.js.map +1 -1
  172. package/lib/main/browser/plugin-storage.js +1 -2
  173. package/lib/main/browser/plugin-storage.js.map +1 -1
  174. package/lib/main/browser/preference-registry-main.d.ts.map +1 -1
  175. package/lib/main/browser/preference-registry-main.js +5 -4
  176. package/lib/main/browser/preference-registry-main.js.map +1 -1
  177. package/lib/main/browser/quick-open-main.js +3 -5
  178. package/lib/main/browser/quick-open-main.js.map +1 -1
  179. package/lib/main/browser/scm-main.d.ts +8 -2
  180. package/lib/main/browser/scm-main.d.ts.map +1 -1
  181. package/lib/main/browser/scm-main.js +33 -1
  182. package/lib/main/browser/scm-main.js.map +1 -1
  183. package/lib/main/browser/tabs/tabs-main.js +8 -15
  184. package/lib/main/browser/tabs/tabs-main.js.map +1 -1
  185. package/lib/main/browser/tasks-main.js +1 -1
  186. package/lib/main/browser/tasks-main.js.map +1 -1
  187. package/lib/main/browser/terminal-main.js +4 -7
  188. package/lib/main/browser/terminal-main.js.map +1 -1
  189. package/lib/main/browser/test-main.js +5 -9
  190. package/lib/main/browser/test-main.js.map +1 -1
  191. package/lib/main/browser/text-editor-main.js +2 -4
  192. package/lib/main/browser/text-editor-main.js.map +1 -1
  193. package/lib/main/browser/text-editors-main.js +3 -3
  194. package/lib/main/browser/text-editors-main.js.map +1 -1
  195. package/lib/main/browser/uri-main.js +2 -4
  196. package/lib/main/browser/uri-main.js.map +1 -1
  197. package/lib/main/browser/view/dnd-file-content-store.js +3 -2
  198. package/lib/main/browser/view/dnd-file-content-store.js.map +1 -1
  199. package/lib/main/browser/view/plugin-view-registry.js +33 -38
  200. package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
  201. package/lib/main/browser/view/tree-view-decorator-service.js +2 -2
  202. package/lib/main/browser/view/tree-view-decorator-service.js.map +1 -1
  203. package/lib/main/browser/view/tree-view-widget.d.ts +0 -1
  204. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  205. package/lib/main/browser/view/tree-view-widget.js +11 -16
  206. package/lib/main/browser/view/tree-view-widget.js.map +1 -1
  207. package/lib/main/browser/view/tree-views-main.js +4 -7
  208. package/lib/main/browser/view/tree-views-main.js.map +1 -1
  209. package/lib/main/browser/webview/webview-environment.js +1 -1
  210. package/lib/main/browser/webview/webview-environment.js.map +1 -1
  211. package/lib/main/browser/webview/webview-resource-cache.js +1 -1
  212. package/lib/main/browser/webview/webview-resource-cache.js.map +1 -1
  213. package/lib/main/browser/webview/webview.d.ts +4 -4
  214. package/lib/main/browser/webview/webview.d.ts.map +1 -1
  215. package/lib/main/browser/webview/webview.js +17 -12
  216. package/lib/main/browser/webview/webview.js.map +1 -1
  217. package/lib/main/browser/webviews-main.d.ts +2 -3
  218. package/lib/main/browser/webviews-main.d.ts.map +1 -1
  219. package/lib/main/browser/webviews-main.js +1 -2
  220. package/lib/main/browser/webviews-main.js.map +1 -1
  221. package/lib/main/browser/workspace-main.d.ts.map +1 -1
  222. package/lib/main/browser/workspace-main.js +10 -8
  223. package/lib/main/browser/workspace-main.js.map +1 -1
  224. package/lib/main/common/webview-preferences.js +3 -3
  225. package/lib/main/common/webview-preferences.js.map +1 -1
  226. package/lib/main/node/handlers/plugin-theia-directory-handler.js +2 -4
  227. package/lib/main/node/handlers/plugin-theia-directory-handler.js.map +1 -1
  228. package/lib/main/node/plugin-cli-contribution.d.ts +0 -1
  229. package/lib/main/node/plugin-cli-contribution.d.ts.map +1 -1
  230. package/lib/main/node/plugin-cli-contribution.js +10 -9
  231. package/lib/main/node/plugin-cli-contribution.js.map +1 -1
  232. package/lib/main/node/plugin-deployer-impl.js +4 -6
  233. package/lib/main/node/plugin-deployer-impl.js.map +1 -1
  234. package/lib/main/node/plugin-ext-backend-module.js +1 -2
  235. package/lib/main/node/plugin-ext-backend-module.js.map +1 -1
  236. package/lib/main/node/plugin-github-resolver.js +4 -3
  237. package/lib/main/node/plugin-github-resolver.js.map +1 -1
  238. package/lib/main/node/plugin-mgmt-cli-contribution.d.ts +0 -1
  239. package/lib/main/node/plugin-mgmt-cli-contribution.d.ts.map +1 -1
  240. package/lib/main/node/plugin-mgmt-cli-contribution.js +5 -4
  241. package/lib/main/node/plugin-mgmt-cli-contribution.js.map +1 -1
  242. package/lib/main/node/plugin-remote-copy-contribution.js +1 -2
  243. package/lib/main/node/plugin-remote-copy-contribution.js.map +1 -1
  244. package/lib/main/node/plugin-server-impl.js +1 -1
  245. package/lib/main/node/plugin-server-impl.js.map +1 -1
  246. package/lib/main/node/plugin-service.d.ts +0 -2
  247. package/lib/main/node/plugin-service.d.ts.map +1 -1
  248. package/lib/main/node/plugin-uninstallation-manager.js +3 -2
  249. package/lib/main/node/plugin-uninstallation-manager.js.map +1 -1
  250. package/lib/main/node/plugins-key-value-storage.js +4 -8
  251. package/lib/main/node/plugins-key-value-storage.js.map +1 -1
  252. package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.js +3 -2
  253. package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.js.map +1 -1
  254. package/lib/main/node/temp-dir-util.js +2 -3
  255. package/lib/main/node/temp-dir-util.js.map +1 -1
  256. package/lib/plugin/authentication-ext.js +1 -1
  257. package/lib/plugin/authentication-ext.js.map +1 -1
  258. package/lib/plugin/command-registry.js +1 -2
  259. package/lib/plugin/command-registry.js.map +1 -1
  260. package/lib/plugin/comments.js +2 -3
  261. package/lib/plugin/comments.js.map +1 -1
  262. package/lib/plugin/custom-editors.js +1 -1
  263. package/lib/plugin/custom-editors.js.map +1 -1
  264. package/lib/plugin/debug/debug-ext.js +8 -14
  265. package/lib/plugin/debug/debug-ext.js.map +1 -1
  266. package/lib/plugin/decorations.js +3 -3
  267. package/lib/plugin/decorations.js.map +1 -1
  268. package/lib/plugin/document-data.js +4 -4
  269. package/lib/plugin/document-data.js.map +1 -1
  270. package/lib/plugin/documents.js +3 -3
  271. package/lib/plugin/documents.js.map +1 -1
  272. package/lib/plugin/file-system-event-service-ext-impl.js +2 -3
  273. package/lib/plugin/file-system-event-service-ext-impl.js.map +1 -1
  274. package/lib/plugin/file-system-watcher.spec.js +6 -8
  275. package/lib/plugin/file-system-watcher.spec.js.map +1 -1
  276. package/lib/plugin/languages/call-hierarchy.js +1 -2
  277. package/lib/plugin/languages/call-hierarchy.js.map +1 -1
  278. package/lib/plugin/languages/code-action.js +1 -1
  279. package/lib/plugin/languages/code-action.js.map +1 -1
  280. package/lib/plugin/languages/completion.js +4 -6
  281. package/lib/plugin/languages/completion.js.map +1 -1
  282. package/lib/plugin/languages/diagnostics.js +5 -5
  283. package/lib/plugin/languages/diagnostics.js.map +1 -1
  284. package/lib/plugin/languages/hover.d.ts +9 -3
  285. package/lib/plugin/languages/hover.d.ts.map +1 -1
  286. package/lib/plugin/languages/hover.js +42 -13
  287. package/lib/plugin/languages/hover.js.map +1 -1
  288. package/lib/plugin/languages/inlay-hints.js +1 -2
  289. package/lib/plugin/languages/inlay-hints.js.map +1 -1
  290. package/lib/plugin/languages/inline-completion.js +2 -2
  291. package/lib/plugin/languages/inline-completion.js.map +1 -1
  292. package/lib/plugin/languages/lens.js +1 -1
  293. package/lib/plugin/languages/lens.js.map +1 -1
  294. package/lib/plugin/languages/signature.js +2 -4
  295. package/lib/plugin/languages/signature.js.map +1 -1
  296. package/lib/plugin/languages/type-hierarchy.js +1 -2
  297. package/lib/plugin/languages/type-hierarchy.js.map +1 -1
  298. package/lib/plugin/languages/util.js +2 -3
  299. package/lib/plugin/languages/util.js.map +1 -1
  300. package/lib/plugin/languages-utils.js +4 -5
  301. package/lib/plugin/languages-utils.js.map +1 -1
  302. package/lib/plugin/languages.d.ts +6 -3
  303. package/lib/plugin/languages.d.ts.map +1 -1
  304. package/lib/plugin/languages.js +13 -12
  305. package/lib/plugin/languages.js.map +1 -1
  306. package/lib/plugin/localization-ext.js +6 -10
  307. package/lib/plugin/localization-ext.js.map +1 -1
  308. package/lib/plugin/logger.js +1 -2
  309. package/lib/plugin/logger.js.map +1 -1
  310. package/lib/plugin/markdown-string.js +15 -17
  311. package/lib/plugin/markdown-string.js.map +1 -1
  312. package/lib/plugin/notebook/notebook-document.js +5 -8
  313. package/lib/plugin/notebook/notebook-document.js.map +1 -1
  314. package/lib/plugin/notebook/notebook-editor.js +1 -1
  315. package/lib/plugin/notebook/notebook-editor.js.map +1 -1
  316. package/lib/plugin/notebook/notebook-kernels.js +15 -21
  317. package/lib/plugin/notebook/notebook-kernels.js.map +1 -1
  318. package/lib/plugin/notebook/notebook-renderers.js +3 -4
  319. package/lib/plugin/notebook/notebook-renderers.js.map +1 -1
  320. package/lib/plugin/notebook/notebooks.js +14 -18
  321. package/lib/plugin/notebook/notebooks.js.map +1 -1
  322. package/lib/plugin/path.js +2 -3
  323. package/lib/plugin/path.js.map +1 -1
  324. package/lib/plugin/plugin-context.d.ts.map +1 -1
  325. package/lib/plugin/plugin-context.js +20 -20
  326. package/lib/plugin/plugin-context.js.map +1 -1
  327. package/lib/plugin/plugin-manager.d.ts.map +1 -1
  328. package/lib/plugin/plugin-manager.js +1 -2
  329. package/lib/plugin/plugin-manager.js.map +1 -1
  330. package/lib/plugin/preference-registry.js +11 -15
  331. package/lib/plugin/preference-registry.js.map +1 -1
  332. package/lib/plugin/preference-registry.spec.js +2 -2
  333. package/lib/plugin/preference-registry.spec.js.map +1 -1
  334. package/lib/plugin/prefix-sum-computer.js +2 -2
  335. package/lib/plugin/prefix-sum-computer.js.map +1 -1
  336. package/lib/plugin/quick-open.d.ts +3 -3
  337. package/lib/plugin/quick-open.d.ts.map +1 -1
  338. package/lib/plugin/quick-open.js +23 -29
  339. package/lib/plugin/quick-open.js.map +1 -1
  340. package/lib/plugin/scm.d.ts.map +1 -1
  341. package/lib/plugin/scm.js +35 -10
  342. package/lib/plugin/scm.js.map +1 -1
  343. package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
  344. package/lib/plugin/status-bar/status-bar-item.js +13 -12
  345. package/lib/plugin/status-bar/status-bar-item.js.map +1 -1
  346. package/lib/plugin/status-bar-message-registry.js +1 -2
  347. package/lib/plugin/status-bar-message-registry.js.map +1 -1
  348. package/lib/plugin/tabs.js +3 -6
  349. package/lib/plugin/tabs.js.map +1 -1
  350. package/lib/plugin/tasks/task-provider.js +1 -1
  351. package/lib/plugin/tasks/task-provider.js.map +1 -1
  352. package/lib/plugin/tasks/tasks.js +1 -2
  353. package/lib/plugin/tasks/tasks.js.map +1 -1
  354. package/lib/plugin/telemetry-ext.js +6 -9
  355. package/lib/plugin/telemetry-ext.js.map +1 -1
  356. package/lib/plugin/terminal-ext.js +11 -12
  357. package/lib/plugin/terminal-ext.js.map +1 -1
  358. package/lib/plugin/test-item.js +1 -2
  359. package/lib/plugin/test-item.js.map +1 -1
  360. package/lib/plugin/tests.js +9 -15
  361. package/lib/plugin/tests.js.map +1 -1
  362. package/lib/plugin/text-editors.js +2 -2
  363. package/lib/plugin/text-editors.js.map +1 -1
  364. package/lib/plugin/timeline.js +8 -10
  365. package/lib/plugin/timeline.js.map +1 -1
  366. package/lib/plugin/tree/tree-views.js +19 -28
  367. package/lib/plugin/tree/tree-views.js.map +1 -1
  368. package/lib/plugin/type-converters.d.ts +1 -1
  369. package/lib/plugin/type-converters.d.ts.map +1 -1
  370. package/lib/plugin/type-converters.js +107 -114
  371. package/lib/plugin/type-converters.js.map +1 -1
  372. package/lib/plugin/types-impl.d.ts +11 -2
  373. package/lib/plugin/types-impl.d.ts.map +1 -1
  374. package/lib/plugin/types-impl.js +70 -51
  375. package/lib/plugin/types-impl.js.map +1 -1
  376. package/lib/plugin/webview-views.js +1 -1
  377. package/lib/plugin/webview-views.js.map +1 -1
  378. package/lib/plugin/webviews.d.ts +2 -8
  379. package/lib/plugin/webviews.d.ts.map +1 -1
  380. package/lib/plugin/webviews.js +9 -7
  381. package/lib/plugin/webviews.js.map +1 -1
  382. package/lib/plugin/word-helper.js +3 -3
  383. package/lib/plugin/word-helper.js.map +1 -1
  384. package/lib/plugin/workspace.d.ts +2 -0
  385. package/lib/plugin/workspace.d.ts.map +1 -1
  386. package/lib/plugin/workspace.js +12 -4
  387. package/lib/plugin/workspace.js.map +1 -1
  388. package/lib/plugin/workspace.spec.d.ts +2 -0
  389. package/lib/plugin/workspace.spec.d.ts.map +1 -0
  390. package/lib/plugin/workspace.spec.js +127 -0
  391. package/lib/plugin/workspace.spec.js.map +1 -0
  392. package/package.json +30 -30
  393. package/src/common/plugin-api-rpc-model.ts +16 -0
  394. package/src/common/plugin-api-rpc.ts +21 -3
  395. package/src/main/browser/languages-main.ts +10 -3
  396. package/src/main/browser/notebooks/renderers/output-webview-internal.ts +1 -1
  397. package/src/main/browser/preference-registry-main.ts +2 -1
  398. package/src/main/browser/scm-main.ts +46 -2
  399. package/src/main/browser/webview/webview-resource-cache.ts +1 -1
  400. package/src/main/browser/webview/webview.ts +10 -7
  401. package/src/main/browser/webviews-main.ts +2 -2
  402. package/src/main/browser/workspace-main.ts +7 -0
  403. package/src/plugin/languages/hover.ts +53 -15
  404. package/src/plugin/languages.ts +10 -4
  405. package/src/plugin/plugin-context.ts +7 -0
  406. package/src/plugin/quick-open.ts +11 -10
  407. package/src/plugin/scm.ts +37 -1
  408. package/src/plugin/status-bar/status-bar-item.ts +4 -1
  409. package/src/plugin/type-converters.ts +8 -4
  410. package/src/plugin/types-impl.ts +23 -0
  411. package/src/plugin/webviews.ts +9 -5
  412. package/src/plugin/workspace.spec.ts +154 -0
  413. package/src/plugin/workspace.ts +12 -2
@@ -26,9 +26,10 @@ import {
26
26
  SourceControlGroupFeatures,
27
27
  ScmMain,
28
28
  SourceControlProviderFeatures,
29
- ScmRawResourceSplices, ScmRawResourceGroup
29
+ ScmRawResourceSplices, ScmRawResourceGroup,
30
+ ScmActionButton as RpcScmActionButton
30
31
  } from '../../common/plugin-api-rpc';
31
- import { ScmProvider, ScmResource, ScmResourceDecorations, ScmResourceGroup, ScmCommand } from '@theia/scm/lib/browser/scm-provider';
32
+ import { ScmProvider, ScmResource, ScmResourceDecorations, ScmResourceGroup, ScmCommand, ScmActionButton } from '@theia/scm/lib/browser/scm-provider';
32
33
  import { ScmRepository } from '@theia/scm/lib/browser/scm-repository';
33
34
  import { ScmService } from '@theia/scm/lib/browser/scm-service';
34
35
  import { RPCProtocol } from '../../common/rpc-protocol';
@@ -114,6 +115,9 @@ export class PluginScmProvider implements ScmProvider {
114
115
  private readonly onDidChangeResourcesEmitter = new Emitter<void>();
115
116
  readonly onDidChangeResources: Event<void> = this.onDidChangeResourcesEmitter.event;
116
117
 
118
+ private _actionButton: ScmActionButton | undefined;
119
+ get actionButton(): ScmActionButton | undefined { return this._actionButton; }
120
+
117
121
  private features: SourceControlProviderFeatures = {};
118
122
 
119
123
  get handle(): number { return this._handle; }
@@ -149,6 +153,9 @@ export class PluginScmProvider implements ScmProvider {
149
153
  private readonly onDidChangeEmitter = new Emitter<void>();
150
154
  readonly onDidChange: Event<void> = this.onDidChangeEmitter.event;
151
155
 
156
+ private readonly onDidChangeActionButtonEmitter = new Emitter<ScmActionButton | undefined>();
157
+ readonly onDidChangeActionButton: Event<ScmActionButton | undefined> = this.onDidChangeActionButtonEmitter.event;
158
+
152
159
  constructor(
153
160
  private readonly proxy: ScmExt,
154
161
  private readonly colors: ColorRegistry,
@@ -288,6 +295,11 @@ export class PluginScmProvider implements ScmProvider {
288
295
  this.groups.splice(this.groups.indexOf(group), 1);
289
296
  }
290
297
 
298
+ updateActionButton(actionButton: ScmActionButton | undefined): void {
299
+ this._actionButton = actionButton;
300
+ this.onDidChangeActionButtonEmitter.fire(actionButton);
301
+ }
302
+
291
303
  dispose(): void { }
292
304
  }
293
305
 
@@ -471,4 +483,36 @@ export class ScmMainImpl implements ScmMain {
471
483
 
472
484
  repository.input.enabled = enabled;
473
485
  }
486
+
487
+ $setActionButton(sourceControlHandle: number, actionButton: RpcScmActionButton | undefined): void {
488
+ const repository = this.repositories.get(sourceControlHandle);
489
+
490
+ if (!repository) {
491
+ return;
492
+ }
493
+
494
+ const provider = repository.provider as PluginScmProvider;
495
+
496
+ // Convert from RPC Command (with .id) to ScmCommand (with .command)
497
+ const converted: ScmActionButton | undefined = actionButton ? {
498
+ command: {
499
+ title: actionButton.command.title,
500
+ tooltip: actionButton.command.tooltip,
501
+ command: actionButton.command.id,
502
+ arguments: actionButton.command.arguments
503
+ },
504
+ secondaryCommands: actionButton.secondaryCommands?.map(row =>
505
+ row.map(cmd => ({
506
+ title: cmd.title,
507
+ tooltip: cmd.tooltip,
508
+ command: cmd.id,
509
+ arguments: cmd.arguments
510
+ }))
511
+ ),
512
+ enabled: actionButton.enabled,
513
+ description: actionButton.description
514
+ } : undefined;
515
+
516
+ provider.updateActionButton(converted);
517
+ }
474
518
  }
@@ -79,7 +79,7 @@ export class WebviewResourceCache {
79
79
  return;
80
80
  }
81
81
  const body = await response.body();
82
- await cache.put(url, new Response(body, {
82
+ await cache.put(url, new Response(new Uint8Array(body), {
83
83
  status: 200,
84
84
  headers: { 'ETag': response.eTag }
85
85
  }));
@@ -24,11 +24,12 @@ import * as mime from 'mime';
24
24
  import { JSONExt } from '@theia/core/shared/@lumino/coreutils';
25
25
  import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
26
26
  import { WebviewPanelOptions, WebviewPortMapping } from '@theia/plugin';
27
- import { BaseWidget, Message } from '@theia/core/lib/browser/widgets/widget';
27
+ import { BaseWidget, Message, codicon } from '@theia/core/lib/browser/widgets/widget';
28
28
  import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
29
29
  import { ApplicationShellMouseTracker } from '@theia/core/lib/browser/shell/application-shell-mouse-tracker';
30
30
  import { StatefulWidget } from '@theia/core/lib/browser/shell/shell-layout-restorer';
31
- import { WebviewPanelViewState } from '../../../common/plugin-api-rpc';
31
+ import { WebviewPanelViewState, ThemeIcon as ThemeIconDTO } from '../../../common/plugin-api-rpc';
32
+ import { ThemeIcon } from '@theia/monaco-editor-core/esm/vs/base/common/themables';
32
33
  import { IconUrl } from '../../../common/plugin-protocol';
33
34
  import { Deferred } from '@theia/core/lib/common/promise-util';
34
35
  import { WebviewEnvironment } from './webview-environment';
@@ -418,16 +419,18 @@ export class WebviewWidget extends BaseWidget implements StatefulWidget, Extract
418
419
  this.doUpdateContent();
419
420
  }
420
421
 
421
- protected iconUrl: IconUrl | undefined;
422
+ protected iconUrl: IconUrl | ThemeIconDTO | undefined;
422
423
  protected readonly toDisposeOnIcon = new DisposableCollection();
423
- setIconUrl(iconUrl: IconUrl | undefined): void {
424
- if ((this.iconUrl && iconUrl && JSONExt.deepEqual(this.iconUrl, iconUrl)) || (this.iconUrl === iconUrl)) {
424
+ setIconUrl(iconUrl: IconUrl | ThemeIconDTO | undefined): void {
425
+ if (this.iconUrl === iconUrl || (this.iconUrl && iconUrl && JSON.stringify(this.iconUrl) === JSON.stringify(iconUrl))) {
425
426
  return;
426
427
  }
427
428
  this.toDisposeOnIcon.dispose();
428
429
  this.toDispose.push(this.toDisposeOnIcon);
429
430
  this.iconUrl = iconUrl;
430
- if (iconUrl) {
431
+ if (ThemeIcon.isThemeIcon(iconUrl)) {
432
+ this.title.iconClass = codicon(iconUrl.id);
433
+ } else if (iconUrl) {
431
434
  const darkIconUrl = typeof iconUrl === 'object' ? iconUrl.dark : iconUrl;
432
435
  const lightIconUrl = typeof iconUrl === 'object' ? iconUrl.light : iconUrl;
433
436
  const iconClass = `webview-${this.identifier.id}-file-icon`;
@@ -678,7 +681,7 @@ export namespace WebviewWidget {
678
681
  export interface State {
679
682
  viewType: string
680
683
  title: string
681
- iconUrl?: IconUrl
684
+ iconUrl?: IconUrl | ThemeIconDTO
682
685
  options: WebviewPanelOptions
683
686
  contentOptions: WebviewContentOptions
684
687
  state?: string
@@ -17,7 +17,7 @@
17
17
  import debounce = require('@theia/core/shared/lodash.debounce');
18
18
  import { URI } from '@theia/core/shared/vscode-uri';
19
19
  import { interfaces } from '@theia/core/shared/inversify';
20
- import { WebviewsMain, MAIN_RPC_CONTEXT, WebviewsExt, WebviewPanelViewState } from '../../common/plugin-api-rpc';
20
+ import { WebviewsMain, MAIN_RPC_CONTEXT, WebviewsExt, WebviewPanelViewState, ThemeIcon } from '../../common/plugin-api-rpc';
21
21
  import { RPCProtocol } from '../../common/rpc-protocol';
22
22
  import { WebviewOptions, WebviewPanelOptions, WebviewPanelShowOptions } from '@theia/plugin';
23
23
  import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell';
@@ -160,7 +160,7 @@ export class WebviewsMainImpl implements WebviewsMain, Disposable {
160
160
  webview.title.label = value;
161
161
  }
162
162
 
163
- async $setIconPath(handle: string, iconUrl: IconUrl | undefined): Promise<void> {
163
+ async $setIconPath(handle: string, iconUrl: IconUrl | ThemeIcon | undefined): Promise<void> {
164
164
  const webview = await this.getWebview(handle);
165
165
  webview.setIconUrl(iconUrl);
166
166
  }
@@ -103,6 +103,13 @@ export class WorkspaceMainImpl implements WorkspaceMain, Disposable {
103
103
  }));
104
104
 
105
105
  this.workspaceTrustService.getWorkspaceTrust().then(trust => this.proxy.$onWorkspaceTrustChanged(trust));
106
+
107
+ // Subscribe to trust changes
108
+ this.toDispose.push(
109
+ this.workspaceTrustService.onDidChangeWorkspaceTrust(trust => {
110
+ this.proxy.$onWorkspaceTrustChanged(trust);
111
+ })
112
+ );
106
113
  }
107
114
 
108
115
  dispose(): void {
@@ -18,19 +18,30 @@
18
18
  import { URI } from '@theia/core/shared/vscode-uri';
19
19
  import * as theia from '@theia/plugin';
20
20
  import { DocumentsExtImpl } from '../documents';
21
- import { Hover } from '../../common/plugin-api-rpc-model';
21
+ import { Hover, HoverContext } from '../../common/plugin-api-rpc-model';
22
22
  import * as Converter from '../type-converters';
23
23
  import { Range } from '../types-impl';
24
- import { Position } from '../../common/plugin-api-rpc';
24
+ import { HoverWithId, Position } from '../../common/plugin-api-rpc';
25
25
 
26
26
  export class HoverAdapter {
27
27
 
28
+ private _hoverCounter: number = 0;
29
+ private _hoverMap: Map<number, theia.Hover> = new Map<number, theia.Hover>();
30
+
31
+ private static HOVER_MAP_MAX_SIZE = 10;
32
+
28
33
  constructor(
29
34
  private readonly provider: theia.HoverProvider,
30
35
  private readonly documents: DocumentsExtImpl
31
36
  ) { }
32
37
 
33
- public provideHover(resource: URI, position: Position, token: theia.CancellationToken): Promise<Hover | undefined> {
38
+ async provideHover(
39
+ resource: URI,
40
+ position: Position,
41
+ context: HoverContext<{ id: number }> | undefined,
42
+ token: theia.CancellationToken
43
+ ): Promise<HoverWithId | undefined> {
44
+
34
45
  const document = this.documents.getDocumentData(resource);
35
46
  if (!document) {
36
47
  return Promise.reject(new Error(`There are no document for ${resource}`));
@@ -39,20 +50,47 @@ export class HoverAdapter {
39
50
  const doc = document.document;
40
51
  const pos = Converter.toPosition(position);
41
52
 
42
- return Promise.resolve(this.provider.provideHover(doc, pos, token)).then(value => {
43
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
44
- if (!value || !Array.isArray(value.contents) || (value.contents as Array<any>).length === 0) {
45
- return undefined;
46
- }
47
- if (!value.range) {
48
- value.range = doc.getWordRangeAtPosition(pos);
49
- }
50
- if (!value.range) {
51
- value.range = new Range(pos, pos);
53
+ let value: theia.Hover | null | undefined;
54
+ if (context && context.verbosityRequest) {
55
+ const previousHoverId = context.verbosityRequest.previousHover.id;
56
+ const previousHover = this._hoverMap.get(previousHoverId);
57
+ if (!previousHover) {
58
+ throw new Error(`Hover with id ${previousHoverId} not found`);
52
59
  }
60
+ const hoverContext: theia.HoverContext = { verbosityDelta: context.verbosityRequest.verbosityDelta, previousHover };
61
+ value = await this.provider.provideHover(doc, pos, token, hoverContext);
62
+ } else {
63
+ value = await this.provider.provideHover(doc, pos, token);
64
+ }
65
+
66
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
67
+ if (!value || !Array.isArray(value.contents) || (value.contents as Array<any>).length === 0) {
68
+ return undefined;
69
+ }
70
+ if (!value.range) {
71
+ value.range = doc.getWordRangeAtPosition(pos);
72
+ }
73
+ if (!value.range) {
74
+ value.range = new Range(pos, pos);
75
+ }
76
+
77
+ const convertedHover: Hover = Converter.fromHover(value);
78
+ // Check if hover map has more than 10 elements and if yes, remove oldest from the map
79
+ if (this._hoverMap.size === HoverAdapter.HOVER_MAP_MAX_SIZE) {
80
+ const minimumId = Math.min(...this._hoverMap.keys());
81
+ this._hoverMap.delete(minimumId);
82
+ }
83
+ const id = this._hoverCounter++;
84
+ this._hoverMap.set(id, value);
85
+ const hover: HoverWithId = {
86
+ ...convertedHover,
87
+ id
88
+ };
89
+ return hover;
90
+ }
53
91
 
54
- return Converter.fromHover(value);
55
- });
92
+ releaseHover(id: number): void {
93
+ this._hoverMap.delete(id);
56
94
  }
57
95
 
58
96
  }
@@ -28,6 +28,7 @@ import {
28
28
  InlayHintsDto,
29
29
  InlayHintDto,
30
30
  IdentifiableInlineCompletions,
31
+ HoverWithId,
31
32
  } from '../common/plugin-api-rpc';
32
33
  import { RPCProtocol } from '../common/rpc-protocol';
33
34
  import * as theia from '@theia/plugin';
@@ -42,7 +43,6 @@ import {
42
43
  Completion,
43
44
  SerializedDocumentFilter,
44
45
  SignatureHelp,
45
- Hover,
46
46
  DocumentHighlight,
47
47
  Range,
48
48
  TextEdit,
@@ -71,7 +71,8 @@ import {
71
71
  TypeHierarchyItem,
72
72
  InlineCompletionContext,
73
73
  DocumentDropEdit,
74
- DataTransferDTO
74
+ DataTransferDTO,
75
+ HoverContext
75
76
  } from '../common/plugin-api-rpc-model';
76
77
  import { CompletionAdapter } from './languages/completion';
77
78
  import { Diagnostics } from './languages/diagnostics';
@@ -412,8 +413,13 @@ export class LanguagesExtImpl implements LanguagesExt {
412
413
  return this.createDisposable(callId);
413
414
  }
414
415
 
415
- $provideHover(handle: number, resource: UriComponents, position: Position, token: theia.CancellationToken): Promise<Hover | undefined> {
416
- return this.withAdapter(handle, HoverAdapter, adapter => adapter.provideHover(URI.revive(resource), position, token), undefined);
416
+ $provideHover(handle: number, resource: UriComponents, position: Position, context: HoverContext<{ id: number }> | undefined,
417
+ token: theia.CancellationToken): Promise<HoverWithId | undefined> {
418
+ return this.withAdapter(handle, HoverAdapter, adapter => adapter.provideHover(URI.revive(resource), position, context, token), undefined);
419
+ }
420
+
421
+ $releaseHover(handle: number, id: number): void {
422
+ this.withAdapter(handle, HoverAdapter, adapter => Promise.resolve(adapter.releaseHover(id)), undefined);
417
423
  }
418
424
  // ### Hover Provider end
419
425
 
@@ -80,6 +80,8 @@ import {
80
80
  SignatureHelp,
81
81
  SignatureHelpTriggerKind,
82
82
  Hover,
83
+ VerboseHover,
84
+ HoverVerbosityAction,
83
85
  EvaluatableExpression,
84
86
  InlineValueEvaluatableExpression,
85
87
  InlineValueText,
@@ -894,6 +896,9 @@ export function createAPIFactory(
894
896
  get onDidGrantWorkspaceTrust(): theia.Event<void> {
895
897
  return workspaceExt.onDidGrantWorkspaceTrust;
896
898
  },
899
+ get onDidChangeWorkspaceTrust(): theia.Event<boolean> {
900
+ return workspaceExt.onDidChangeWorkspaceTrust;
901
+ },
897
902
  registerEditSessionIdentityProvider(scheme: string, provider: theia.EditSessionIdentityProvider) {
898
903
  return workspaceExt.$registerEditSessionIdentityProvider(scheme, provider);
899
904
  },
@@ -1461,6 +1466,8 @@ export function createAPIFactory(
1461
1466
  SignatureHelp,
1462
1467
  SignatureHelpTriggerKind,
1463
1468
  Hover,
1469
+ VerboseHover,
1470
+ HoverVerbosityAction,
1464
1471
  EvaluatableExpression,
1465
1472
  InlineValueEvaluatableExpression,
1466
1473
  InlineValueText,
@@ -70,6 +70,7 @@ export class QuickOpenExtImpl implements QuickOpenExt {
70
70
  title: options && options.title,
71
71
  canPickMany: options && options.canPickMany,
72
72
  placeHolder: options && options.placeHolder,
73
+ prompt: options && options.prompt,
73
74
  matchOnDescription: options && options.matchOnDescription,
74
75
  matchOnDetail: options && options.matchOnDetail,
75
76
  ignoreFocusLost: options && options.ignoreFocusOut
@@ -256,6 +257,7 @@ export class QuickInputExt implements theia.QuickInput {
256
257
  private _totalSteps: number | undefined;
257
258
  private _value: string;
258
259
  private _placeholder: string | undefined;
260
+ private _prompt: string | undefined;
259
261
  private _buttons: theia.QuickInputButton[] = [];
260
262
  private _handlesToButtons = new Map<number, theia.QuickInputButton>();
261
263
  protected expectingHide = false;
@@ -364,6 +366,15 @@ export class QuickInputExt implements theia.QuickInput {
364
366
  this.update({ placeholder });
365
367
  }
366
368
 
369
+ get prompt(): string | undefined {
370
+ return this._prompt;
371
+ }
372
+
373
+ set prompt(prompt: string | undefined) {
374
+ this._prompt = prompt;
375
+ this.update({ prompt });
376
+ }
377
+
367
378
  get buttons(): theia.QuickInputButton[] {
368
379
  return this._buttons;
369
380
  }
@@ -505,7 +516,6 @@ export class QuickInputExt implements theia.QuickInput {
505
516
  export class InputBoxExt extends QuickInputExt implements theia.InputBox {
506
517
 
507
518
  private _password: boolean;
508
- private _prompt: string | undefined;
509
519
  private _valueSelection: readonly [number, number] | undefined;
510
520
  private _validationMessage: string | undefined;
511
521
 
@@ -531,15 +541,6 @@ export class InputBoxExt extends QuickInputExt implements theia.InputBox {
531
541
  this.update({ password });
532
542
  }
533
543
 
534
- get prompt(): string | undefined {
535
- return this._prompt;
536
- }
537
-
538
- set prompt(prompt: string | undefined) {
539
- this._prompt = prompt;
540
- this.update({ prompt });
541
- }
542
-
543
544
  get valueSelection(): readonly [number, number] | undefined {
544
545
  return this._valueSelection;
545
546
  }
package/src/plugin/scm.ts CHANGED
@@ -27,7 +27,8 @@ import {
27
27
  ScmExt,
28
28
  ScmMain, ScmRawResource, ScmRawResourceGroup,
29
29
  ScmRawResourceSplice, ScmRawResourceSplices,
30
- SourceControlGroupFeatures
30
+ SourceControlGroupFeatures,
31
+ ScmActionButton
31
32
  } from '../common';
32
33
  import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
33
34
  import { CommandRegistryImpl } from '../plugin/command-registry';
@@ -40,6 +41,7 @@ import { ScmCommandArg } from '../common/plugin-api-rpc';
40
41
  import { sep } from '@theia/core/lib/common/paths';
41
42
  import { PluginIconPath } from './plugin-icon-path';
42
43
  import { createAPIObject } from './plugin-context';
44
+
43
45
  type ProviderHandle = number;
44
46
  type GroupHandle = number;
45
47
  type ResourceStateHandle = number;
@@ -632,6 +634,39 @@ class SourceControlImpl implements theia.SourceControl {
632
634
  this.proxy.$updateSourceControl(this.handle, { statusBarCommands: internal });
633
635
  }
634
636
 
637
+ private _actionButtonDisposables = new DisposableCollection();
638
+ private _actionButton: theia.ScmActionButton | undefined = undefined;
639
+
640
+ get actionButton(): theia.ScmActionButton | undefined {
641
+ return this._actionButton;
642
+ }
643
+
644
+ set actionButton(actionButton: theia.ScmActionButton | undefined) {
645
+ this._actionButtonDisposables.dispose();
646
+ this._actionButtonDisposables = new DisposableCollection();
647
+ this._actionButton = actionButton;
648
+
649
+ if (actionButton) {
650
+ const command: Command = this.commands.converter.toSafeCommand(actionButton.command, this._actionButtonDisposables);
651
+ const secondaryCommands = actionButton.secondaryCommands?.map(row =>
652
+ row.map(cmd => {
653
+ const safeCommand = this.commands.converter.toSafeCommand(cmd, this._actionButtonDisposables);
654
+ return safeCommand;
655
+ })
656
+ );
657
+
658
+ const internal: ScmActionButton = {
659
+ command,
660
+ secondaryCommands: secondaryCommands,
661
+ enabled: actionButton.enabled,
662
+ description: actionButton.description
663
+ };
664
+ this.proxy.$setActionButton(this.handle, internal);
665
+ } else {
666
+ this.proxy.$setActionButton(this.handle, undefined);
667
+ }
668
+ }
669
+
635
670
  private _selected: boolean = false;
636
671
 
637
672
  get selected(): boolean {
@@ -741,6 +776,7 @@ class SourceControlImpl implements theia.SourceControl {
741
776
  dispose(): void {
742
777
  this.acceptInputDisposables.dispose();
743
778
  this._statusBarDisposables.dispose();
779
+ this._actionButtonDisposables.dispose();
744
780
 
745
781
  this.groups.forEach(group => group.dispose());
746
782
  this.proxy.$unregisterSourceControl(this.handle);
@@ -26,7 +26,10 @@ export class StatusBarItemImpl implements theia.StatusBarItem {
26
26
  /** Map from allowed background colors to corresponding foreground colors. */
27
27
  private static BACKGROUND_COLORS = new Map<string, string>([
28
28
  ['statusBarItem.errorBackground', 'statusBarItem.errorForeground'],
29
- ['statusBarItem.warningBackground', 'statusBarItem.warningForeground']
29
+ ['statusBarItem.warningBackground', 'statusBarItem.warningForeground'],
30
+ ['statusBarItem.prominentBackground', 'statusBarItem.prominentForeground'],
31
+ ['statusBarItem.remoteBackground', 'statusBarItem.remoteForeground'],
32
+ ['statusBarItem.offlineBackground', 'statusBarItem.offlineForeground']
30
33
  ]);
31
34
 
32
35
  private _id: string;
@@ -425,11 +425,14 @@ function convertTags(tags: types.DiagnosticTag[] | undefined): types.MarkerTag[]
425
425
  return markerTags;
426
426
  }
427
427
 
428
- export function fromHover(hover: theia.Hover): model.Hover {
429
- return <model.Hover>{
428
+ export function fromHover(hover: theia.VerboseHover): model.Hover {
429
+ const modelHover: model.Hover = {
430
430
  range: fromRange(hover.range),
431
- contents: fromManyMarkdown(hover.contents)
431
+ contents: fromManyMarkdown(hover.contents),
432
+ canIncreaseVerbosity: hover.canIncreaseVerbosity,
433
+ canDecreaseVerbosity: hover.canDecreaseVerbosity,
432
434
  };
435
+ return modelHover;
433
436
  }
434
437
 
435
438
  export function fromEvaluatableExpression(evaluatableExpression: theia.EvaluatableExpression): model.EvaluatableExpression {
@@ -1327,7 +1330,7 @@ export function convertToTransferQuickPickItems(plugin: Plugin, items: (theia.Qu
1327
1330
  } else if (item.kind === QuickPickItemKind.Separator) {
1328
1331
  return { kind: 'separator', label: item.label, handle: index };
1329
1332
  } else {
1330
- const { label, description, iconPath, detail, picked, alwaysShow, buttons } = item;
1333
+ const { label, description, iconPath, detail, picked, alwaysShow, buttons, resourceUri } = item;
1331
1334
  return {
1332
1335
  kind: 'item',
1333
1336
  label,
@@ -1337,6 +1340,7 @@ export function convertToTransferQuickPickItems(plugin: Plugin, items: (theia.Qu
1337
1340
  picked,
1338
1341
  alwaysShow,
1339
1342
  buttons: buttons ? buttons.map((button, i) => convertQuickInputButton(plugin, button, i)) : undefined,
1343
+ resourceUri: resourceUri?.toJSON(),
1340
1344
  handle: index,
1341
1345
  };
1342
1346
  }
@@ -1491,6 +1491,29 @@ export class Hover {
1491
1491
  }
1492
1492
  }
1493
1493
 
1494
+ @es5ClassCompat
1495
+ export class VerboseHover extends Hover {
1496
+
1497
+ public canIncreaseVerbosity: boolean | undefined;
1498
+ public canDecreaseVerbosity: boolean | undefined;
1499
+
1500
+ constructor(
1501
+ contents: theia.MarkdownString | theia.MarkedString | (theia.MarkdownString | theia.MarkedString)[],
1502
+ range?: Range,
1503
+ canIncreaseVerbosity?: boolean,
1504
+ canDecreaseVerbosity?: boolean,
1505
+ ) {
1506
+ super(contents, range);
1507
+ this.canIncreaseVerbosity = canIncreaseVerbosity;
1508
+ this.canDecreaseVerbosity = canDecreaseVerbosity;
1509
+ }
1510
+ }
1511
+
1512
+ export enum HoverVerbosityAction {
1513
+ Increase = 0,
1514
+ Decrease = 1
1515
+ }
1516
+
1494
1517
  @es5ClassCompat
1495
1518
  export class EvaluatableExpression {
1496
1519
 
@@ -21,7 +21,7 @@ import * as theia from '@theia/plugin';
21
21
  import { RPCProtocol } from '../common/rpc-protocol';
22
22
  import { Emitter, Event } from '@theia/core/lib/common/event';
23
23
  import { fromViewColumn, toViewColumn, toWebviewPanelShowOptions } from './type-converters';
24
- import { Disposable, WebviewPanelTargetArea, URI } from './types-impl';
24
+ import { Disposable, WebviewPanelTargetArea, URI, ThemeIcon } from './types-impl';
25
25
  import { WorkspaceExtImpl } from './workspace';
26
26
  import { PluginIconPath } from './plugin-icon-path';
27
27
  import { PluginModel, PluginPackage } from '../common';
@@ -315,7 +315,7 @@ export class WebviewPanelImpl implements theia.WebviewPanel {
315
315
  private _active = true;
316
316
  private _visible = true;
317
317
  private _showOptions: theia.WebviewPanelShowOptions;
318
- private _iconPath: theia.Uri | { light: theia.Uri; dark: theia.Uri } | undefined;
318
+ private _iconPath: theia.IconPath | undefined;
319
319
 
320
320
  readonly onDisposeEmitter = new Emitter<void>();
321
321
  public readonly onDidDispose: Event<void> = this.onDisposeEmitter.event;
@@ -367,15 +367,19 @@ export class WebviewPanelImpl implements theia.WebviewPanel {
367
367
  }
368
368
  }
369
369
 
370
- get iconPath(): theia.Uri | { light: theia.Uri; dark: theia.Uri } | undefined {
370
+ get iconPath(): theia.IconPath | undefined {
371
371
  return this._iconPath;
372
372
  }
373
373
 
374
- set iconPath(iconPath: theia.Uri | { light: theia.Uri; dark: theia.Uri } | undefined) {
374
+ set iconPath(iconPath: theia.IconPath | undefined) {
375
375
  this.checkIsDisposed();
376
376
  if (this._iconPath !== iconPath) {
377
377
  this._iconPath = iconPath;
378
- this.proxy.$setIconPath(this.viewId, PluginIconPath.toUrl(iconPath, this._webview.plugin));
378
+ if (ThemeIcon.is(iconPath)) {
379
+ this.proxy.$setIconPath(this.viewId, ThemeIcon.get(iconPath));
380
+ } else {
381
+ this.proxy.$setIconPath(this.viewId, PluginIconPath.toUrl(iconPath, this._webview.plugin));
382
+ }
379
383
  }
380
384
  }
381
385