@theia/plugin-ext 1.34.1 → 1.34.3

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 (845) hide show
  1. package/LICENSE +641 -641
  2. package/README.md +54 -54
  3. package/lib/common/arrays.d.ts +19 -19
  4. package/lib/common/arrays.js +46 -46
  5. package/lib/common/assert.d.ts +1 -1
  6. package/lib/common/assert.js +25 -25
  7. package/lib/common/cache.d.ts +11 -11
  8. package/lib/common/cache.js +47 -47
  9. package/lib/common/character-classifier.d.ts +18 -18
  10. package/lib/common/character-classifier.js +60 -60
  11. package/lib/common/collections.d.ts +4 -4
  12. package/lib/common/collections.js +39 -39
  13. package/lib/common/connection.d.ts +54 -54
  14. package/lib/common/connection.js +107 -107
  15. package/lib/common/disposable-util.d.ts +6 -6
  16. package/lib/common/disposable-util.js +37 -37
  17. package/lib/common/editor-options.d.ts +30 -30
  18. package/lib/common/editor-options.js +72 -72
  19. package/lib/common/env.d.ts +3 -3
  20. package/lib/common/env.js +17 -17
  21. package/lib/common/errors.d.ts +3 -3
  22. package/lib/common/errors.js +42 -42
  23. package/lib/common/id-generator.d.ts +6 -6
  24. package/lib/common/id-generator.js +28 -28
  25. package/lib/common/index.d.ts +3 -3
  26. package/lib/common/index.js +33 -33
  27. package/lib/common/link-computer.d.ts +41 -41
  28. package/lib/common/link-computer.js +275 -275
  29. package/lib/common/object-identifier.d.ts +8 -8
  30. package/lib/common/object-identifier.js +32 -32
  31. package/lib/common/objects.d.ts +1 -1
  32. package/lib/common/objects.js +46 -46
  33. package/lib/common/paths-util.d.ts +3 -3
  34. package/lib/common/paths-util.js +144 -144
  35. package/lib/common/plugin-api-rpc-model.d.ts +728 -728
  36. package/lib/common/plugin-api-rpc-model.js +173 -173
  37. package/lib/common/plugin-api-rpc.d.ts +1710 -1710
  38. package/lib/common/plugin-api-rpc.js +279 -279
  39. package/lib/common/plugin-ext-api-contribution.d.ts +58 -58
  40. package/lib/common/plugin-ext-api-contribution.js +5 -5
  41. package/lib/common/plugin-identifiers.d.ts +40 -40
  42. package/lib/common/plugin-identifiers.js +80 -80
  43. package/lib/common/plugin-protocol.d.ts +840 -840
  44. package/lib/common/plugin-protocol.js +67 -67
  45. package/lib/common/proxy-handler.d.ts +65 -65
  46. package/lib/common/proxy-handler.js +97 -97
  47. package/lib/common/reference-map.d.ts +7 -7
  48. package/lib/common/reference-map.js +39 -39
  49. package/lib/common/rpc-protocol.d.ts +65 -65
  50. package/lib/common/rpc-protocol.js +229 -229
  51. package/lib/common/semantic-tokens-dto.d.ts +18 -18
  52. package/lib/common/semantic-tokens-dto.js +162 -162
  53. package/lib/common/types.d.ts +37 -37
  54. package/lib/common/types.js +121 -121
  55. package/lib/common/uint.d.ts +7 -7
  56. package/lib/common/uint.js +33 -33
  57. package/lib/common/uri-components.d.ts +39 -39
  58. package/lib/common/uri-components.js +66 -66
  59. package/lib/hosted/browser/hosted-plugin-watcher.d.ts +15 -15
  60. package/lib/hosted/browser/hosted-plugin-watcher.js +59 -59
  61. package/lib/hosted/browser/hosted-plugin.d.ts +145 -145
  62. package/lib/hosted/browser/hosted-plugin.js +787 -787
  63. package/lib/hosted/browser/plugin-worker.d.ts +6 -6
  64. package/lib/hosted/browser/plugin-worker.js +57 -57
  65. package/lib/hosted/browser/worker/debug-stub.d.ts +3 -3
  66. package/lib/hosted/browser/worker/debug-stub.js +29 -29
  67. package/lib/hosted/browser/worker/plugin-manifest-loader.d.ts +2 -2
  68. package/lib/hosted/browser/worker/plugin-manifest-loader.js +107 -107
  69. package/lib/hosted/browser/worker/worker-env-ext.d.ts +14 -14
  70. package/lib/hosted/browser/worker/worker-env-ext.js +38 -38
  71. package/lib/hosted/browser/worker/worker-main.d.ts +1 -1
  72. package/lib/hosted/browser/worker/worker-main.js +192 -192
  73. package/lib/hosted/node/hosted-plugin-cli-contribution.d.ts +16 -16
  74. package/lib/hosted/node/hosted-plugin-cli-contribution.js +76 -76
  75. package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts +42 -42
  76. package/lib/hosted/node/hosted-plugin-deployer-handler.js +264 -264
  77. package/lib/hosted/node/hosted-plugin-localization-service.d.ts +34 -34
  78. package/lib/hosted/node/hosted-plugin-localization-service.js +239 -239
  79. package/lib/hosted/node/hosted-plugin-process.d.ts +47 -47
  80. package/lib/hosted/node/hosted-plugin-process.js +224 -224
  81. package/lib/hosted/node/hosted-plugin-protocol.d.ts +21 -21
  82. package/lib/hosted/node/hosted-plugin-protocol.js +36 -36
  83. package/lib/hosted/node/hosted-plugin.d.ts +36 -36
  84. package/lib/hosted/node/hosted-plugin.js +118 -118
  85. package/lib/hosted/node/metadata-scanner.d.ts +17 -17
  86. package/lib/hosted/node/metadata-scanner.js +82 -82
  87. package/lib/hosted/node/plugin-ext-hosted-backend-module.d.ts +3 -3
  88. package/lib/hosted/node/plugin-ext-hosted-backend-module.js +73 -73
  89. package/lib/hosted/node/plugin-host-proxy.d.ts +17 -17
  90. package/lib/hosted/node/plugin-host-proxy.js +69 -69
  91. package/lib/hosted/node/plugin-host-rpc.d.ts +21 -21
  92. package/lib/hosted/node/plugin-host-rpc.js +216 -216
  93. package/lib/hosted/node/plugin-host.d.ts +1 -1
  94. package/lib/hosted/node/plugin-host.js +101 -101
  95. package/lib/hosted/node/plugin-manifest-loader.d.ts +1 -1
  96. package/lib/hosted/node/plugin-manifest-loader.js +34 -34
  97. package/lib/hosted/node/plugin-reader.d.ts +25 -25
  98. package/lib/hosted/node/plugin-reader.js +141 -141
  99. package/lib/hosted/node/plugin-service.d.ts +39 -39
  100. package/lib/hosted/node/plugin-service.js +193 -193
  101. package/lib/hosted/node/scanners/backend-init-theia.d.ts +2 -2
  102. package/lib/hosted/node/scanners/backend-init-theia.js +60 -60
  103. package/lib/hosted/node/scanners/file-plugin-uri-factory.d.ts +10 -10
  104. package/lib/hosted/node/scanners/file-plugin-uri-factory.js +40 -40
  105. package/lib/hosted/node/scanners/grammars-reader.d.ts +5 -5
  106. package/lib/hosted/node/scanners/grammars-reader.js +63 -63
  107. package/lib/hosted/node/scanners/plugin-uri-factory.d.ts +16 -16
  108. package/lib/hosted/node/scanners/plugin-uri-factory.js +19 -19
  109. package/lib/hosted/node/scanners/scanner-theia.d.ts +56 -56
  110. package/lib/hosted/node/scanners/scanner-theia.js +842 -842
  111. package/lib/hosted/node-electron/plugin-ext-hosted-electron-backend-module.d.ts +2 -2
  112. package/lib/hosted/node-electron/plugin-ext-hosted-electron-backend-module.js +26 -26
  113. package/lib/hosted/node-electron/scanner-theia-electron.d.ts +5 -5
  114. package/lib/hosted/node-electron/scanner-theia-electron.js +40 -40
  115. package/lib/main/browser/authentication-main.d.ts +51 -51
  116. package/lib/main/browser/authentication-main.js +299 -299
  117. package/lib/main/browser/clipboard-main.d.ts +9 -9
  118. package/lib/main/browser/clipboard-main.js +32 -32
  119. package/lib/main/browser/command-registry-main.d.ts +23 -23
  120. package/lib/main/browser/command-registry-main.js +97 -97
  121. package/lib/main/browser/commands.d.ts +12 -12
  122. package/lib/main/browser/commands.js +102 -102
  123. package/lib/main/browser/comments/comment-glyph-widget.d.ts +12 -12
  124. package/lib/main/browser/comments/comment-glyph-widget.js +42 -42
  125. package/lib/main/browser/comments/comment-thread-widget.d.ts +153 -153
  126. package/lib/main/browser/comments/comment-thread-widget.js +466 -466
  127. package/lib/main/browser/comments/comments-context-key-service.d.ts +17 -17
  128. package/lib/main/browser/comments/comments-context-key-service.js +80 -80
  129. package/lib/main/browser/comments/comments-contribution.d.ts +31 -31
  130. package/lib/main/browser/comments/comments-contribution.js +264 -264
  131. package/lib/main/browser/comments/comments-decorator.d.ts +15 -15
  132. package/lib/main/browser/comments/comments-decorator.js +107 -107
  133. package/lib/main/browser/comments/comments-main.d.ts +106 -106
  134. package/lib/main/browser/comments/comments-main.js +341 -341
  135. package/lib/main/browser/comments/comments-service.d.ts +75 -75
  136. package/lib/main/browser/comments/comments-service.js +120 -120
  137. package/lib/main/browser/custom-editors/custom-editor-contribution.d.ts +6 -6
  138. package/lib/main/browser/custom-editors/custom-editor-contribution.js +50 -50
  139. package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +21 -21
  140. package/lib/main/browser/custom-editors/custom-editor-opener.js +111 -111
  141. package/lib/main/browser/custom-editors/custom-editor-service.d.ts +16 -16
  142. package/lib/main/browser/custom-editors/custom-editor-service.js +102 -102
  143. package/lib/main/browser/custom-editors/custom-editor-widget-factory.d.ts +9 -9
  144. package/lib/main/browser/custom-editors/custom-editor-widget-factory.js +39 -39
  145. package/lib/main/browser/custom-editors/custom-editor-widget.d.ts +36 -36
  146. package/lib/main/browser/custom-editors/custom-editor-widget.js +115 -115
  147. package/lib/main/browser/custom-editors/custom-editors-main.d.ts +120 -120
  148. package/lib/main/browser/custom-editors/custom-editors-main.js +447 -447
  149. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts +23 -23
  150. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js +142 -142
  151. package/lib/main/browser/custom-editors/undo-redo-service.d.ts +23 -23
  152. package/lib/main/browser/custom-editors/undo-redo-service.js +110 -110
  153. package/lib/main/browser/debug/debug-main.d.ts +48 -48
  154. package/lib/main/browser/debug/debug-main.js +295 -295
  155. package/lib/main/browser/debug/plugin-debug-adapter-contribution.d.ts +18 -18
  156. package/lib/main/browser/debug/plugin-debug-adapter-contribution.js +42 -42
  157. package/lib/main/browser/debug/plugin-debug-configuration-provider.d.ts +12 -12
  158. package/lib/main/browser/debug/plugin-debug-configuration-provider.js +38 -38
  159. package/lib/main/browser/debug/plugin-debug-service.d.ts +52 -52
  160. package/lib/main/browser/debug/plugin-debug-service.js +283 -283
  161. package/lib/main/browser/debug/plugin-debug-session-contribution-registry.d.ts +30 -30
  162. package/lib/main/browser/debug/plugin-debug-session-contribution-registry.js +75 -75
  163. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +55 -55
  164. package/lib/main/browser/debug/plugin-debug-session-factory.js +70 -70
  165. package/lib/main/browser/decorations/decorations-main.d.ts +15 -15
  166. package/lib/main/browser/decorations/decorations-main.js +119 -119
  167. package/lib/main/browser/dialogs/modal-notification.d.ts +18 -18
  168. package/lib/main/browser/dialogs/modal-notification.js +107 -107
  169. package/lib/main/browser/dialogs-main.d.ts +16 -16
  170. package/lib/main/browser/dialogs-main.js +162 -162
  171. package/lib/main/browser/documents-main.d.ts +50 -50
  172. package/lib/main/browser/documents-main.js +249 -249
  173. package/lib/main/browser/editors-and-documents-main.d.ts +32 -32
  174. package/lib/main/browser/editors-and-documents-main.js +301 -301
  175. package/lib/main/browser/env-main.d.ts +15 -15
  176. package/lib/main/browser/env-main.js +82 -82
  177. package/lib/main/browser/file-system-main-impl.d.ts +27 -27
  178. package/lib/main/browser/file-system-main-impl.js +199 -199
  179. package/lib/main/browser/hierarchy/hierarchy-types-converters.d.ts +24 -24
  180. package/lib/main/browser/hierarchy/hierarchy-types-converters.js +174 -174
  181. package/lib/main/browser/keybindings/keybindings-contribution-handler.d.ts +9 -9
  182. package/lib/main/browser/keybindings/keybindings-contribution-handler.js +77 -77
  183. package/lib/main/browser/label-service-main.d.ts +10 -10
  184. package/lib/main/browser/label-service-main.js +46 -46
  185. package/lib/main/browser/languages-main.d.ts +136 -136
  186. package/lib/main/browser/languages-main.js +1116 -1116
  187. package/lib/main/browser/main-context.d.ts +3 -3
  188. package/lib/main/browser/main-context.js +137 -137
  189. package/lib/main/browser/main-file-system-event-service.d.ts +7 -7
  190. package/lib/main/browser/main-file-system-event-service.d.ts.map +1 -1
  191. package/lib/main/browser/main-file-system-event-service.js +65 -68
  192. package/lib/main/browser/main-file-system-event-service.js.map +1 -1
  193. package/lib/main/browser/menus/menus-contribution-handler.d.ts +29 -29
  194. package/lib/main/browser/menus/menus-contribution-handler.js +194 -194
  195. package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts +43 -43
  196. package/lib/main/browser/menus/plugin-menu-command-adapter.js +279 -279
  197. package/lib/main/browser/menus/vscode-theia-menu-mappings.d.ts +17 -17
  198. package/lib/main/browser/menus/vscode-theia-menu-mappings.js +93 -93
  199. package/lib/main/browser/message-registry-main.d.ts +8 -8
  200. package/lib/main/browser/message-registry-main.js +52 -52
  201. package/lib/main/browser/notification-main.d.ts +18 -18
  202. package/lib/main/browser/notification-main.js +75 -75
  203. package/lib/main/browser/output-channel-registry-main.d.ts +10 -10
  204. package/lib/main/browser/output-channel-registry-main.js +60 -60
  205. package/lib/main/browser/plugin-authentication-service.d.ts +13 -13
  206. package/lib/main/browser/plugin-authentication-service.js +80 -80
  207. package/lib/main/browser/plugin-contribution-handler.d.ts +66 -66
  208. package/lib/main/browser/plugin-contribution-handler.js +580 -580
  209. package/lib/main/browser/plugin-ext-frontend-module.d.ts +7 -7
  210. package/lib/main/browser/plugin-ext-frontend-module.js +216 -216
  211. package/lib/main/browser/plugin-ext-widget.d.ts +28 -28
  212. package/lib/main/browser/plugin-ext-widget.js +129 -129
  213. package/lib/main/browser/plugin-frontend-contribution.d.ts +6 -6
  214. package/lib/main/browser/plugin-frontend-contribution.js +45 -45
  215. package/lib/main/browser/plugin-frontend-view-contribution.d.ts +6 -6
  216. package/lib/main/browser/plugin-frontend-view-contribution.js +50 -50
  217. package/lib/main/browser/plugin-icon-theme-service.d.ts +135 -135
  218. package/lib/main/browser/plugin-icon-theme-service.js +519 -519
  219. package/lib/main/browser/plugin-shared-style.d.ts +36 -36
  220. package/lib/main/browser/plugin-shared-style.js +126 -126
  221. package/lib/main/browser/plugin-storage.d.ts +13 -13
  222. package/lib/main/browser/plugin-storage.js +46 -46
  223. package/lib/main/browser/plugin-terminal-registry.d.ts +4 -4
  224. package/lib/main/browser/plugin-terminal-registry.js +34 -34
  225. package/lib/main/browser/preference-registry-main.d.ts +19 -19
  226. package/lib/main/browser/preference-registry-main.js +104 -104
  227. package/lib/main/browser/quick-open-main.d.ts +31 -31
  228. package/lib/main/browser/quick-open-main.js +274 -274
  229. package/lib/main/browser/scm-main.d.ts +100 -100
  230. package/lib/main/browser/scm-main.js +330 -330
  231. package/lib/main/browser/secrets-main.d.ts +12 -12
  232. package/lib/main/browser/secrets-main.js +67 -67
  233. package/lib/main/browser/selection-provider-command.d.ts +12 -12
  234. package/lib/main/browser/selection-provider-command.js +57 -57
  235. package/lib/main/browser/status-bar-message-registry-main.d.ts +16 -16
  236. package/lib/main/browser/status-bar-message-registry-main.js +55 -55
  237. package/lib/main/browser/tabs/tabs-main.d.ts +40 -40
  238. package/lib/main/browser/tabs/tabs-main.js +282 -282
  239. package/lib/main/browser/tasks-main.d.ts +33 -33
  240. package/lib/main/browser/tasks-main.js +205 -205
  241. package/lib/main/browser/terminal-main.d.ts +49 -49
  242. package/lib/main/browser/terminal-main.js +268 -268
  243. package/lib/main/browser/text-editor-main.d.ts +47 -47
  244. package/lib/main/browser/text-editor-main.js +374 -374
  245. package/lib/main/browser/text-editor-model-service.d.ts +28 -28
  246. package/lib/main/browser/text-editor-model-service.js +108 -108
  247. package/lib/main/browser/text-editors-main.d.ts +38 -38
  248. package/lib/main/browser/text-editors-main.js +158 -158
  249. package/lib/main/browser/theme-icon-override.d.ts +1 -1
  250. package/lib/main/browser/theme-icon-override.js +247 -247
  251. package/lib/main/browser/theming-main.d.ts +9 -9
  252. package/lib/main/browser/theming-main.js +35 -35
  253. package/lib/main/browser/timeline-main.d.ts +13 -13
  254. package/lib/main/browser/timeline-main.js +46 -46
  255. package/lib/main/browser/view/dnd-file-content-store.d.ts +7 -7
  256. package/lib/main/browser/view/dnd-file-content-store.js +51 -51
  257. package/lib/main/browser/view/plugin-tree-view-node-label-provider.d.ts +11 -11
  258. package/lib/main/browser/view/plugin-tree-view-node-label-provider.js +90 -90
  259. package/lib/main/browser/view/plugin-view-registry.d.ts +106 -106
  260. package/lib/main/browser/view/plugin-view-registry.js +836 -836
  261. package/lib/main/browser/view/plugin-view-widget.d.ts +50 -50
  262. package/lib/main/browser/view/plugin-view-widget.js +166 -166
  263. package/lib/main/browser/view/tree-view-decorator-service.d.ts +30 -30
  264. package/lib/main/browser/view/tree-view-decorator-service.js +68 -68
  265. package/lib/main/browser/view/tree-view-widget.d.ts +160 -160
  266. package/lib/main/browser/view/tree-view-widget.js +761 -761
  267. package/lib/main/browser/view/tree-views-main.d.ts +31 -31
  268. package/lib/main/browser/view/tree-views-main.js +163 -163
  269. package/lib/main/browser/view/view-context-key-service.d.ts +30 -30
  270. package/lib/main/browser/view/view-context-key-service.js +84 -84
  271. package/lib/main/browser/view-column-service.d.ts +23 -23
  272. package/lib/main/browser/view-column-service.js +129 -129
  273. package/lib/main/browser/webview/webview-environment.d.ts +15 -15
  274. package/lib/main/browser/webview/webview-environment.js +93 -93
  275. package/lib/main/browser/webview/webview-frontend-security-warnings.d.ts +11 -11
  276. package/lib/main/browser/webview/webview-frontend-security-warnings.js +73 -73
  277. package/lib/main/browser/webview/webview-preferences.d.ts +12 -12
  278. package/lib/main/browser/webview/webview-preferences.js +57 -57
  279. package/lib/main/browser/webview/webview-resource-cache.d.ts +17 -17
  280. package/lib/main/browser/webview/webview-resource-cache.js +90 -90
  281. package/lib/main/browser/webview/webview-theme-data-provider.d.ts +30 -30
  282. package/lib/main/browser/webview/webview-theme-data-provider.js +132 -132
  283. package/lib/main/browser/webview/webview-widget-factory.d.ts +8 -8
  284. package/lib/main/browser/webview/webview-widget-factory.js +38 -38
  285. package/lib/main/browser/webview/webview.d.ts +130 -130
  286. package/lib/main/browser/webview/webview.js +549 -549
  287. package/lib/main/browser/webview-views/webview-views-main.d.ts +30 -30
  288. package/lib/main/browser/webview-views/webview-views-main.js +126 -126
  289. package/lib/main/browser/webview-views/webview-views.d.ts +14 -14
  290. package/lib/main/browser/webview-views/webview-views.js +22 -22
  291. package/lib/main/browser/webviews-main.d.ts +39 -39
  292. package/lib/main/browser/webviews-main.js +231 -231
  293. package/lib/main/browser/window-state-main.d.ts +16 -16
  294. package/lib/main/browser/window-state-main.js +61 -61
  295. package/lib/main/browser/workspace-main.d.ts +69 -69
  296. package/lib/main/browser/workspace-main.js +316 -316
  297. package/lib/main/common/plugin-paths-protocol.d.ts +8 -8
  298. package/lib/main/common/plugin-paths-protocol.js +21 -21
  299. package/lib/main/common/plugin-theia-environment.d.ts +7 -7
  300. package/lib/main/common/plugin-theia-environment.js +47 -47
  301. package/lib/main/common/webview-protocol.d.ts +12 -12
  302. package/lib/main/common/webview-protocol.js +31 -31
  303. package/lib/main/electron-browser/plugin-ext-frontend-electron-module.d.ts +3 -3
  304. package/lib/main/electron-browser/plugin-ext-frontend-electron-module.js +25 -25
  305. package/lib/main/electron-browser/webview/electron-webview-widget-factory.d.ts +22 -22
  306. package/lib/main/electron-browser/webview/electron-webview-widget-factory.js +64 -64
  307. package/lib/main/node/handlers/plugin-theia-directory-handler.d.ts +10 -10
  308. package/lib/main/node/handlers/plugin-theia-directory-handler.js +113 -113
  309. package/lib/main/node/handlers/plugin-theia-file-handler.d.ts +9 -9
  310. package/lib/main/node/handlers/plugin-theia-file-handler.js +66 -66
  311. package/lib/main/node/paths/const.d.ts +5 -5
  312. package/lib/main/node/paths/const.js +24 -24
  313. package/lib/main/node/paths/plugin-paths-service.d.ts +23 -23
  314. package/lib/main/node/paths/plugin-paths-service.js +169 -169
  315. package/lib/main/node/plugin-cli-contribution.d.ts +21 -21
  316. package/lib/main/node/plugin-cli-contribution.js +84 -84
  317. package/lib/main/node/plugin-deployer-contribution.d.ts +8 -8
  318. package/lib/main/node/plugin-deployer-contribution.js +47 -47
  319. package/lib/main/node/plugin-deployer-directory-handler-context-impl.d.ts +7 -7
  320. package/lib/main/node/plugin-deployer-directory-handler-context-impl.js +44 -44
  321. package/lib/main/node/plugin-deployer-entry-impl.d.ts +34 -34
  322. package/lib/main/node/plugin-deployer-entry-impl.js +109 -109
  323. package/lib/main/node/plugin-deployer-file-handler-context-impl.d.ts +7 -7
  324. package/lib/main/node/plugin-deployer-file-handler-context-impl.js +31 -31
  325. package/lib/main/node/plugin-deployer-impl.d.ts +61 -61
  326. package/lib/main/node/plugin-deployer-impl.js +341 -341
  327. package/lib/main/node/plugin-deployer-proxy-entry-impl.d.ts +29 -29
  328. package/lib/main/node/plugin-deployer-proxy-entry-impl.js +98 -98
  329. package/lib/main/node/plugin-deployer-resolver-context-impl.d.ts +15 -15
  330. package/lib/main/node/plugin-deployer-resolver-context-impl.js +42 -42
  331. package/lib/main/node/plugin-ext-backend-module.d.ts +2 -2
  332. package/lib/main/node/plugin-ext-backend-module.js +70 -70
  333. package/lib/main/node/plugin-github-resolver.d.ts +21 -21
  334. package/lib/main/node/plugin-github-resolver.js +142 -142
  335. package/lib/main/node/plugin-http-resolver.d.ts +18 -18
  336. package/lib/main/node/plugin-http-resolver.js +91 -91
  337. package/lib/main/node/plugin-localization-backend-contribution.d.ts +9 -9
  338. package/lib/main/node/plugin-localization-backend-contribution.js +58 -58
  339. package/lib/main/node/plugin-server-handler.d.ts +16 -16
  340. package/lib/main/node/plugin-server-handler.js +74 -74
  341. package/lib/main/node/plugin-service.d.ts +19 -19
  342. package/lib/main/node/plugin-service.js +91 -91
  343. package/lib/main/node/plugin-theia-deployer-participant.d.ts +6 -6
  344. package/lib/main/node/plugin-theia-deployer-participant.js +43 -43
  345. package/lib/main/node/plugin-uninstallation-manager.d.ts +14 -14
  346. package/lib/main/node/plugin-uninstallation-manager.js +84 -84
  347. package/lib/main/node/plugins-key-value-storage.d.ts +15 -15
  348. package/lib/main/node/plugins-key-value-storage.js +128 -128
  349. package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.d.ts +7 -7
  350. package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.js +43 -43
  351. package/lib/main/node/resolvers/local-plugin-deployer-resolver.d.ts +8 -8
  352. package/lib/main/node/resolvers/local-plugin-deployer-resolver.js +59 -59
  353. package/lib/main/node/temp-dir-util.d.ts +1 -1
  354. package/lib/main/node/temp-dir-util.js +30 -30
  355. package/lib/main/node/webview-backend-security-warnings.d.ts +5 -5
  356. package/lib/main/node/webview-backend-security-warnings.js +51 -51
  357. package/lib/plugin/authentication-ext.d.ts +34 -34
  358. package/lib/plugin/authentication-ext.js +94 -94
  359. package/lib/plugin/clipboard-ext.d.ts +9 -9
  360. package/lib/plugin/clipboard-ext.js +31 -31
  361. package/lib/plugin/command-registry.d.ts +43 -43
  362. package/lib/plugin/command-registry.js +176 -176
  363. package/lib/plugin/comments.d.ts +89 -89
  364. package/lib/plugin/comments.js +368 -368
  365. package/lib/plugin/custom-editors.d.ts +47 -47
  366. package/lib/plugin/custom-editors.js +255 -255
  367. package/lib/plugin/debug/debug-ext.d.ts +86 -86
  368. package/lib/plugin/debug/debug-ext.js +391 -391
  369. package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts +10 -10
  370. package/lib/plugin/debug/plugin-debug-adapter-creator.js +41 -41
  371. package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +26 -26
  372. package/lib/plugin/debug/plugin-debug-adapter-session.js +96 -96
  373. package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts +12 -12
  374. package/lib/plugin/debug/plugin-debug-adapter-tracker.js +77 -77
  375. package/lib/plugin/decorations.d.ts +14 -14
  376. package/lib/plugin/decorations.js +112 -112
  377. package/lib/plugin/dialogs.d.ts +10 -10
  378. package/lib/plugin/dialogs.js +91 -91
  379. package/lib/plugin/document-data.d.ts +38 -38
  380. package/lib/plugin/document-data.js +309 -309
  381. package/lib/plugin/documents.d.ts +56 -56
  382. package/lib/plugin/documents.js +253 -253
  383. package/lib/plugin/editors-and-documents.d.ts +26 -26
  384. package/lib/plugin/editors-and-documents.js +137 -137
  385. package/lib/plugin/env.d.ts +42 -42
  386. package/lib/plugin/env.js +101 -101
  387. package/lib/plugin/file-system-event-service-ext-impl.d.ts +40 -40
  388. package/lib/plugin/file-system-event-service-ext-impl.js +203 -203
  389. package/lib/plugin/file-system-ext-impl.d.ts +50 -50
  390. package/lib/plugin/file-system-ext-impl.js +354 -354
  391. package/lib/plugin/known-commands.d.ts +5 -5
  392. package/lib/plugin/known-commands.js +386 -386
  393. package/lib/plugin/known-commands.spec.d.ts +1 -1
  394. package/lib/plugin/known-commands.spec.js +42 -42
  395. package/lib/plugin/label-service.d.ts +11 -11
  396. package/lib/plugin/label-service.js +35 -35
  397. package/lib/plugin/languages/call-hierarchy.d.ts +20 -20
  398. package/lib/plugin/languages/call-hierarchy.js +101 -101
  399. package/lib/plugin/languages/code-action.d.ts +24 -24
  400. package/lib/plugin/languages/code-action.js +137 -137
  401. package/lib/plugin/languages/color.d.ts +12 -12
  402. package/lib/plugin/languages/color.js +58 -58
  403. package/lib/plugin/languages/completion.d.ts +20 -20
  404. package/lib/plugin/languages/completion.js +161 -161
  405. package/lib/plugin/languages/declaration.d.ts +11 -11
  406. package/lib/plugin/languages/declaration.js +58 -58
  407. package/lib/plugin/languages/definition.d.ts +11 -11
  408. package/lib/plugin/languages/definition.js +58 -58
  409. package/lib/plugin/languages/diagnostics.d.ts +49 -49
  410. package/lib/plugin/languages/diagnostics.js +281 -281
  411. package/lib/plugin/languages/document-formatting.d.ts +10 -10
  412. package/lib/plugin/languages/document-formatting.js +40 -40
  413. package/lib/plugin/languages/document-highlight.d.ts +12 -12
  414. package/lib/plugin/languages/document-highlight.js +50 -50
  415. package/lib/plugin/languages/evaluatable-expression.d.ts +11 -11
  416. package/lib/plugin/languages/evaluatable-expression.js +40 -40
  417. package/lib/plugin/languages/folding.d.ts +10 -10
  418. package/lib/plugin/languages/folding.js +39 -39
  419. package/lib/plugin/languages/hover.d.ts +11 -11
  420. package/lib/plugin/languages/hover.js +48 -48
  421. package/lib/plugin/languages/implementation.d.ts +11 -11
  422. package/lib/plugin/languages/implementation.js +58 -58
  423. package/lib/plugin/languages/inlay-hints.d.ts +19 -19
  424. package/lib/plugin/languages/inlay-hints.js +127 -127
  425. package/lib/plugin/languages/inline-completion.d.ts +20 -20
  426. package/lib/plugin/languages/inline-completion.js +93 -93
  427. package/lib/plugin/languages/inline-values.d.ts +10 -10
  428. package/lib/plugin/languages/inline-values.js +44 -44
  429. package/lib/plugin/languages/lens.d.ts +19 -19
  430. package/lib/plugin/languages/lens.js +89 -89
  431. package/lib/plugin/languages/link-provider.d.ts +14 -14
  432. package/lib/plugin/languages/link-provider.js +71 -71
  433. package/lib/plugin/languages/linked-editing-range.d.ts +11 -11
  434. package/lib/plugin/languages/linked-editing-range.js +40 -40
  435. package/lib/plugin/languages/on-type-formatting.d.ts +11 -11
  436. package/lib/plugin/languages/on-type-formatting.js +41 -41
  437. package/lib/plugin/languages/outline.d.ts +20 -20
  438. package/lib/plugin/languages/outline.js +115 -115
  439. package/lib/plugin/languages/range-formatting.d.ts +10 -10
  440. package/lib/plugin/languages/range-formatting.js +41 -41
  441. package/lib/plugin/languages/reference.d.ts +11 -11
  442. package/lib/plugin/languages/reference.js +47 -47
  443. package/lib/plugin/languages/rename.d.ts +14 -14
  444. package/lib/plugin/languages/rename.js +114 -114
  445. package/lib/plugin/languages/selection-range.d.ts +11 -11
  446. package/lib/plugin/languages/selection-range.js +65 -65
  447. package/lib/plugin/languages/semantic-highlighting.d.ts +28 -28
  448. package/lib/plugin/languages/semantic-highlighting.js +175 -175
  449. package/lib/plugin/languages/signature.d.ts +15 -15
  450. package/lib/plugin/languages/signature.js +71 -71
  451. package/lib/plugin/languages/type-definition.d.ts +11 -11
  452. package/lib/plugin/languages/type-definition.js +58 -58
  453. package/lib/plugin/languages/type-hierarchy.d.ts +18 -18
  454. package/lib/plugin/languages/type-hierarchy.js +95 -95
  455. package/lib/plugin/languages/util.d.ts +4 -4
  456. package/lib/plugin/languages/util.js +27 -27
  457. package/lib/plugin/languages/workspace-symbol.d.ts +8 -8
  458. package/lib/plugin/languages/workspace-symbol.js +61 -61
  459. package/lib/plugin/languages-utils.d.ts +5 -5
  460. package/lib/plugin/languages-utils.js +52 -52
  461. package/lib/plugin/languages.d.ts +118 -118
  462. package/lib/plugin/languages.js +679 -679
  463. package/lib/plugin/markdown-string.d.ts +24 -24
  464. package/lib/plugin/markdown-string.js +124 -124
  465. package/lib/plugin/message-registry.d.ts +8 -8
  466. package/lib/plugin/message-registry.js +60 -60
  467. package/lib/plugin/node/debug/debug.spec.d.ts +1 -1
  468. package/lib/plugin/node/debug/debug.spec.js +67 -67
  469. package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts +17 -17
  470. package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.js +154 -154
  471. package/lib/plugin/node/env-node-ext.d.ts +21 -21
  472. package/lib/plugin/node/env-node-ext.js +63 -63
  473. package/lib/plugin/notification.d.ts +17 -17
  474. package/lib/plugin/notification.js +67 -67
  475. package/lib/plugin/output-channel/output-channel-item.d.ts +17 -17
  476. package/lib/plugin/output-channel/output-channel-item.js +51 -51
  477. package/lib/plugin/output-channel-registry.d.ts +8 -8
  478. package/lib/plugin/output-channel-registry.js +35 -35
  479. package/lib/plugin/path.d.ts +2 -2
  480. package/lib/plugin/path.js +59 -59
  481. package/lib/plugin/path.spec.d.ts +1 -1
  482. package/lib/plugin/path.spec.js +34 -34
  483. package/lib/plugin/plugin-context.d.ts +56 -56
  484. package/lib/plugin/plugin-context.js +1072 -1072
  485. package/lib/plugin/plugin-icon-path.d.ts +11 -11
  486. package/lib/plugin/plugin-icon-path.js +49 -49
  487. package/lib/plugin/plugin-manager.d.ts +80 -80
  488. package/lib/plugin/plugin-manager.js +366 -366
  489. package/lib/plugin/plugin-storage.d.ts +36 -36
  490. package/lib/plugin/plugin-storage.js +99 -99
  491. package/lib/plugin/preference-registry.d.ts +36 -36
  492. package/lib/plugin/preference-registry.js +295 -295
  493. package/lib/plugin/preference-registry.spec.d.ts +1 -1
  494. package/lib/plugin/preference-registry.spec.js +251 -251
  495. package/lib/plugin/prefix-sum-computer.d.ts +30 -30
  496. package/lib/plugin/prefix-sum-computer.js +172 -172
  497. package/lib/plugin/quick-open.d.ts +202 -202
  498. package/lib/plugin/quick-open.js +637 -637
  499. package/lib/plugin/scm.d.ts +53 -53
  500. package/lib/plugin/scm.js +713 -713
  501. package/lib/plugin/secrets-ext.d.ts +30 -30
  502. package/lib/plugin/secrets-ext.js +68 -68
  503. package/lib/plugin/status-bar/status-bar-item.d.ts +44 -44
  504. package/lib/plugin/status-bar/status-bar-item.js +122 -122
  505. package/lib/plugin/status-bar-message-registry.d.ts +20 -20
  506. package/lib/plugin/status-bar-message-registry.js +84 -84
  507. package/lib/plugin/stubs/tests-api.d.ts +22 -22
  508. package/lib/plugin/stubs/tests-api.js +66 -66
  509. package/lib/plugin/tabs.d.ts +22 -22
  510. package/lib/plugin/tabs.js +358 -358
  511. package/lib/plugin/tasks/task-provider.d.ts +8 -8
  512. package/lib/plugin/tasks/task-provider.js +56 -56
  513. package/lib/plugin/tasks/tasks.d.ts +45 -45
  514. package/lib/plugin/tasks/tasks.js +210 -210
  515. package/lib/plugin/terminal-ext.d.ts +101 -101
  516. package/lib/plugin/terminal-ext.js +422 -422
  517. package/lib/plugin/text-editor.d.ts +100 -100
  518. package/lib/plugin/text-editor.js +409 -409
  519. package/lib/plugin/text-editors.d.ts +37 -37
  520. package/lib/plugin/text-editors.js +126 -126
  521. package/lib/plugin/theming.d.ts +15 -15
  522. package/lib/plugin/theming.js +61 -61
  523. package/lib/plugin/timeline.d.ts +20 -20
  524. package/lib/plugin/timeline.js +152 -152
  525. package/lib/plugin/tree/tree-views.d.ts +93 -90
  526. package/lib/plugin/tree/tree-views.d.ts.map +1 -1
  527. package/lib/plugin/tree/tree-views.js +523 -516
  528. package/lib/plugin/tree/tree-views.js.map +1 -1
  529. package/lib/plugin/type-converters.d.ts +131 -131
  530. package/lib/plugin/type-converters.js +1292 -1292
  531. package/lib/plugin/type-converters.spec.d.ts +1 -1
  532. package/lib/plugin/type-converters.spec.js +391 -391
  533. package/lib/plugin/types-impl.d.ts +1464 -1464
  534. package/lib/plugin/types-impl.d.ts.map +1 -1
  535. package/lib/plugin/types-impl.js +2956 -2953
  536. package/lib/plugin/types-impl.js.map +1 -1
  537. package/lib/plugin/types-impl.spec.d.ts +1 -1
  538. package/lib/plugin/types-impl.spec.js +78 -78
  539. package/lib/plugin/webview-views.d.ts +52 -52
  540. package/lib/plugin/webview-views.js +144 -144
  541. package/lib/plugin/webviews.d.ts +95 -95
  542. package/lib/plugin/webviews.js +340 -340
  543. package/lib/plugin/window-state.d.ts +16 -16
  544. package/lib/plugin/window-state.js +55 -55
  545. package/lib/plugin/word-helper.d.ts +21 -21
  546. package/lib/plugin/word-helper.js +125 -125
  547. package/lib/plugin/workspace.d.ts +53 -53
  548. package/lib/plugin/workspace.js +371 -371
  549. package/lib/plugin-ext-backend-electron-module.d.ts +3 -3
  550. package/lib/plugin-ext-backend-electron-module.js +24 -24
  551. package/lib/plugin-ext-backend-module.d.ts +3 -3
  552. package/lib/plugin-ext-backend-module.js +24 -24
  553. package/lib/plugin-ext-frontend-electron-module.d.ts +2 -2
  554. package/lib/plugin-ext-frontend-electron-module.js +19 -19
  555. package/lib/plugin-ext-frontend-module.d.ts +2 -2
  556. package/lib/plugin-ext-frontend-module.js +19 -19
  557. package/package.json +27 -27
  558. package/src/common/arrays.ts +54 -54
  559. package/src/common/assert.ts +23 -23
  560. package/src/common/cache.ts +51 -51
  561. package/src/common/character-classifier.ts +73 -73
  562. package/src/common/collections.ts +37 -37
  563. package/src/common/connection.ts +137 -137
  564. package/src/common/disposable-util.ts +39 -39
  565. package/src/common/editor-options.ts +74 -74
  566. package/src/common/env.ts +19 -19
  567. package/src/common/errors.ts +37 -37
  568. package/src/common/id-generator.ts +26 -26
  569. package/src/common/index.ts +24 -24
  570. package/src/common/link-computer.ts +354 -354
  571. package/src/common/object-identifier.ts +33 -33
  572. package/src/common/objects.ts +50 -50
  573. package/src/common/paths-util.ts +158 -158
  574. package/src/common/plugin-api-rpc-model.ts +864 -864
  575. package/src/common/plugin-api-rpc.ts +2202 -2202
  576. package/src/common/plugin-ext-api-contribution.ts +82 -82
  577. package/src/common/plugin-identifiers.ts +84 -84
  578. package/src/common/plugin-protocol.ts +987 -987
  579. package/src/common/proxy-handler.ts +126 -126
  580. package/src/common/reference-map.ts +38 -38
  581. package/src/common/rpc-protocol.ts +272 -272
  582. package/src/common/semantic-tokens-dto.ts +182 -182
  583. package/src/common/types.ts +129 -129
  584. package/src/common/uint.ts +37 -37
  585. package/src/common/uri-components.ts +85 -85
  586. package/src/hosted/browser/hosted-plugin-watcher.ts +54 -54
  587. package/src/hosted/browser/hosted-plugin.ts +830 -830
  588. package/src/hosted/browser/plugin-worker.ts +52 -52
  589. package/src/hosted/browser/worker/debug-stub.ts +28 -28
  590. package/src/hosted/browser/worker/plugin-manifest-loader.ts +114 -114
  591. package/src/hosted/browser/worker/worker-env-ext.ts +41 -41
  592. package/src/hosted/browser/worker/worker-main.ts +221 -221
  593. package/src/hosted/node/hosted-plugin-cli-contribution.ts +75 -75
  594. package/src/hosted/node/hosted-plugin-deployer-handler.ts +261 -261
  595. package/src/hosted/node/hosted-plugin-localization-service.ts +254 -254
  596. package/src/hosted/node/hosted-plugin-process.ts +248 -248
  597. package/src/hosted/node/hosted-plugin-protocol.ts +49 -49
  598. package/src/hosted/node/hosted-plugin.ts +116 -116
  599. package/src/hosted/node/metadata-scanner.ts +64 -64
  600. package/src/hosted/node/plugin-ext-hosted-backend-module.ts +80 -80
  601. package/src/hosted/node/plugin-host-proxy.ts +80 -80
  602. package/src/hosted/node/plugin-host-rpc.ts +245 -245
  603. package/src/hosted/node/plugin-host.ts +108 -108
  604. package/src/hosted/node/plugin-manifest-loader.ts +31 -31
  605. package/src/hosted/node/plugin-reader.ts +131 -131
  606. package/src/hosted/node/plugin-service.ts +175 -175
  607. package/src/hosted/node/scanners/backend-init-theia.ts +71 -71
  608. package/src/hosted/node/scanners/file-plugin-uri-factory.ts +32 -32
  609. package/src/hosted/node/scanners/grammars-reader.ts +56 -56
  610. package/src/hosted/node/scanners/plugin-uri-factory.ts +33 -33
  611. package/src/hosted/node/scanners/scanner-theia.ts +938 -938
  612. package/src/hosted/node-electron/plugin-ext-hosted-electron-backend-module.ts +26 -26
  613. package/src/hosted/node-electron/scanner-theia-electron.ts +32 -32
  614. package/src/main/browser/authentication-main.ts +369 -369
  615. package/src/main/browser/clipboard-main.ts +38 -38
  616. package/src/main/browser/command-registry-main.ts +110 -110
  617. package/src/main/browser/commands.ts +104 -104
  618. package/src/main/browser/comments/comment-glyph-widget.ts +66 -66
  619. package/src/main/browser/comments/comment-thread-widget.tsx +691 -691
  620. package/src/main/browser/comments/comments-context-key-service.ts +68 -68
  621. package/src/main/browser/comments/comments-contribution.ts +264 -264
  622. package/src/main/browser/comments/comments-decorator.ts +110 -110
  623. package/src/main/browser/comments/comments-main.ts +465 -465
  624. package/src/main/browser/comments/comments-service.ts +205 -205
  625. package/src/main/browser/custom-editors/custom-editor-contribution.ts +38 -38
  626. package/src/main/browser/custom-editors/custom-editor-opener.tsx +105 -105
  627. package/src/main/browser/custom-editors/custom-editor-service.ts +108 -108
  628. package/src/main/browser/custom-editors/custom-editor-widget-factory.ts +44 -44
  629. package/src/main/browser/custom-editors/custom-editor-widget.ts +127 -127
  630. package/src/main/browser/custom-editors/custom-editors-main.ts +606 -606
  631. package/src/main/browser/custom-editors/plugin-custom-editor-registry.ts +142 -142
  632. package/src/main/browser/custom-editors/undo-redo-service.ts +120 -120
  633. package/src/main/browser/debug/debug-main.ts +373 -373
  634. package/src/main/browser/debug/plugin-debug-adapter-contribution.ts +48 -48
  635. package/src/main/browser/debug/plugin-debug-configuration-provider.ts +63 -63
  636. package/src/main/browser/debug/plugin-debug-service.ts +338 -338
  637. package/src/main/browser/debug/plugin-debug-session-contribution-registry.ts +76 -76
  638. package/src/main/browser/debug/plugin-debug-session-factory.ts +105 -105
  639. package/src/main/browser/decorations/decorations-main.ts +146 -146
  640. package/src/main/browser/dialogs/modal-notification.ts +110 -110
  641. package/src/main/browser/dialogs/style/modal-notification.css +123 -123
  642. package/src/main/browser/dialogs-main.ts +185 -185
  643. package/src/main/browser/documents-main.ts +289 -289
  644. package/src/main/browser/editors-and-documents-main.ts +394 -394
  645. package/src/main/browser/env-main.ts +87 -87
  646. package/src/main/browser/file-system-main-impl.ts +263 -263
  647. package/src/main/browser/hierarchy/hierarchy-types-converters.ts +189 -189
  648. package/src/main/browser/keybindings/keybindings-contribution-handler.ts +66 -66
  649. package/src/main/browser/label-service-main.ts +51 -51
  650. package/src/main/browser/languages-main.ts +1387 -1387
  651. package/src/main/browser/main-context.ts +187 -187
  652. package/src/main/browser/main-file-system-event-service.ts +76 -79
  653. package/src/main/browser/menus/menus-contribution-handler.ts +162 -162
  654. package/src/main/browser/menus/plugin-menu-command-adapter.ts +264 -264
  655. package/src/main/browser/menus/vscode-theia-menu-mappings.ts +91 -91
  656. package/src/main/browser/message-registry-main.ts +56 -56
  657. package/src/main/browser/notification-main.ts +86 -86
  658. package/src/main/browser/output-channel-registry-main.ts +53 -53
  659. package/src/main/browser/plugin-authentication-service.ts +71 -71
  660. package/src/main/browser/plugin-contribution-handler.ts +609 -609
  661. package/src/main/browser/plugin-ext-frontend-module.ts +249 -249
  662. package/src/main/browser/plugin-ext-widget.tsx +132 -132
  663. package/src/main/browser/plugin-frontend-contribution.ts +35 -35
  664. package/src/main/browser/plugin-frontend-view-contribution.ts +38 -38
  665. package/src/main/browser/plugin-icon-theme-service.ts +585 -585
  666. package/src/main/browser/plugin-shared-style.ts +133 -133
  667. package/src/main/browser/plugin-storage.ts +55 -55
  668. package/src/main/browser/plugin-terminal-registry.ts +27 -27
  669. package/src/main/browser/preference-registry-main.ts +123 -123
  670. package/src/main/browser/quick-open-main.ts +324 -324
  671. package/src/main/browser/scm-main.ts +453 -453
  672. package/src/main/browser/secrets-main.ts +82 -82
  673. package/src/main/browser/selection-provider-command.ts +46 -46
  674. package/src/main/browser/status-bar-message-registry-main.ts +90 -90
  675. package/src/main/browser/style/comments.css +345 -345
  676. package/src/main/browser/style/index.css +85 -85
  677. package/src/main/browser/style/plugin-sidebar.css +73 -73
  678. package/src/main/browser/style/test.svg +13 -13
  679. package/src/main/browser/style/tree.css +52 -52
  680. package/src/main/browser/style/webview.css +53 -53
  681. package/src/main/browser/tabs/tabs-main.ts +323 -323
  682. package/src/main/browser/tasks-main.ts +268 -268
  683. package/src/main/browser/terminal-main.ts +301 -301
  684. package/src/main/browser/text-editor-main.ts +463 -463
  685. package/src/main/browser/text-editor-model-service.ts +102 -102
  686. package/src/main/browser/text-editors-main.ts +206 -206
  687. package/src/main/browser/theme-icon-override.ts +252 -252
  688. package/src/main/browser/theming-main.ts +42 -42
  689. package/src/main/browser/timeline-main.ts +80 -80
  690. package/src/main/browser/view/dnd-file-content-store.ts +42 -42
  691. package/src/main/browser/view/plugin-tree-view-node-label-provider.ts +81 -81
  692. package/src/main/browser/view/plugin-view-registry.ts +885 -885
  693. package/src/main/browser/view/plugin-view-widget.ts +173 -173
  694. package/src/main/browser/view/tree-view-decorator-service.ts +51 -51
  695. package/src/main/browser/view/tree-view-widget.tsx +859 -859
  696. package/src/main/browser/view/tree-views-main.ts +191 -191
  697. package/src/main/browser/view/view-context-key-service.ts +77 -77
  698. package/src/main/browser/view-column-service.ts +125 -125
  699. package/src/main/browser/webview/pre/fake.html +14 -14
  700. package/src/main/browser/webview/pre/host.js +130 -130
  701. package/src/main/browser/webview/pre/index.html +17 -17
  702. package/src/main/browser/webview/pre/main.js +632 -632
  703. package/src/main/browser/webview/pre/service-worker.js +295 -295
  704. package/src/main/browser/webview/webview-environment.ts +83 -83
  705. package/src/main/browser/webview/webview-frontend-security-warnings.ts +59 -59
  706. package/src/main/browser/webview/webview-preferences.ts +72 -72
  707. package/src/main/browser/webview/webview-resource-cache.ts +88 -88
  708. package/src/main/browser/webview/webview-theme-data-provider.ts +124 -124
  709. package/src/main/browser/webview/webview-widget-factory.ts +43 -43
  710. package/src/main/browser/webview/webview.ts +629 -629
  711. package/src/main/browser/webview-views/webview-views-main.ts +142 -142
  712. package/src/main/browser/webview-views/webview-views.ts +38 -38
  713. package/src/main/browser/webviews-main.ts +269 -269
  714. package/src/main/browser/window-state-main.ts +76 -76
  715. package/src/main/browser/workspace-main.ts +383 -383
  716. package/src/main/common/plugin-paths-protocol.ts +26 -26
  717. package/src/main/common/plugin-theia-environment.ts +36 -36
  718. package/src/main/common/webview-protocol.ts +28 -28
  719. package/src/main/electron-browser/plugin-ext-frontend-electron-module.ts +25 -25
  720. package/src/main/electron-browser/webview/electron-webview-widget-factory.ts +70 -70
  721. package/src/main/node/handlers/plugin-theia-directory-handler.ts +105 -105
  722. package/src/main/node/handlers/plugin-theia-file-handler.ts +54 -54
  723. package/src/main/node/paths/const.ts +21 -21
  724. package/src/main/node/paths/plugin-paths-service.ts +170 -170
  725. package/src/main/node/plugin-cli-contribution.ts +85 -85
  726. package/src/main/node/plugin-deployer-contribution.ts +34 -34
  727. package/src/main/node/plugin-deployer-directory-handler-context-impl.ts +45 -45
  728. package/src/main/node/plugin-deployer-entry-impl.ts +130 -130
  729. package/src/main/node/plugin-deployer-file-handler-context-impl.ts +33 -33
  730. package/src/main/node/plugin-deployer-impl.ts +367 -367
  731. package/src/main/node/plugin-deployer-proxy-entry-impl.ts +96 -96
  732. package/src/main/node/plugin-deployer-resolver-context-impl.ts +55 -55
  733. package/src/main/node/plugin-ext-backend-module.ts +93 -93
  734. package/src/main/node/plugin-github-resolver.ts +148 -148
  735. package/src/main/node/plugin-http-resolver.ts +91 -91
  736. package/src/main/node/plugin-localization-backend-contribution.ts +42 -42
  737. package/src/main/node/plugin-server-handler.ts +69 -69
  738. package/src/main/node/plugin-service.ts +82 -82
  739. package/src/main/node/plugin-theia-deployer-participant.ts +32 -32
  740. package/src/main/node/plugin-uninstallation-manager.ts +74 -74
  741. package/src/main/node/plugins-key-value-storage.ts +117 -117
  742. package/src/main/node/resolvers/local-directory-plugin-deployer-resolver.ts +37 -37
  743. package/src/main/node/resolvers/local-plugin-deployer-resolver.ts +56 -56
  744. package/src/main/node/temp-dir-util.ts +27 -27
  745. package/src/main/node/webview-backend-security-warnings.ts +45 -45
  746. package/src/main/style/status-bar.css +35 -35
  747. package/src/plugin/authentication-ext.ts +125 -125
  748. package/src/plugin/clipboard-ext.ts +37 -37
  749. package/src/plugin/command-registry.ts +218 -218
  750. package/src/plugin/comments.ts +518 -518
  751. package/src/plugin/custom-editors.ts +336 -336
  752. package/src/plugin/debug/debug-ext.ts +487 -487
  753. package/src/plugin/debug/plugin-debug-adapter-creator.ts +50 -50
  754. package/src/plugin/debug/plugin-debug-adapter-session.ts +106 -106
  755. package/src/plugin/debug/plugin-debug-adapter-tracker.ts +85 -85
  756. package/src/plugin/decorations.ts +140 -140
  757. package/src/plugin/dialogs.ts +96 -96
  758. package/src/plugin/document-data.ts +366 -366
  759. package/src/plugin/documents.ts +283 -283
  760. package/src/plugin/editors-and-documents.ts +170 -170
  761. package/src/plugin/env.ts +134 -134
  762. package/src/plugin/file-system-event-service-ext-impl.ts +256 -256
  763. package/src/plugin/file-system-ext-impl.ts +412 -412
  764. package/src/plugin/known-commands.spec.ts +50 -50
  765. package/src/plugin/known-commands.ts +412 -412
  766. package/src/plugin/label-service.ts +36 -36
  767. package/src/plugin/languages/call-hierarchy.ts +124 -124
  768. package/src/plugin/languages/code-action.ts +162 -162
  769. package/src/plugin/languages/color.ts +75 -75
  770. package/src/plugin/languages/completion.ts +179 -179
  771. package/src/plugin/languages/declaration.ts +72 -72
  772. package/src/plugin/languages/definition.ts +73 -73
  773. package/src/plugin/languages/diagnostics.ts +325 -325
  774. package/src/plugin/languages/document-formatting.ts +47 -47
  775. package/src/plugin/languages/document-highlight.ts +61 -61
  776. package/src/plugin/languages/evaluatable-expression.ts +47 -47
  777. package/src/plugin/languages/folding.ts +46 -46
  778. package/src/plugin/languages/hover.ts +58 -58
  779. package/src/plugin/languages/implementation.ts +73 -73
  780. package/src/plugin/languages/inlay-hints.ts +149 -149
  781. package/src/plugin/languages/inline-completion.ts +126 -126
  782. package/src/plugin/languages/inline-values.ts +50 -50
  783. package/src/plugin/languages/lens.ts +102 -102
  784. package/src/plugin/languages/link-provider.ts +79 -79
  785. package/src/plugin/languages/linked-editing-range.ts +48 -48
  786. package/src/plugin/languages/on-type-formatting.ts +50 -50
  787. package/src/plugin/languages/outline.ts +126 -126
  788. package/src/plugin/languages/range-formatting.ts +48 -48
  789. package/src/plugin/languages/reference.ts +58 -58
  790. package/src/plugin/languages/rename.ts +130 -130
  791. package/src/plugin/languages/selection-range.ts +80 -80
  792. package/src/plugin/languages/semantic-highlighting.ts +211 -211
  793. package/src/plugin/languages/signature.ts +82 -82
  794. package/src/plugin/languages/type-definition.ts +73 -73
  795. package/src/plugin/languages/type-hierarchy.ts +117 -117
  796. package/src/plugin/languages/util.ts +26 -26
  797. package/src/plugin/languages/workspace-symbol.ts +66 -66
  798. package/src/plugin/languages-utils.ts +56 -56
  799. package/src/plugin/languages.ts +969 -969
  800. package/src/plugin/markdown-string.ts +115 -115
  801. package/src/plugin/message-registry.ts +65 -65
  802. package/src/plugin/node/debug/debug.spec.ts +94 -94
  803. package/src/plugin/node/debug/plugin-node-debug-adapter-creator.ts +167 -167
  804. package/src/plugin/node/env-node-ext.ts +69 -69
  805. package/src/plugin/notification.ts +80 -80
  806. package/src/plugin/output-channel/output-channel-item.ts +73 -73
  807. package/src/plugin/output-channel-registry.ts +39 -39
  808. package/src/plugin/path.spec.ts +40 -40
  809. package/src/plugin/path.ts +68 -68
  810. package/src/plugin/plugin-context.ts +1387 -1387
  811. package/src/plugin/plugin-icon-path.ts +50 -50
  812. package/src/plugin/plugin-manager.ts +446 -446
  813. package/src/plugin/plugin-storage.ts +120 -120
  814. package/src/plugin/preference-registry.spec.ts +299 -299
  815. package/src/plugin/preference-registry.ts +337 -337
  816. package/src/plugin/prefix-sum-computer.ts +218 -218
  817. package/src/plugin/quick-open.ts +772 -772
  818. package/src/plugin/scm.ts +910 -910
  819. package/src/plugin/secrets-ext.ts +84 -84
  820. package/src/plugin/status-bar/status-bar-item.ts +193 -193
  821. package/src/plugin/status-bar-message-registry.ts +103 -103
  822. package/src/plugin/stubs/tests-api.ts +96 -96
  823. package/src/plugin/tabs.ts +426 -426
  824. package/src/plugin/tasks/task-provider.ts +60 -60
  825. package/src/plugin/tasks/tasks.ts +247 -247
  826. package/src/plugin/terminal-ext.ts +494 -494
  827. package/src/plugin/text-editor.ts +522 -522
  828. package/src/plugin/text-editors.ts +150 -150
  829. package/src/plugin/theming.ts +73 -73
  830. package/src/plugin/timeline.ts +186 -186
  831. package/src/plugin/tree/tree-views.ts +612 -605
  832. package/src/plugin/type-converters.spec.ts +476 -476
  833. package/src/plugin/type-converters.ts +1350 -1350
  834. package/src/plugin/types-impl.spec.ts +85 -85
  835. package/src/plugin/types-impl.ts +3407 -3404
  836. package/src/plugin/webview-views.ts +213 -213
  837. package/src/plugin/webviews.ts +433 -433
  838. package/src/plugin/window-state.ts +68 -68
  839. package/src/plugin/word-helper.ts +162 -162
  840. package/src/plugin/workspace.ts +448 -448
  841. package/src/plugin-ext-backend-electron-module.ts +24 -24
  842. package/src/plugin-ext-backend-module.ts +24 -24
  843. package/src/plugin-ext-frontend-electron-module.ts +19 -19
  844. package/src/plugin-ext-frontend-module.ts +19 -19
  845. package/src/typings/index.d.ts +25 -25
@@ -1,2202 +1,2202 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2018 Red Hat, Inc. and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- /* eslint-disable @typescript-eslint/no-explicit-any */
18
-
19
- import { createProxyIdentifier, ProxyIdentifier, RPCProtocol } from './rpc-protocol';
20
- import * as theia from '@theia/plugin';
21
- import { PluginLifecycle, PluginModel, PluginMetadata, PluginPackage, IconUrl, PluginJsonValidationContribution } from './plugin-protocol';
22
- import { QueryParameters } from './env';
23
- import { TextEditorCursorStyle } from './editor-options';
24
- import {
25
- ConfigurationTarget,
26
- TextEditorLineNumbersStyle,
27
- EndOfLine,
28
- OverviewRulerLane,
29
- FileOperationOptions,
30
- TextDocumentChangeReason,
31
- IndentAction,
32
- } from '../plugin/types-impl';
33
- import { UriComponents } from './uri-components';
34
- import {
35
- SerializedDocumentFilter,
36
- CompletionContext,
37
- MarkdownString,
38
- Range,
39
- Completion,
40
- CompletionResultDto,
41
- MarkerData,
42
- SignatureHelp,
43
- Hover,
44
- EvaluatableExpression,
45
- InlineValue,
46
- InlineValueContext,
47
- DocumentHighlight,
48
- FormattingOptions,
49
- ChainedCacheId,
50
- Definition,
51
- DocumentLink,
52
- CodeLensSymbol,
53
- Command,
54
- TextEdit,
55
- DocumentSymbol,
56
- ReferenceContext,
57
- TextDocumentShowOptions,
58
- WorkspaceRootsChangeEvent,
59
- Location,
60
- Breakpoint,
61
- ColorPresentation,
62
- RenameLocation,
63
- SignatureHelpContext,
64
- CodeAction,
65
- CodeActionContext,
66
- FoldingContext,
67
- FoldingRange,
68
- SelectionRange,
69
- SearchInWorkspaceResult,
70
- CallHierarchyItem,
71
- CallHierarchyIncomingCall,
72
- CallHierarchyOutgoingCall,
73
- Comment,
74
- CommentOptions,
75
- CommentThreadCollapsibleState,
76
- CommentThread,
77
- CommentThreadChangedEvent,
78
- CodeActionProviderDocumentation,
79
- LinkedEditingRanges,
80
- ProvidedTerminalLink,
81
- InlayHint,
82
- CachedSession,
83
- CachedSessionItem,
84
- TypeHierarchyItem,
85
- InlineCompletion,
86
- InlineCompletions,
87
- InlineCompletionContext
88
- } from './plugin-api-rpc-model';
89
- import { ExtPluginApi } from './plugin-ext-api-contribution';
90
- import { KeysToAnyValues, KeysToKeysToAnyValue } from './types';
91
- import {
92
- AuthenticationProviderAuthenticationSessionsChangeEvent,
93
- CancellationToken,
94
- Progress,
95
- ProgressOptions,
96
- } from '@theia/plugin';
97
- import { DebuggerDescription } from '@theia/debug/lib/common/debug-service';
98
- import { DebugProtocol } from '@vscode/debugprotocol';
99
- import { SymbolInformation } from '@theia/core/shared/vscode-languageserver-protocol';
100
- import { ArgumentProcessor } from '../plugin/command-registry';
101
- import * as files from '@theia/filesystem/lib/common/files';
102
- import { BinaryBuffer } from '@theia/core/lib/common/buffer';
103
- import { ResourceLabelFormatter } from '@theia/core/lib/common/label-protocol';
104
- import type {
105
- InternalTimelineOptions,
106
- Timeline,
107
- TimelineChangeEvent,
108
- TimelineProviderDescriptor
109
- } from '@theia/timeline/lib/common/timeline-model';
110
- import { SerializableEnvironmentVariableCollection } from '@theia/terminal/lib/common/base-terminal-protocol';
111
- import { ThemeType } from '@theia/core/lib/common/theme';
112
- import { Disposable } from '@theia/core/lib/common/disposable';
113
- import { isString, isObject, PickOptions, QuickInputButtonHandle } from '@theia/core/lib/common';
114
- import { Severity } from '@theia/core/lib/common/severity';
115
- import { DebugConfiguration, DebugSessionOptions } from '@theia/debug/lib/common/debug-configuration';
116
-
117
- export interface PreferenceData {
118
- [scope: number]: any;
119
- }
120
-
121
- export interface Plugin {
122
- pluginPath: string | undefined;
123
- pluginFolder: string;
124
- pluginUri: string;
125
- model: PluginModel;
126
- rawModel: PluginPackage;
127
- lifecycle: PluginLifecycle;
128
- isUnderDevelopment: boolean;
129
- }
130
-
131
- export interface ConfigStorage {
132
- hostLogPath: string;
133
- hostStoragePath?: string;
134
- hostGlobalStoragePath: string;
135
- }
136
-
137
- export enum UIKind {
138
-
139
- /**
140
- * Extensions are accessed from a desktop application.
141
- */
142
- Desktop = 1,
143
-
144
- /**
145
- * Extensions are accessed from a web browser.
146
- */
147
- Web = 2
148
- }
149
-
150
- export interface EnvInit {
151
- queryParams: QueryParameters;
152
- language: string;
153
- shell: string;
154
- uiKind: UIKind,
155
- appName: string;
156
- appHost: string;
157
- }
158
-
159
- export interface PluginAPI {
160
-
161
- }
162
-
163
- export interface PluginManager {
164
- getAllPlugins(): Plugin[];
165
- getPluginById(pluginId: string): Plugin | undefined;
166
- getPluginExport(pluginId: string): PluginAPI | undefined;
167
- isRunning(pluginId: string): boolean;
168
- isActive(pluginId: string): boolean;
169
- activatePlugin(pluginId: string): PromiseLike<void>;
170
- onDidChange: theia.Event<void>;
171
- }
172
-
173
- export interface PluginAPIFactory {
174
- (plugin: Plugin): typeof theia;
175
- }
176
-
177
- export const emptyPlugin: Plugin = {
178
- lifecycle: {
179
- startMethod: 'empty',
180
- stopMethod: 'empty'
181
- },
182
- model: {
183
- id: 'emptyPlugin',
184
- name: 'emptyPlugin',
185
- publisher: 'Theia',
186
- version: 'empty',
187
- displayName: 'empty',
188
- description: 'empty',
189
- engine: {
190
- type: 'empty',
191
- version: 'empty'
192
- },
193
- packagePath: 'empty',
194
- packageUri: 'empty',
195
- entryPoint: {
196
-
197
- }
198
- },
199
- pluginPath: 'empty',
200
- pluginFolder: 'empty',
201
- pluginUri: 'empty',
202
- rawModel: {
203
- name: 'emptyPlugin',
204
- publisher: 'Theia',
205
- version: 'empty',
206
- displayName: 'empty',
207
- description: 'empty',
208
- engines: {
209
- type: 'empty',
210
- version: 'empty'
211
- },
212
- packagePath: 'empty'
213
- },
214
- isUnderDevelopment: false
215
- };
216
-
217
- export interface PluginManagerInitializeParams {
218
- preferences: PreferenceData
219
- globalState: KeysToKeysToAnyValue
220
- workspaceState: KeysToKeysToAnyValue
221
- env: EnvInit
222
- extApi?: ExtPluginApi[]
223
- webview: WebviewInitData
224
- jsonValidation: PluginJsonValidationContribution[]
225
- }
226
-
227
- export interface PluginManagerStartParams {
228
- plugins: PluginMetadata[]
229
- configStorage: ConfigStorage
230
- activationEvents: string[]
231
- }
232
-
233
- export interface PluginManagerExt {
234
-
235
- /** initialize the manager, should be called only once */
236
- $init(params: PluginManagerInitializeParams): Promise<void>;
237
-
238
- /** load and activate plugins */
239
- $start(params: PluginManagerStartParams): Promise<void>;
240
-
241
- /** deactivate the plugin */
242
- $stop(pluginId: string): Promise<void>;
243
-
244
- /** deactivate all plugins */
245
- $stop(): Promise<void>;
246
-
247
- $updateStoragePath(path: string | undefined): Promise<void>;
248
-
249
- $activateByEvent(event: string): Promise<void>;
250
-
251
- $activatePlugin(id: string): Promise<void>;
252
- }
253
-
254
- export interface CommandRegistryMain {
255
- $registerCommand(command: theia.CommandDescription): void;
256
- $unregisterCommand(id: string): void;
257
-
258
- $registerHandler(id: string): void;
259
- $unregisterHandler(id: string): void;
260
-
261
- $executeCommand<T>(id: string, ...args: any[]): PromiseLike<T | undefined>;
262
- $getCommands(): PromiseLike<string[]>;
263
- $getKeyBinding(commandId: string): PromiseLike<theia.CommandKeyBinding[] | undefined>;
264
- }
265
-
266
- export interface CommandRegistryExt {
267
- $executeCommand<T>(id: string, ...ars: any[]): PromiseLike<T | undefined>;
268
- registerArgumentProcessor(processor: ArgumentProcessor): void;
269
- }
270
-
271
- export interface TerminalServiceExt {
272
- $startProfile(providerId: string, cancellationToken: theia.CancellationToken): Promise<string>;
273
- $terminalCreated(id: string, name: string): void;
274
- $terminalNameChanged(id: string, name: string): void;
275
- $terminalOpened(id: string, processId: number, terminalId: number, cols: number, rows: number): void;
276
- $terminalClosed(id: string, exitStatus: theia.TerminalExitStatus | undefined): void;
277
- $terminalOnInput(id: string, data: string): void;
278
- $terminalSizeChanged(id: string, cols: number, rows: number): void;
279
- $currentTerminalChanged(id: string | undefined): void;
280
- $terminalStateChanged(id: string): void;
281
- $initEnvironmentVariableCollections(collections: [string, SerializableEnvironmentVariableCollection][]): void;
282
- $provideTerminalLinks(line: string, terminalId: string, token: theia.CancellationToken): Promise<ProvidedTerminalLink[]>;
283
- $handleTerminalLink(link: ProvidedTerminalLink): Promise<void>;
284
- getEnvironmentVariableCollection(extensionIdentifier: string): theia.EnvironmentVariableCollection;
285
- }
286
- export interface OutputChannelRegistryExt {
287
- createOutputChannel(name: string, pluginInfo: PluginInfo): theia.OutputChannel
288
- }
289
-
290
- export interface ConnectionMain {
291
- $createConnection(id: string): Promise<void>;
292
- $deleteConnection(id: string): Promise<void>;
293
- $sendMessage(id: string, message: string): void;
294
- }
295
-
296
- export interface ConnectionExt {
297
- $createConnection(id: string): Promise<void>;
298
- $deleteConnection(id: string): Promise<void>
299
- $sendMessage(id: string, message: string): void;
300
- }
301
-
302
- export interface TerminalServiceMain {
303
- /**
304
- * Create new Terminal with Terminal options.
305
- * @param options - object with parameters to create new terminal.
306
- */
307
- $createTerminal(id: string, options: theia.TerminalOptions, parentId?: string, isPseudoTerminal?: boolean): Promise<string>;
308
-
309
- /**
310
- * Send text to the terminal by id.
311
- * @param id - terminal widget id.
312
- * @param text - text content.
313
- * @param addNewLine - in case true - add new line after the text, otherwise - don't apply new line.
314
- */
315
- $sendText(id: string, text: string, addNewLine?: boolean): void;
316
-
317
- /**
318
- * Write data to the terminal by id.
319
- * @param id - terminal widget id.
320
- * @param data - data.
321
- */
322
- $write(id: string, data: string): void;
323
-
324
- /**
325
- * Resize the terminal by id.
326
- * @param id - terminal widget id.
327
- * @param cols - columns.
328
- * @param rows - rows.
329
- */
330
- $resize(id: string, cols: number, rows: number): void;
331
-
332
- /**
333
- * Show terminal on the UI panel.
334
- * @param id - terminal widget id.
335
- * @param preserveFocus - set terminal focus in case true value, and don't set focus otherwise.
336
- */
337
- $show(id: string, preserveFocus?: boolean): void;
338
-
339
- /**
340
- * Hide UI panel where is located terminal widget.
341
- * @param id - terminal widget id.
342
- */
343
- $hide(id: string): void;
344
-
345
- /**
346
- * Destroy terminal.
347
- * @param id - terminal widget id.
348
- */
349
- $dispose(id: string): void;
350
-
351
- /**
352
- * Set the terminal widget name.
353
- * @param id terminal widget id.
354
- * @param name new terminal widget name.
355
- */
356
- $setName(id: string, name: string): void;
357
-
358
- /**
359
- * Send text to the terminal by id.
360
- * @param id - terminal id.
361
- * @param text - text content.
362
- * @param addNewLine - in case true - add new line after the text, otherwise - don't apply new line.
363
- */
364
- $sendTextByTerminalId(id: number, text: string, addNewLine?: boolean): void;
365
-
366
- /**
367
- * Write data to the terminal by id.
368
- * @param id - terminal id.
369
- * @param data - data.
370
- */
371
- $writeByTerminalId(id: number, data: string): void;
372
-
373
- /**
374
- * Resize the terminal by id.
375
- * @param id - terminal id.
376
- * @param cols - columns.
377
- * @param rows - rows.
378
- */
379
- $resizeByTerminalId(id: number, cols: number, rows: number): void;
380
-
381
- /**
382
- * Show terminal on the UI panel.
383
- * @param id - terminal id.
384
- * @param preserveFocus - set terminal focus in case true value, and don't set focus otherwise.
385
- */
386
- $showByTerminalId(id: number, preserveFocus?: boolean): void;
387
-
388
- /**
389
- * Hide UI panel where is located terminal widget.
390
- * @param id - terminal id.
391
- */
392
- $hideByTerminalId(id: number): void;
393
-
394
- /**
395
- * Destroy terminal.
396
- * @param id - terminal id.
397
- * @param waitOnExit - Whether to wait for a key press before closing the terminal.
398
- */
399
- $disposeByTerminalId(id: number, waitOnExit?: boolean | string): void;
400
-
401
- $setEnvironmentVariableCollection(extensionIdentifier: string, persistent: boolean, collection: SerializableEnvironmentVariableCollection | undefined): void;
402
-
403
- /**
404
- * Set the terminal widget name.
405
- * @param id terminal id.
406
- * @param name new terminal widget name.
407
- */
408
- $setNameByTerminalId(id: number, name: string): void;
409
-
410
- /**
411
- * Register a new terminal link provider.
412
- * @param providerId id of the terminal link provider to be registered.
413
- */
414
- $registerTerminalLinkProvider(providerId: string): Promise<void>;
415
-
416
- /**
417
- * Unregister the terminal link provider with the specified id.
418
- * @param providerId id of the terminal link provider to be unregistered.
419
- */
420
- $unregisterTerminalLinkProvider(providerId: string): Promise<void>;
421
- }
422
-
423
- export interface AutoFocus {
424
- autoFocusFirstEntry?: boolean;
425
- // TODO
426
- }
427
-
428
- export enum MainMessageType {
429
- Error,
430
- Warning,
431
- Info
432
- }
433
-
434
- export interface MainMessageOptions {
435
- detail?: string;
436
- modal?: boolean
437
- onCloseActionHandle?: number
438
- }
439
-
440
- export interface MainMessageItem {
441
- title: string,
442
- isCloseAffordance?: boolean;
443
- handle?: number
444
- }
445
-
446
- export interface MessageRegistryMain {
447
- $showMessage(type: MainMessageType, message: string, options: MainMessageOptions, actions: MainMessageItem[]): PromiseLike<number | undefined>;
448
- }
449
-
450
- export interface StatusBarMessageRegistryMain {
451
- $setMessage(id: string,
452
- name: string | undefined,
453
- text: string | undefined,
454
- priority: number,
455
- alignment: theia.StatusBarAlignment,
456
- color: string | undefined,
457
- backgroundColor: string | undefined,
458
- tooltip: string | theia.MarkdownString | undefined,
459
- command: string | undefined,
460
- accessibilityInformation: theia.AccessibilityInformation,
461
- args: any[] | undefined): PromiseLike<void>;
462
- $dispose(id: string): void;
463
- }
464
-
465
- export type Item = string | theia.QuickPickItem;
466
-
467
- export interface QuickOpenExt {
468
- $onItemSelected(handle: number): void;
469
- $validateInput(input: string): Promise<string | { content: string; severity: Severity; } | null | undefined> | undefined;
470
-
471
- $acceptOnDidAccept(sessionId: number): Promise<void>;
472
- $acceptDidChangeValue(sessionId: number, changedValue: string): Promise<void>;
473
- $acceptOnDidHide(sessionId: number): Promise<void>;
474
- $acceptOnDidTriggerButton(sessionId: number, btn: QuickInputButtonHandle): Promise<void>;
475
- $onDidTriggerItemButton(sessionId: number, itemHandle: number, buttonHandle: number): void;
476
- $onDidChangeActive(sessionId: number, handles: number[]): void;
477
- $onDidChangeSelection(sessionId: number, handles: number[]): void;
478
-
479
- /* eslint-disable max-len */
480
- showQuickPick(itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options: theia.QuickPickOptions & { canPickMany: true; },
481
- token?: theia.CancellationToken): Promise<Array<theia.QuickPickItem> | undefined>;
482
- showQuickPick(itemsOrItemsPromise: string[] | Promise<string[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<string | undefined>;
483
- showQuickPick(itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<theia.QuickPickItem | undefined>;
484
- showQuickPick(itemsOrItemsPromise: Item[] | Promise<Item[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<Item | Item[] | undefined>;
485
-
486
- showInput(options?: theia.InputBoxOptions, token?: theia.CancellationToken): PromiseLike<string | undefined>;
487
- // showWorkspaceFolderPick(options?: theia.WorkspaceFolderPickOptions, token?: theia.CancellationToken): Promise<theia.WorkspaceFolder | undefined>
488
- createQuickPick<T extends theia.QuickPickItem>(plugin: Plugin): theia.QuickPick<T>;
489
- createInputBox(plugin: Plugin): theia.InputBox;
490
- }
491
-
492
- /**
493
- * Options to configure the behaviour of a file open dialog.
494
- */
495
- export interface OpenDialogOptionsMain {
496
-
497
- /**
498
- * Dialog title.
499
- * This parameter might be ignored, as not all operating systems display a title on open dialogs.
500
- */
501
- title?: string;
502
-
503
- /**
504
- * The resource the dialog shows when opened.
505
- */
506
- defaultUri?: string;
507
-
508
- /**
509
- * A human-readable string for the open button.
510
- */
511
- openLabel?: string;
512
-
513
- /**
514
- * Allow to select files, defaults to `true`.
515
- */
516
- canSelectFiles?: boolean;
517
-
518
- /**
519
- * Allow to select folders, defaults to `false`.
520
- */
521
- canSelectFolders?: boolean;
522
-
523
- /**
524
- * Allow to select many files or folders.
525
- */
526
- canSelectMany?: boolean;
527
-
528
- /**
529
- * A set of file filters that are used by the dialog. Each entry is a human readable label,
530
- * like "TypeScript", and an array of extensions, e.g.
531
- * ```ts
532
- * {
533
- * 'Images': ['png', 'jpg']
534
- * 'TypeScript': ['ts', 'tsx']
535
- * }
536
- * ```
537
- */
538
- filters?: { [name: string]: string[] };
539
- }
540
-
541
- /**
542
- * Options to configure the behaviour of a file save dialog.
543
- */
544
- export interface SaveDialogOptionsMain {
545
-
546
- /**
547
- * Dialog title.
548
- * This parameter might be ignored, as not all operating systems display a title on save dialogs.
549
- */
550
- title?: string;
551
-
552
- /**
553
- * The resource the dialog shows when opened.
554
- */
555
- defaultUri?: string;
556
-
557
- /**
558
- * A human-readable string for the save button.
559
- */
560
- saveLabel?: string;
561
-
562
- /**
563
- * A set of file filters that are used by the dialog. Each entry is a human readable label,
564
- * like "TypeScript", and an array of extensions, e.g.
565
- * ```ts
566
- * {
567
- * 'Images': ['png', 'jpg']
568
- * 'TypeScript': ['ts', 'tsx']
569
- * }
570
- * ```
571
- */
572
- filters?: { [name: string]: string[] };
573
- }
574
-
575
- /**
576
- * Options to configure the behaviour of a file upload dialog.
577
- */
578
- export interface UploadDialogOptionsMain {
579
- /**
580
- * The resource, where files should be uploaded.
581
- */
582
- defaultUri?: string;
583
- }
584
-
585
- export interface FileUploadResultMain {
586
- uploaded: string[]
587
- }
588
-
589
- /**
590
- * Options to configure the behaviour of the [workspace folder](#WorkspaceFolder) pick UI.
591
- */
592
- export interface WorkspaceFolderPickOptionsMain {
593
- /**
594
- * An optional string to show as place holder in the input box to guide the user what to pick on.
595
- */
596
- placeHolder?: string;
597
-
598
- /**
599
- * Set to `true` to keep the picker open when focus moves to another part of the editor or to another window.
600
- */
601
- ignoreFocusOut?: boolean;
602
- }
603
-
604
- export type TransferQuickPickItems = TransferQuickPickItemValue | TransferQuickPickSeparator;
605
-
606
- export interface TransferQuickPickItemValue extends theia.QuickPickItem {
607
- handle: number;
608
- type?: 'item'
609
- }
610
-
611
- export interface TransferQuickPickSeparator extends theia.QuickPickItem {
612
- handle: number;
613
- type: 'separator';
614
- }
615
-
616
- export interface TransferQuickInputButton extends theia.QuickInputButton {
617
- iconPath: theia.Uri | { light: theia.Uri, dark: theia.Uri } | ThemeIcon;
618
- iconClass?: string;
619
- handle?: number;
620
- }
621
-
622
- export type TransferQuickInput = TransferQuickPick | TransferInputBox;
623
-
624
- export interface BaseTransferQuickInput {
625
- [key: string]: any;
626
- id: number;
627
- type?: 'quickPick' | 'inputBox';
628
- enabled?: boolean;
629
- busy?: boolean;
630
- visible?: boolean;
631
- }
632
-
633
- export interface TransferQuickPick extends BaseTransferQuickInput {
634
- type?: 'quickPick';
635
- value?: string;
636
- placeholder?: string;
637
- buttons?: TransferQuickInputButton[];
638
- items?: TransferQuickPickItems[];
639
- activeItems?: ReadonlyArray<theia.QuickPickItem>;
640
- selectedItems?: ReadonlyArray<theia.QuickPickItem>;
641
- canSelectMany?: boolean;
642
- ignoreFocusOut?: boolean;
643
- matchOnDescription?: boolean;
644
- matchOnDetail?: boolean;
645
- sortByLabel?: boolean;
646
- }
647
-
648
- export interface TransferInputBox extends BaseTransferQuickInput {
649
- type?: 'inputBox';
650
- value?: string;
651
- placeholder?: string;
652
- password?: boolean;
653
- buttons?: TransferQuickInputButton[];
654
- prompt?: string;
655
- validationMessage?: string;
656
- }
657
-
658
- export interface IInputBoxOptions {
659
- value?: string;
660
- valueSelection?: [number, number];
661
- prompt?: string;
662
- placeHolder?: string;
663
- password?: boolean;
664
- ignoreFocusOut?: boolean;
665
- }
666
-
667
- export interface QuickOpenMain {
668
- $show(instance: number, options: PickOptions<TransferQuickPickItemValue>, token: CancellationToken): Promise<number | number[] | undefined>;
669
- $setItems(instance: number, items: TransferQuickPickItems[]): Promise<any>;
670
- $setError(instance: number, error: Error): Promise<void>;
671
- $input(options: theia.InputBoxOptions, validateInput: boolean, token: CancellationToken): Promise<string | undefined>;
672
- $createOrUpdate<T extends theia.QuickPickItem>(params: TransferQuickInput): Promise<void>;
673
- $dispose(id: number): Promise<void>;
674
-
675
- $hide(): void;
676
- $showInputBox(options: TransferInputBox, validateInput: boolean): Promise<string | undefined>;
677
- }
678
-
679
- export interface WorkspaceMain {
680
- $pickWorkspaceFolder(options: WorkspaceFolderPickOptionsMain): Promise<theia.WorkspaceFolder | undefined>;
681
- $startFileSearch(includePattern: string, includeFolder: string | undefined, excludePatternOrDisregardExcludes: string | false,
682
- maxResults: number | undefined, token: theia.CancellationToken): PromiseLike<UriComponents[]>;
683
- $findTextInFiles(query: theia.TextSearchQuery, options: theia.FindTextInFilesOptions, searchRequestId: number,
684
- token?: theia.CancellationToken): Promise<theia.TextSearchComplete>
685
- $registerTextDocumentContentProvider(scheme: string): Promise<void>;
686
- $unregisterTextDocumentContentProvider(scheme: string): void;
687
- $onTextDocumentContentChange(uri: string, content: string): void;
688
- $updateWorkspaceFolders(start: number, deleteCount?: number, ...rootsToAdd: string[]): Promise<void>;
689
- $getWorkspace(): Promise<files.FileStat | undefined>;
690
- $requestWorkspaceTrust(options?: theia.WorkspaceTrustRequestOptions): Promise<boolean | undefined>;
691
- }
692
-
693
- export interface WorkspaceExt {
694
- $onWorkspaceFoldersChanged(event: WorkspaceRootsChangeEvent): void;
695
- $onWorkspaceLocationChanged(event: files.FileStat | undefined): void;
696
- $provideTextDocumentContent(uri: string): Promise<string | undefined | null>;
697
- $onTextSearchResult(searchRequestId: number, done: boolean, result?: SearchInWorkspaceResult): void;
698
- $onWorkspaceTrustChanged(trust: boolean | undefined): void;
699
- }
700
-
701
- export interface TimelineExt {
702
- $getTimeline(source: string, uri: UriComponents, options: theia.TimelineOptions, internalOptions?: InternalTimelineOptions): Promise<Timeline | undefined>;
703
- }
704
-
705
- export interface TimelineMain {
706
- $registerTimelineProvider(provider: TimelineProviderDescriptor): Promise<void>;
707
- $fireTimelineChanged(e: TimelineChangeEvent): Promise<void>;
708
- $unregisterTimelineProvider(source: string): Promise<void>;
709
- }
710
-
711
- export interface ThemingExt {
712
- $onColorThemeChange(type: ThemeType): void;
713
- }
714
- export interface ThemingMain extends Disposable {
715
- }
716
-
717
- export interface DialogsMain {
718
- $showOpenDialog(options: OpenDialogOptionsMain): Promise<string[] | undefined>;
719
- $showSaveDialog(options: SaveDialogOptionsMain): Promise<string | undefined>;
720
- $showUploadDialog(options: UploadDialogOptionsMain): Promise<string[] | undefined>;
721
- }
722
-
723
- export interface RegisterTreeDataProviderOptions {
724
- canSelectMany?: boolean
725
- dragMimeTypes?: string[]
726
- dropMimeTypes?: string[]
727
- }
728
-
729
- export interface TreeViewRevealOptions {
730
- select: boolean
731
- focus: boolean
732
- expand: boolean | number
733
- }
734
-
735
- export interface TreeViewsMain {
736
- $registerTreeDataProvider(treeViewId: string, options?: RegisterTreeDataProviderOptions): void;
737
- $readDroppedFile(contentId: string): Promise<BinaryBuffer>;
738
- $unregisterTreeDataProvider(treeViewId: string): void;
739
- $refresh(treeViewId: string): Promise<void>;
740
- $reveal(treeViewId: string, elementParentChain: string[], options: TreeViewRevealOptions): Promise<any>;
741
- $setMessage(treeViewId: string, message: string): void;
742
- $setTitle(treeViewId: string, title: string): void;
743
- $setDescription(treeViewId: string, description: string): void;
744
- }
745
- export class DataTransferFileDTO {
746
- constructor(readonly name: string, readonly contentId: string, readonly uri?: UriComponents) { }
747
-
748
- static is(value: string | DataTransferFileDTO): value is DataTransferFileDTO {
749
- return !(typeof value === 'string');
750
- }
751
- }
752
-
753
- export interface TreeViewsExt {
754
- $dragStarted(treeViewId: string, treeItemIds: string[], token: CancellationToken): Promise<UriComponents[] | undefined>;
755
- $drop(treeViewId: string, treeItemId: string | undefined, dataTransferItems: [string, string | DataTransferFileDTO][], token: CancellationToken): Promise<void>;
756
- $getChildren(treeViewId: string, treeItemId: string | undefined): Promise<TreeViewItem[] | undefined>;
757
- $hasResolveTreeItem(treeViewId: string): Promise<boolean>;
758
- $resolveTreeItem(treeViewId: string, treeItemId: string, token: CancellationToken): Promise<TreeViewItem | undefined>;
759
- $setExpanded(treeViewId: string, treeItemId: string, expanded: boolean): Promise<any>;
760
- $setSelection(treeViewId: string, treeItemIds: string[]): Promise<void>;
761
- $setVisible(treeViewId: string, visible: boolean): Promise<void>;
762
- }
763
-
764
- export interface TreeViewItem {
765
-
766
- id: string;
767
-
768
- label: string;
769
- /** Label highlights given as tuples of inclusive start index and exclusive end index. */
770
- highlights?: [number, number][];
771
-
772
- description?: string | boolean;
773
-
774
- /* font-awesome icon for compatibility */
775
- icon?: string;
776
- iconUrl?: IconUrl;
777
-
778
- themeIcon?: ThemeIcon;
779
-
780
- resourceUri?: UriComponents;
781
-
782
- tooltip?: string | MarkdownString;
783
-
784
- collapsibleState?: TreeViewItemCollapsibleState;
785
-
786
- contextValue?: string;
787
-
788
- command?: Command;
789
-
790
- accessibilityInformation?: theia.AccessibilityInformation;
791
-
792
- }
793
-
794
- export interface TreeViewItemReference {
795
- viewId: string
796
- itemId: string
797
- }
798
- export namespace TreeViewItemReference {
799
- export function is(arg: unknown): arg is TreeViewItemReference {
800
- return isObject(arg) && isString(arg.viewId) && isString(arg.itemId);
801
- }
802
- }
803
-
804
- /**
805
- * Collapsible state of the tree item
806
- */
807
- export enum TreeViewItemCollapsibleState {
808
- /**
809
- * Determines an item can be neither collapsed nor expanded. Implies it has no children.
810
- */
811
- None = 0,
812
- /**
813
- * Determines an item is collapsed
814
- */
815
- Collapsed = 1,
816
- /**
817
- * Determines an item is expanded
818
- */
819
- Expanded = 2
820
- }
821
-
822
- export interface WindowMain {
823
- $openUri(uri: UriComponents): Promise<boolean>;
824
- $asExternalUri(uri: UriComponents): Promise<UriComponents>;
825
- }
826
-
827
- export interface WindowStateExt {
828
- $onWindowStateChanged(focus: boolean): void;
829
- }
830
-
831
- export interface NotificationExt {
832
- withProgress<R>(
833
- options: ProgressOptions,
834
- task: (progress: Progress<{ message?: string; increment?: number }>, token: CancellationToken) => PromiseLike<R>
835
- ): PromiseLike<R>;
836
- $acceptProgressCanceled(progressId: string): void;
837
- }
838
-
839
- export interface ScmCommandArg {
840
- sourceControlHandle: number
841
- resourceGroupHandle?: number
842
- resourceStateHandle?: number
843
- }
844
- export namespace ScmCommandArg {
845
- export function is(arg: unknown): arg is ScmCommandArg {
846
- return isObject(arg) && 'sourceControlHandle' in arg;
847
- }
848
- }
849
-
850
- export interface ScmExt {
851
- createSourceControl(plugin: Plugin, id: string, label: string, rootUri?: theia.Uri): theia.SourceControl;
852
- getLastInputBox(plugin: Plugin): theia.SourceControlInputBox | undefined;
853
- $onInputBoxValueChange(sourceControlHandle: number, message: string): Promise<void>;
854
- $executeResourceCommand(sourceControlHandle: number, groupHandle: number, resourceHandle: number): Promise<void>;
855
- $validateInput(sourceControlHandle: number, value: string, cursorPosition: number): Promise<[string, number] | undefined>;
856
- $setSelectedSourceControl(selectedSourceControlHandle: number | undefined): Promise<void>;
857
- $provideOriginalResource(sourceControlHandle: number, uri: string, token: theia.CancellationToken): Promise<UriComponents | undefined>;
858
- }
859
-
860
- export namespace TimelineCommandArg {
861
- export function is(arg: unknown): arg is TimelineCommandArg {
862
- return isObject(arg) && 'timelineHandle' in arg;
863
- }
864
- }
865
- export interface TimelineCommandArg {
866
- timelineHandle: string;
867
- source: string;
868
- uri: string;
869
- }
870
-
871
- export interface DecorationRequest {
872
- readonly id: number;
873
- readonly uri: UriComponents;
874
- }
875
-
876
- export type DecorationData = [boolean, string, string, ThemeColor];
877
- export interface DecorationReply { [id: number]: DecorationData; }
878
-
879
- export namespace CommentsCommandArg {
880
- export function is(arg: unknown): arg is CommentsCommandArg {
881
- return isObject(arg) && 'commentControlHandle' in arg && 'commentThreadHandle' in arg && 'text' in arg && !('commentUniqueId' in arg);
882
- }
883
- }
884
- export interface CommentsCommandArg {
885
- commentControlHandle: number;
886
- commentThreadHandle: number;
887
- text: string
888
- }
889
-
890
- export namespace CommentsContextCommandArg {
891
- export function is(arg: unknown): arg is CommentsContextCommandArg {
892
- return isObject(arg) && 'commentControlHandle' in arg && 'commentThreadHandle' in arg && 'commentUniqueId' in arg && !('text' in arg);
893
- }
894
- }
895
- export interface CommentsContextCommandArg {
896
- commentControlHandle: number;
897
- commentThreadHandle: number;
898
- commentUniqueId: number
899
- }
900
-
901
- export namespace CommentsEditCommandArg {
902
- export function is(arg: unknown): arg is CommentsEditCommandArg {
903
- return isObject(arg) && 'commentControlHandle' in arg && 'commentThreadHandle' in arg && 'commentUniqueId' in arg && 'text' in arg;
904
- }
905
- }
906
- export interface CommentsEditCommandArg {
907
- commentControlHandle: number;
908
- commentThreadHandle: number;
909
- commentUniqueId: number
910
- text: string
911
- }
912
-
913
- export interface DecorationsExt {
914
- registerFileDecorationProvider(provider: theia.FileDecorationProvider, pluginInfo: PluginInfo): theia.Disposable
915
- $provideDecorations(handle: number, requests: DecorationRequest[], token: CancellationToken): Promise<DecorationReply>;
916
- }
917
-
918
- export interface DecorationsMain {
919
- $registerDecorationProvider(handle: number): Promise<void>;
920
- $unregisterDecorationProvider(handle: number): void;
921
- $onDidChange(handle: number, resources: UriComponents[] | null): void;
922
- }
923
-
924
- export interface ScmMain {
925
- $registerSourceControl(sourceControlHandle: number, id: string, label: string, rootUri?: UriComponents): Promise<void>;
926
- $updateSourceControl(sourceControlHandle: number, features: SourceControlProviderFeatures): Promise<void>;
927
- $unregisterSourceControl(sourceControlHandle: number): Promise<void>;
928
-
929
- $registerGroups(sourceControlHandle: number, groups: ScmRawResourceGroup[], splices: ScmRawResourceSplices[]): void;
930
- $updateGroup(sourceControlHandle: number, groupHandle: number, features: SourceControlGroupFeatures): void;
931
- $updateGroupLabel(sourceControlHandle: number, groupHandle: number, label: string): void;
932
- $unregisterGroup(sourceControlHandle: number, groupHandle: number): void;
933
-
934
- $spliceResourceStates(sourceControlHandle: number, splices: ScmRawResourceSplices[]): void;
935
-
936
- $setInputBoxValue(sourceControlHandle: number, value: string): void;
937
- $setInputBoxPlaceholder(sourceControlHandle: number, placeholder: string): void;
938
- $setInputBoxVisible(sourceControlHandle: number, visible: boolean): void;
939
- $setInputBoxEnabled(sourceControlHandle: number, enabled: boolean): void;
940
- }
941
-
942
- export interface SourceControlProviderFeatures {
943
- hasQuickDiffProvider?: boolean;
944
- count?: number;
945
- commitTemplate?: string;
946
- acceptInputCommand?: Command;
947
- statusBarCommands?: Command[];
948
- }
949
-
950
- export interface SourceControlGroupFeatures {
951
- hideWhenEmpty: boolean | undefined;
952
- }
953
-
954
- export interface ScmRawResource {
955
- handle: number,
956
- sourceUri: UriComponents,
957
- icons: UriComponents[],
958
- tooltip: string,
959
- strikeThrough: boolean,
960
- faded: boolean,
961
- contextValue: string,
962
- command: Command | undefined
963
- }
964
-
965
- export interface ScmRawResourceGroup {
966
- handle: number,
967
- id: string,
968
- label: string,
969
- features: SourceControlGroupFeatures
970
- }
971
-
972
- export interface ScmRawResourceSplice {
973
- start: number,
974
- deleteCount: number,
975
- rawResources: ScmRawResource[]
976
- }
977
-
978
- export interface ScmRawResourceSplices {
979
- handle: number,
980
- splices: ScmRawResourceSplice[]
981
- }
982
-
983
- export interface SourceControlResourceState {
984
- readonly handle: number
985
- /**
986
- * The uri of the underlying resource inside the workspace.
987
- */
988
- readonly resourceUri: string;
989
-
990
- /**
991
- * The command which should be run when the resource
992
- * state is open in the Source Control viewlet.
993
- */
994
- readonly command?: Command;
995
-
996
- /**
997
- * The decorations for this source control
998
- * resource state.
999
- */
1000
- readonly decorations?: SourceControlResourceDecorations;
1001
-
1002
- readonly letter?: string;
1003
-
1004
- readonly colorId?: string
1005
- }
1006
-
1007
- /**
1008
- * The decorations for a [source control resource state](#SourceControlResourceState).
1009
- * Can be independently specified for light and dark themes.
1010
- */
1011
- export interface SourceControlResourceDecorations {
1012
-
1013
- /**
1014
- * Whether the source control resource state should be striked-through in the UI.
1015
- */
1016
- readonly strikeThrough?: boolean;
1017
-
1018
- /**
1019
- * Whether the source control resource state should be faded in the UI.
1020
- */
1021
- readonly faded?: boolean;
1022
-
1023
- /**
1024
- * The title for a specific source control resource state.
1025
- */
1026
- readonly tooltip?: string;
1027
-
1028
- /**
1029
- * The icon path for a specific source control resource state.
1030
- */
1031
- readonly iconPath?: string;
1032
- }
1033
-
1034
- export interface NotificationMain {
1035
- $startProgress(options: NotificationMain.StartProgressOptions): Promise<string>;
1036
- $stopProgress(id: string): void;
1037
- $updateProgress(id: string, report: NotificationMain.ProgressReport): void;
1038
- }
1039
- export namespace NotificationMain {
1040
- export interface StartProgressOptions {
1041
- title: string;
1042
- location?: string;
1043
- cancellable?: boolean;
1044
- }
1045
- export interface ProgressReport {
1046
- message?: string;
1047
- increment?: number;
1048
- total?: number;
1049
- }
1050
- }
1051
-
1052
- export enum EditorPosition {
1053
- ONE = 0,
1054
- TWO = 1,
1055
- THREE = 2,
1056
- FOUR = 3,
1057
- FIVE = 4,
1058
- SIX = 5,
1059
- SEVEN = 6,
1060
- EIGHT = 7,
1061
- NINE = 8
1062
- }
1063
-
1064
- export interface Position {
1065
- readonly lineNumber: number;
1066
- readonly column: number;
1067
- }
1068
-
1069
- export interface Selection {
1070
- /**
1071
- * The line number on which the selection has started.
1072
- */
1073
- readonly selectionStartLineNumber: number;
1074
- /**
1075
- * The column on `selectionStartLineNumber` where the selection has started.
1076
- */
1077
- readonly selectionStartColumn: number;
1078
- /**
1079
- * The line number on which the selection has ended.
1080
- */
1081
- readonly positionLineNumber: number;
1082
- /**
1083
- * The column on `positionLineNumber` where the selection has ended.
1084
- */
1085
- readonly positionColumn: number;
1086
- }
1087
-
1088
- export interface TextEditorConfiguration {
1089
- tabSize: number;
1090
- insertSpaces: boolean;
1091
- cursorStyle: TextEditorCursorStyle;
1092
- lineNumbers: TextEditorLineNumbersStyle;
1093
- }
1094
-
1095
- export interface TextEditorConfigurationUpdate {
1096
- tabSize?: number | 'auto';
1097
- insertSpaces?: boolean | 'auto';
1098
- cursorStyle?: TextEditorCursorStyle;
1099
- lineNumbers?: TextEditorLineNumbersStyle;
1100
- }
1101
-
1102
- export enum TextEditorRevealType {
1103
- Default = 0,
1104
- InCenter = 1,
1105
- InCenterIfOutsideViewport = 2,
1106
- AtTop = 3
1107
- }
1108
-
1109
- export interface SelectionChangeEvent {
1110
- selections: Selection[];
1111
- source?: string;
1112
- }
1113
-
1114
- export interface EditorChangedPropertiesData {
1115
- options?: TextEditorConfiguration;
1116
- selections?: SelectionChangeEvent;
1117
- visibleRanges?: Range[];
1118
- }
1119
-
1120
- export interface TextEditorPositionData {
1121
- [id: string]: EditorPosition;
1122
- }
1123
-
1124
- export interface TextEditorsExt {
1125
- $acceptEditorPropertiesChanged(id: string, props: EditorChangedPropertiesData): void;
1126
- $acceptEditorPositionData(data: TextEditorPositionData): void;
1127
- }
1128
-
1129
- export interface SingleEditOperation {
1130
- range?: Range;
1131
- text?: string;
1132
- forceMoveMarkers?: boolean;
1133
- }
1134
-
1135
- export interface UndoStopOptions {
1136
- undoStopBefore: boolean;
1137
- undoStopAfter: boolean;
1138
- }
1139
-
1140
- export interface ApplyEditsOptions extends UndoStopOptions {
1141
- setEndOfLine: EndOfLine;
1142
- }
1143
-
1144
- export interface ThemeColor {
1145
- id: string;
1146
- }
1147
-
1148
- export interface ThemeIcon {
1149
- id: string;
1150
- color?: ThemeColor;
1151
- }
1152
-
1153
- /**
1154
- * Describes the behavior of decorations when typing/editing near their edges.
1155
- */
1156
- export enum TrackedRangeStickiness {
1157
- AlwaysGrowsWhenTypingAtEdges = 0,
1158
- NeverGrowsWhenTypingAtEdges = 1,
1159
- GrowsOnlyWhenTypingBefore = 2,
1160
- GrowsOnlyWhenTypingAfter = 3,
1161
- }
1162
- export interface ContentDecorationRenderOptions {
1163
- contentText?: string;
1164
- contentIconPath?: UriComponents;
1165
-
1166
- border?: string;
1167
- borderColor?: string | ThemeColor;
1168
- fontStyle?: string;
1169
- fontWeight?: string;
1170
- textDecoration?: string;
1171
- color?: string | ThemeColor;
1172
- backgroundColor?: string | ThemeColor;
1173
-
1174
- margin?: string;
1175
- width?: string;
1176
- height?: string;
1177
- }
1178
-
1179
- export interface ThemeDecorationRenderOptions {
1180
- backgroundColor?: string | ThemeColor;
1181
-
1182
- outline?: string;
1183
- outlineColor?: string | ThemeColor;
1184
- outlineStyle?: string;
1185
- outlineWidth?: string;
1186
-
1187
- border?: string;
1188
- borderColor?: string | ThemeColor;
1189
- borderRadius?: string;
1190
- borderSpacing?: string;
1191
- borderStyle?: string;
1192
- borderWidth?: string;
1193
-
1194
- fontStyle?: string;
1195
- fontWeight?: string;
1196
- textDecoration?: string;
1197
- cursor?: string;
1198
- color?: string | ThemeColor;
1199
- opacity?: string;
1200
- letterSpacing?: string;
1201
-
1202
- gutterIconPath?: UriComponents;
1203
- gutterIconSize?: string;
1204
-
1205
- overviewRulerColor?: string | ThemeColor;
1206
-
1207
- before?: ContentDecorationRenderOptions;
1208
- after?: ContentDecorationRenderOptions;
1209
- }
1210
-
1211
- export interface DecorationRenderOptions extends ThemeDecorationRenderOptions {
1212
- isWholeLine?: boolean;
1213
- rangeBehavior?: TrackedRangeStickiness;
1214
- overviewRulerLane?: OverviewRulerLane;
1215
-
1216
- light?: ThemeDecorationRenderOptions;
1217
- dark?: ThemeDecorationRenderOptions;
1218
- }
1219
-
1220
- export interface ThemeDecorationInstanceRenderOptions {
1221
- before?: ContentDecorationRenderOptions;
1222
- after?: ContentDecorationRenderOptions;
1223
- }
1224
-
1225
- export interface DecorationInstanceRenderOptions extends ThemeDecorationInstanceRenderOptions {
1226
- light?: ThemeDecorationInstanceRenderOptions;
1227
- dark?: ThemeDecorationInstanceRenderOptions;
1228
- }
1229
-
1230
- export interface DecorationOptions {
1231
- range: Range;
1232
- hoverMessage?: MarkdownString | MarkdownString[];
1233
- renderOptions?: DecorationInstanceRenderOptions;
1234
- }
1235
-
1236
- export interface TextEditorsMain {
1237
- $tryShowTextDocument(uri: UriComponents, options?: TextDocumentShowOptions): Promise<void>;
1238
- $registerTextEditorDecorationType(key: string, options: DecorationRenderOptions): void;
1239
- $removeTextEditorDecorationType(key: string): void;
1240
- $tryHideEditor(id: string): Promise<void>;
1241
- $trySetOptions(id: string, options: TextEditorConfigurationUpdate): Promise<void>;
1242
- $trySetDecorations(id: string, key: string, ranges: DecorationOptions[]): Promise<void>;
1243
- $trySetDecorationsFast(id: string, key: string, ranges: number[]): Promise<void>;
1244
- $tryRevealRange(id: string, range: Range, revealType: TextEditorRevealType): Promise<void>;
1245
- $trySetSelections(id: string, selections: Selection[]): Promise<void>;
1246
- $tryApplyEdits(id: string, modelVersionId: number, edits: SingleEditOperation[], opts: ApplyEditsOptions): Promise<boolean>;
1247
- $tryApplyWorkspaceEdit(workspaceEditDto: WorkspaceEditDto): Promise<boolean>;
1248
- $tryInsertSnippet(id: string, template: string, selections: Range[], opts: UndoStopOptions): Promise<boolean>;
1249
- $saveAll(includeUntitled?: boolean): Promise<boolean>;
1250
- // $getDiffInformation(id: string): Promise<editorCommon.ILineChange[]>;
1251
- }
1252
-
1253
- export interface ModelAddedData {
1254
- uri: UriComponents;
1255
- versionId: number;
1256
- lines: string[];
1257
- EOL: string;
1258
- modeId: string;
1259
- isDirty: boolean;
1260
- }
1261
-
1262
- export interface TextEditorAddData {
1263
- id: string;
1264
- documentUri: UriComponents;
1265
- options: TextEditorConfiguration;
1266
- selections: Selection[];
1267
- visibleRanges: Range[];
1268
- editorPosition?: EditorPosition;
1269
- }
1270
-
1271
- export interface EditorsAndDocumentsDelta {
1272
- removedDocuments?: UriComponents[];
1273
- addedDocuments?: ModelAddedData[];
1274
- removedEditors?: string[];
1275
- addedEditors?: TextEditorAddData[];
1276
- /**
1277
- * undefined means no changes
1278
- * null means no active
1279
- * string means id of active
1280
- */
1281
- newActiveEditor?: string | null;
1282
- }
1283
-
1284
- export interface EditorsAndDocumentsExt {
1285
- $acceptEditorsAndDocumentsDelta(delta: EditorsAndDocumentsDelta): void;
1286
- }
1287
-
1288
- export interface ModelContentChange {
1289
- readonly range: Range;
1290
- readonly rangeOffset: number;
1291
- readonly rangeLength: number;
1292
- readonly text: string;
1293
- }
1294
- export interface ModelChangedEvent {
1295
- readonly changes: ModelContentChange[];
1296
-
1297
- readonly eol: string;
1298
-
1299
- readonly versionId: number;
1300
-
1301
- readonly reason: TextDocumentChangeReason | undefined;
1302
- }
1303
-
1304
- export interface DocumentsExt {
1305
- $acceptModelModeChanged(startUrl: UriComponents, oldModeId: string, newModeId: string): void;
1306
- $acceptModelSaved(strUrl: UriComponents): void;
1307
- $acceptModelWillSave(strUrl: UriComponents, reason: theia.TextDocumentSaveReason, saveTimeout: number): Promise<SingleEditOperation[]>;
1308
- $acceptDirtyStateChanged(strUrl: UriComponents, isDirty: boolean): void;
1309
- $acceptModelChanged(strUrl: UriComponents, e: ModelChangedEvent, isDirty: boolean): void;
1310
- }
1311
-
1312
- export interface DocumentsMain {
1313
- $tryCreateDocument(options?: { language?: string; content?: string; }): Promise<UriComponents>;
1314
- $tryShowDocument(uri: UriComponents, options?: TextDocumentShowOptions): Promise<void>;
1315
- $tryOpenDocument(uri: UriComponents): Promise<boolean>;
1316
- $trySaveDocument(uri: UriComponents): Promise<boolean>;
1317
- $tryCloseDocument(uri: UriComponents): Promise<boolean>;
1318
- }
1319
-
1320
- export interface EnvMain {
1321
- $getEnvVariable(envVarName: string): Promise<string | undefined>;
1322
- $getClientOperatingSystem(): Promise<theia.OperatingSystem>;
1323
- }
1324
-
1325
- export interface PreferenceRegistryMain {
1326
- $updateConfigurationOption(
1327
- target: boolean | ConfigurationTarget | undefined,
1328
- key: string,
1329
- value: any,
1330
- resource?: string,
1331
- withLanguageOverride?: boolean
1332
- ): PromiseLike<void>;
1333
- $removeConfigurationOption(
1334
- target: boolean | ConfigurationTarget | undefined,
1335
- key: string,
1336
- resource?: string,
1337
- withLanguageOverride?: boolean,
1338
- ): PromiseLike<void>;
1339
- }
1340
-
1341
- export interface PreferenceChangeExt {
1342
- preferenceName: string,
1343
- newValue: any,
1344
- /**
1345
- * The URI the folder affected, or undefined if User scope.
1346
- */
1347
- scope?: string;
1348
- }
1349
-
1350
- export interface TerminalOptionsExt {
1351
- attributes?: {
1352
- [key: string]: string;
1353
- }
1354
- }
1355
-
1356
- export interface PreferenceRegistryExt {
1357
- $acceptConfigurationChanged(data: { [key: string]: any }, eventData: PreferenceChangeExt[]): void;
1358
- }
1359
-
1360
- export interface OutputChannelRegistryMain {
1361
- $append(channelName: string, value: string, pluginInfo: PluginInfo): PromiseLike<void>;
1362
- $clear(channelName: string): PromiseLike<void>;
1363
- $dispose(channelName: string): PromiseLike<void>;
1364
- $reveal(channelName: string, preserveFocus: boolean): PromiseLike<void>;
1365
- $close(channelName: string): PromiseLike<void>;
1366
- }
1367
-
1368
- export type CharacterPair = [string, string];
1369
-
1370
- export interface CommentRule {
1371
- lineComment?: string;
1372
- blockComment?: CharacterPair;
1373
- }
1374
-
1375
- export interface SerializedRegExp {
1376
- pattern: string;
1377
- flags?: string;
1378
- }
1379
-
1380
- export interface SerializedIndentationRule {
1381
- decreaseIndentPattern?: SerializedRegExp;
1382
- increaseIndentPattern?: SerializedRegExp;
1383
- indentNextLinePattern?: SerializedRegExp;
1384
- unIndentedLinePattern?: SerializedRegExp;
1385
- }
1386
-
1387
- export interface SerializedOnEnterRule {
1388
- beforeText: SerializedRegExp;
1389
- afterText?: SerializedRegExp;
1390
- previousLineText?: SerializedRegExp;
1391
- action: SerializedEnterAction;
1392
- }
1393
-
1394
- export interface SerializedEnterAction {
1395
- indentAction: IndentAction;
1396
- outdentCurrentLine?: boolean;
1397
- appendText?: string;
1398
- removeText?: number;
1399
- }
1400
-
1401
- export interface SerializedLanguageConfiguration {
1402
- comments?: CommentRule;
1403
- brackets?: CharacterPair[];
1404
- wordPattern?: SerializedRegExp;
1405
- indentationRules?: SerializedIndentationRule;
1406
- onEnterRules?: SerializedOnEnterRule[];
1407
- }
1408
-
1409
- export interface CodeActionDto {
1410
- title: string;
1411
- edit?: WorkspaceEditDto;
1412
- diagnostics?: MarkerData[];
1413
- command?: Command;
1414
- kind?: string;
1415
- isPreferred?: boolean;
1416
- disabled?: string;
1417
- }
1418
-
1419
- export interface WorkspaceEditMetadataDto {
1420
- needsConfirmation: boolean;
1421
- label: string;
1422
- description?: string;
1423
- iconPath?: {
1424
- id: string;
1425
- } | {
1426
- light: UriComponents;
1427
- dark: UriComponents;
1428
- } | ThemeIcon;
1429
- }
1430
-
1431
- export interface WorkspaceFileEditDto {
1432
- oldResource?: UriComponents;
1433
- newResource?: UriComponents;
1434
- options?: FileOperationOptions;
1435
- metadata?: WorkspaceEditMetadataDto;
1436
- }
1437
-
1438
- export interface WorkspaceTextEditDto {
1439
- resource: UriComponents;
1440
- modelVersionId?: number;
1441
- textEdit: TextEdit & { insertAsSnippet?: boolean };
1442
- metadata?: WorkspaceEditMetadataDto;
1443
- }
1444
- export namespace WorkspaceTextEditDto {
1445
- export function is(arg: WorkspaceTextEditDto | WorkspaceFileEditDto): arg is WorkspaceTextEditDto {
1446
- return !!arg
1447
- && 'resource' in arg
1448
- && 'textEdit' in arg
1449
- && arg.textEdit !== null
1450
- && typeof arg.textEdit === 'object';
1451
- }
1452
- }
1453
-
1454
- export interface WorkspaceEditDto {
1455
- edits: Array<WorkspaceTextEditDto | WorkspaceFileEditDto>;
1456
- }
1457
-
1458
- export interface CommandProperties {
1459
- command: string;
1460
- args?: string[];
1461
- options?: {
1462
- cwd?: string;
1463
- [key: string]: any
1464
- };
1465
- }
1466
-
1467
- export type TaskGroupKind = 'build' | 'test' | 'rebuild' | 'clean';
1468
- export interface TaskDto {
1469
- type: string;
1470
- taskType?: 'shell' | 'process' | 'customExecution'; // the task execution type
1471
- executionId?: string,
1472
- label: string;
1473
- source?: string;
1474
- scope: string | number;
1475
- // Provide a more specific type when necessary (see ProblemMatcherContribution)
1476
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1477
- problemMatcher?: any;
1478
- group?: {
1479
- kind: TaskGroupKind;
1480
- isDefault: boolean;
1481
- }
1482
- detail?: string;
1483
- presentation?: TaskPresentationOptionsDTO;
1484
- runOptions?: RunOptionsDTO;
1485
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1486
- [key: string]: any;
1487
- }
1488
-
1489
- export interface RunOptionsDTO {
1490
- reevaluateOnRerun?: boolean;
1491
- }
1492
-
1493
- export interface TaskPresentationOptionsDTO {
1494
- reveal?: number;
1495
- focus?: boolean;
1496
- echo?: boolean;
1497
- panel?: number;
1498
- showReuseMessage?: boolean;
1499
- clear?: boolean;
1500
- }
1501
-
1502
- export interface TaskExecutionDto {
1503
- id: number;
1504
- task: TaskDto;
1505
- }
1506
-
1507
- export interface ProcessTaskDto extends TaskDto, CommandProperties {
1508
- windows?: CommandProperties;
1509
- }
1510
-
1511
- export interface PluginInfo {
1512
- id: string;
1513
- name: string;
1514
- displayName?: string;
1515
- }
1516
-
1517
- export interface LanguageStatus {
1518
- readonly id: string;
1519
- readonly name: string;
1520
- readonly selector: SerializedDocumentFilter[];
1521
- readonly severity: Severity;
1522
- readonly label: string;
1523
- readonly detail: string;
1524
- readonly busy: boolean;
1525
- readonly source: string;
1526
- readonly command: Command | undefined;
1527
- readonly accessibilityInfo: theia.AccessibilityInformation | undefined;
1528
- }
1529
-
1530
- export interface LanguagesExt {
1531
- $provideCompletionItems(handle: number, resource: UriComponents, position: Position,
1532
- context: CompletionContext, token: CancellationToken): Promise<CompletionResultDto | undefined>;
1533
- $resolveCompletionItem(handle: number, chainedId: ChainedCacheId, token: CancellationToken): Promise<Completion | undefined>;
1534
- $releaseCompletionItems(handle: number, id: number): void;
1535
- $provideImplementation(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<Definition | undefined>;
1536
- $provideTypeDefinition(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<Definition | undefined>;
1537
- $provideDefinition(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<Definition | undefined>;
1538
- $provideDeclaration(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<Definition | undefined>;
1539
- $provideReferences(handle: number, resource: UriComponents, position: Position, context: ReferenceContext, token: CancellationToken): Promise<Location[] | undefined>;
1540
- $provideSignatureHelp(
1541
- handle: number, resource: UriComponents, position: Position, context: SignatureHelpContext, token: CancellationToken
1542
- ): Promise<SignatureHelp | undefined>;
1543
- $releaseSignatureHelp(handle: number, id: number): void;
1544
- $provideHover(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<Hover | undefined>;
1545
- $provideEvaluatableExpression(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<EvaluatableExpression | undefined>;
1546
- $provideInlineValues(handle: number, resource: UriComponents, range: Range, context: InlineValueContext, token: CancellationToken): Promise<InlineValue[] | undefined>;
1547
- $provideDocumentHighlights(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<DocumentHighlight[] | undefined>;
1548
- $provideDocumentFormattingEdits(handle: number, resource: UriComponents,
1549
- options: FormattingOptions, token: CancellationToken): Promise<TextEdit[] | undefined>;
1550
- $provideDocumentRangeFormattingEdits(handle: number, resource: UriComponents, range: Range,
1551
- options: FormattingOptions, token: CancellationToken): Promise<TextEdit[] | undefined>;
1552
- $provideOnTypeFormattingEdits(
1553
- handle: number,
1554
- resource: UriComponents,
1555
- position: Position,
1556
- ch: string,
1557
- options: FormattingOptions,
1558
- token: CancellationToken
1559
- ): Promise<TextEdit[] | undefined>;
1560
- $provideDocumentLinks(handle: number, resource: UriComponents, token: CancellationToken): Promise<DocumentLink[] | undefined>;
1561
- $resolveDocumentLink(handle: number, link: DocumentLink, token: CancellationToken): Promise<DocumentLink | undefined>;
1562
- $releaseDocumentLinks(handle: number, ids: number[]): void;
1563
- $provideCodeLenses(handle: number, resource: UriComponents, token: CancellationToken): Promise<CodeLensSymbol[] | undefined>;
1564
- $resolveCodeLens(handle: number, resource: UriComponents, symbol: CodeLensSymbol, token: CancellationToken): Promise<CodeLensSymbol | undefined>;
1565
- $releaseCodeLenses(handle: number, ids: number[]): void;
1566
- $provideCodeActions(
1567
- handle: number,
1568
- resource: UriComponents,
1569
- rangeOrSelection: Range | Selection,
1570
- context: CodeActionContext,
1571
- token: CancellationToken
1572
- ): Promise<CodeAction[] | undefined>;
1573
- $releaseCodeActions(handle: number, cacheIds: number[]): void;
1574
- $resolveCodeAction(handle: number, cacheId: number, token: CancellationToken): Promise<WorkspaceEditDto | undefined>;
1575
- $provideDocumentSymbols(handle: number, resource: UriComponents, token: CancellationToken): Promise<DocumentSymbol[] | undefined>;
1576
- $provideWorkspaceSymbols(handle: number, query: string, token: CancellationToken): PromiseLike<SymbolInformation[]>;
1577
- $resolveWorkspaceSymbol(handle: number, symbol: SymbolInformation, token: CancellationToken): PromiseLike<SymbolInformation | undefined>;
1578
- $provideFoldingRange(
1579
- handle: number,
1580
- resource: UriComponents,
1581
- context: FoldingContext,
1582
- token: CancellationToken
1583
- ): PromiseLike<FoldingRange[] | undefined>;
1584
- $provideSelectionRanges(handle: number, resource: UriComponents, positions: Position[], token: CancellationToken): PromiseLike<SelectionRange[][]>;
1585
- $provideDocumentColors(handle: number, resource: UriComponents, token: CancellationToken): PromiseLike<RawColorInfo[]>;
1586
- $provideColorPresentations(handle: number, resource: UriComponents, colorInfo: RawColorInfo, token: CancellationToken): PromiseLike<ColorPresentation[]>;
1587
- $provideInlayHints(handle: number, resource: UriComponents, range: Range, token: CancellationToken): Promise<InlayHintsDto | undefined>;
1588
- $resolveInlayHint(handle: number, id: ChainedCacheId, token: CancellationToken): Promise<InlayHintDto | undefined>;
1589
- $releaseInlayHints(handle: number, id: number): void;
1590
- $provideRenameEdits(handle: number, resource: UriComponents, position: Position, newName: string, token: CancellationToken): PromiseLike<WorkspaceEditDto | undefined>;
1591
- $resolveRenameLocation(handle: number, resource: UriComponents, position: Position, token: CancellationToken): PromiseLike<RenameLocation | undefined>;
1592
- $provideDocumentSemanticTokens(handle: number, resource: UriComponents, previousResultId: number, token: CancellationToken): Promise<BinaryBuffer | null>;
1593
- $releaseDocumentSemanticTokens(handle: number, semanticColoringResultId: number): void;
1594
- $provideDocumentRangeSemanticTokens(handle: number, resource: UriComponents, range: Range, token: CancellationToken): Promise<BinaryBuffer | null>;
1595
- $provideRootDefinition(handle: number, resource: UriComponents, location: Position, token: CancellationToken): Promise<CallHierarchyItem[] | undefined>;
1596
- $provideCallers(handle: number, definition: CallHierarchyItem, token: CancellationToken): Promise<CallHierarchyIncomingCall[] | undefined>;
1597
- $provideCallees(handle: number, definition: CallHierarchyItem, token: CancellationToken): Promise<CallHierarchyOutgoingCall[] | undefined>;
1598
- $provideLinkedEditingRanges(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<LinkedEditingRanges | undefined>;
1599
- $releaseCallHierarchy(handle: number, session?: string): Promise<boolean>;
1600
- $prepareTypeHierarchy(handle: number, resource: UriComponents, location: Position, token: theia.CancellationToken): Promise<TypeHierarchyItem[] | undefined>
1601
- $provideSuperTypes(handle: number, sessionId: string, itemId: string, token: theia.CancellationToken): Promise<TypeHierarchyItem[] | undefined>
1602
- $provideSubTypes(handle: number, sessionId: string, itemId: string, token: theia.CancellationToken): Promise<TypeHierarchyItem[] | undefined>;
1603
- $releaseTypeHierarchy(handle: number, session?: string): Promise<boolean>;
1604
- $provideInlineCompletions(handle: number, resource: UriComponents, position: Position, context: InlineCompletionContext, token: CancellationToken): Promise<IdentifiableInlineCompletions | undefined>;
1605
- $freeInlineCompletionsList(handle: number, pid: number): void;
1606
- }
1607
-
1608
- export const LanguagesMainFactory = Symbol('LanguagesMainFactory');
1609
- export interface LanguagesMainFactory {
1610
- (proxy: RPCProtocol): LanguagesMain;
1611
- }
1612
-
1613
- export const OutputChannelRegistryFactory = Symbol('OutputChannelRegistryFactory');
1614
- export interface OutputChannelRegistryFactory {
1615
- (): OutputChannelRegistryMain;
1616
- }
1617
-
1618
- export interface LanguagesMain {
1619
- $getLanguages(): Promise<string[]>;
1620
- $changeLanguage(resource: UriComponents, languageId: string): Promise<void>;
1621
- $setLanguageConfiguration(handle: number, languageId: string, configuration: SerializedLanguageConfiguration): void;
1622
- $unregister(handle: number): void;
1623
- $registerCompletionSupport(handle: number, pluginInfo: PluginInfo,
1624
- selector: SerializedDocumentFilter[], triggerCharacters: string[], supportsResolveDetails: boolean): void;
1625
- $registerImplementationProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1626
- $registerTypeDefinitionProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1627
- $registerDefinitionProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1628
- $registerDeclarationProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1629
- $registerReferenceProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1630
- $registerSignatureHelpProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], metadata: theia.SignatureHelpProviderMetadata): void;
1631
- $registerHoverProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1632
- $registerEvaluatableExpressionProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1633
- $registerInlineValuesProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1634
- $emitInlineValuesEvent(eventHandle: number, event?: any): void;
1635
- $registerDocumentHighlightProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1636
- $registerQuickFixProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], codeActionKinds?: string[], documentation?: CodeActionProviderDocumentation): void;
1637
- $clearDiagnostics(id: string): void;
1638
- $changeDiagnostics(id: string, delta: [string, MarkerData[]][]): void;
1639
- $registerDocumentFormattingSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1640
- $registerRangeFormattingSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1641
- $registerOnTypeFormattingProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], autoFormatTriggerCharacters: string[]): void;
1642
- $registerDocumentLinkProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1643
- $registerCodeLensSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], eventHandle?: number): void;
1644
- $emitCodeLensEvent(eventHandle: number, event?: any): void;
1645
- $registerOutlineSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], displayName?: string): void;
1646
- $registerWorkspaceSymbolProvider(handle: number, pluginInfo: PluginInfo): void;
1647
- $registerFoldingRangeProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], eventHandle?: number): void;
1648
- $emitFoldingRangeEvent(handle: number, event?: any): void;
1649
- $registerSelectionRangeProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1650
- $registerDocumentColorProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1651
- $registerInlayHintsProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], displayName?: string, eventHandle?: number): void;
1652
- $emitInlayHintsEvent(eventHandle: number, event?: any): void;
1653
- $registerRenameProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], supportsResolveInitialValues: boolean): void;
1654
- $registerDocumentSemanticTokensProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[],
1655
- legend: theia.SemanticTokensLegend, eventHandle: number | undefined): void;
1656
- $emitDocumentSemanticTokensEvent(eventHandle: number): void;
1657
- $registerDocumentRangeSemanticTokensProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], legend: theia.SemanticTokensLegend): void;
1658
- $registerCallHierarchyProvider(handle: number, selector: SerializedDocumentFilter[]): void;
1659
- $registerLinkedEditingRangeProvider(handle: number, selector: SerializedDocumentFilter[]): void;
1660
- $registerTypeHierarchyProvider(handle: number, selector: SerializedDocumentFilter[]): void;
1661
- $setLanguageStatus(handle: number, status: LanguageStatus): void;
1662
- $removeLanguageStatus(handle: number): void;
1663
- $registerInlineCompletionsSupport(handle: number, selector: SerializedDocumentFilter[]): void;
1664
- }
1665
-
1666
- export interface WebviewInitData {
1667
- webviewResourceRoot: string
1668
- webviewCspSource: string
1669
- }
1670
-
1671
- export interface WebviewPanelViewState {
1672
- readonly active: boolean;
1673
- readonly visible: boolean;
1674
- readonly position: number;
1675
- }
1676
-
1677
- export interface WebviewsExt {
1678
- $onMessage(handle: string, message: any): void;
1679
- $onDidChangeWebviewPanelViewState(handle: string, newState: WebviewPanelViewState): void;
1680
- $onDidDisposeWebviewPanel(handle: string): PromiseLike<void>;
1681
- $deserializeWebviewPanel(newWebviewHandle: string,
1682
- viewType: string,
1683
- title: string,
1684
- state: any,
1685
- viewState: WebviewPanelViewState,
1686
- options: theia.WebviewOptions & theia.WebviewPanelOptions): PromiseLike<void>;
1687
- }
1688
-
1689
- export interface WebviewsMain {
1690
- $createWebviewPanel(handle: string,
1691
- viewType: string,
1692
- title: string,
1693
- showOptions: theia.WebviewPanelShowOptions,
1694
- options: theia.WebviewPanelOptions & theia.WebviewOptions): void;
1695
- $disposeWebview(handle: string): void;
1696
- $reveal(handle: string, showOptions: theia.WebviewPanelShowOptions): void;
1697
- $setTitle(handle: string, value: string): void;
1698
- $setIconPath(handle: string, value: IconUrl | undefined): void;
1699
- $setHtml(handle: string, value: string): void;
1700
- $setOptions(handle: string, options: theia.WebviewOptions): void;
1701
- $postMessage(handle: string, value: any): Thenable<boolean>;
1702
-
1703
- $registerSerializer(viewType: string): void;
1704
- $unregisterSerializer(viewType: string): void;
1705
- }
1706
-
1707
- export interface WebviewViewsExt {
1708
- $resolveWebviewView(handle: string,
1709
- viewType: string,
1710
- title: string | undefined,
1711
- state: any,
1712
- cancellation: CancellationToken): Promise<void>;
1713
- $onDidChangeWebviewViewVisibility(handle: string, visible: boolean): void;
1714
- $disposeWebviewView(handle: string): void;
1715
- }
1716
-
1717
- export interface WebviewViewsMain extends Disposable {
1718
- $registerWebviewViewProvider(viewType: string,
1719
- options: { retainContextWhenHidden?: boolean, serializeBuffersForPostMessage: boolean }): void;
1720
- $unregisterWebviewViewProvider(viewType: string): void;
1721
-
1722
- $setWebviewViewTitle(handle: string, value: string | undefined): void;
1723
- $setWebviewViewDescription(handle: string, value: string | undefined): void;
1724
-
1725
- $show(handle: string, preserveFocus: boolean): void;
1726
- }
1727
-
1728
- export interface CustomEditorsExt {
1729
- $resolveWebviewEditor<T>(
1730
- resource: UriComponents,
1731
- newWebviewHandle: string,
1732
- viewType: string,
1733
- title: string,
1734
- widgetOpenerOptions: T | undefined,
1735
- options: theia.WebviewPanelOptions,
1736
- cancellation: CancellationToken): Promise<void>;
1737
- $createCustomDocument(resource: UriComponents, viewType: string, openContext: theia.CustomDocumentOpenContext, cancellation: CancellationToken): Promise<{ editable: boolean }>;
1738
- $disposeCustomDocument(resource: UriComponents, viewType: string): Promise<void>;
1739
- $undo(resource: UriComponents, viewType: string, editId: number, isDirty: boolean): Promise<void>;
1740
- $redo(resource: UriComponents, viewType: string, editId: number, isDirty: boolean): Promise<void>;
1741
- $revert(resource: UriComponents, viewType: string, cancellation: CancellationToken): Promise<void>;
1742
- $disposeEdits(resourceComponents: UriComponents, viewType: string, editIds: number[]): void;
1743
- $onSave(resource: UriComponents, viewType: string, cancellation: CancellationToken): Promise<void>;
1744
- $onSaveAs(resource: UriComponents, viewType: string, targetResource: UriComponents, cancellation: CancellationToken): Promise<void>;
1745
- // $backup(resource: UriComponents, viewType: string, cancellation: CancellationToken): Promise<string>;
1746
- $onMoveCustomEditor(handle: string, newResource: UriComponents, viewType: string): Promise<void>;
1747
- }
1748
-
1749
- export interface CustomTextEditorCapabilities {
1750
- readonly supportsMove?: boolean;
1751
- }
1752
-
1753
- export interface CustomEditorsMain {
1754
- $registerTextEditorProvider(viewType: string, options: theia.WebviewPanelOptions, capabilities: CustomTextEditorCapabilities): void;
1755
- $registerCustomEditorProvider(viewType: string, options: theia.WebviewPanelOptions, supportsMultipleEditorsPerDocument: boolean): void;
1756
- $unregisterEditorProvider(viewType: string): void;
1757
- $createCustomEditorPanel<T>(handle: string, title: string, widgetOpenerOptions: T | undefined, options: theia.WebviewPanelOptions & theia.WebviewOptions): Promise<void>;
1758
- $onDidEdit(resource: UriComponents, viewType: string, editId: number, label: string | undefined): void;
1759
- $onContentChange(resource: UriComponents, viewType: string): void;
1760
- }
1761
-
1762
- export interface StorageMain {
1763
- $set(key: string, value: KeysToAnyValues, isGlobal: boolean): Promise<boolean>;
1764
- $get(key: string, isGlobal: boolean): Promise<KeysToAnyValues>;
1765
- $getAll(isGlobal: boolean): Promise<KeysToKeysToAnyValue>;
1766
- }
1767
-
1768
- export interface StorageExt {
1769
- $updatePluginsWorkspaceData(data: KeysToKeysToAnyValue): void;
1770
- }
1771
-
1772
- /**
1773
- * A DebugConfigurationProviderTriggerKind specifies when the `provideDebugConfigurations` method of a `DebugConfigurationProvider` should be called.
1774
- * Currently there are two situations:
1775
- * (1) providing debug configurations to populate a newly created `launch.json`
1776
- * (2) providing dynamically generated configurations when the user asks for them through the UI (e.g. via the "Select and Start Debugging" command).
1777
- * A trigger kind is used when registering a `DebugConfigurationProvider` with {@link debug.registerDebugConfigurationProvider}.
1778
- */
1779
- export enum DebugConfigurationProviderTriggerKind {
1780
- /**
1781
- * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide the initial debug
1782
- * configurations for a newly created launch.json.
1783
- */
1784
- Initial = 1,
1785
- /**
1786
- * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide dynamically generated debug configurations when the user asks for them through the UI
1787
- * (e.g. via the "Select and Start Debugging" command).
1788
- */
1789
- Dynamic = 2
1790
- }
1791
-
1792
- export interface DebugConfigurationProvider {
1793
- readonly handle: number;
1794
- readonly type: string;
1795
- readonly triggerKind: DebugConfigurationProviderTriggerKind;
1796
- provideDebugConfigurations?(folder: string | undefined): Promise<theia.DebugConfiguration[]>;
1797
- resolveDebugConfiguration?(
1798
- folder: string | undefined,
1799
- debugConfiguration: theia.DebugConfiguration
1800
- ): Promise<theia.DebugConfiguration | undefined | null>;
1801
- resolveDebugConfigurationWithSubstitutedVariables?(
1802
- folder: string | undefined,
1803
- debugConfiguration: theia.DebugConfiguration
1804
- ): Promise<theia.DebugConfiguration | undefined | null>;
1805
- }
1806
-
1807
- export interface DebugConfigurationProviderDescriptor {
1808
- readonly handle: number,
1809
- readonly type: string,
1810
- readonly trigger: DebugConfigurationProviderTriggerKind,
1811
- readonly provideDebugConfiguration: boolean,
1812
- readonly resolveDebugConfigurations: boolean,
1813
- readonly resolveDebugConfigurationWithSubstitutedVariables: boolean
1814
- }
1815
-
1816
- export interface DebugExt {
1817
- $onSessionCustomEvent(sessionId: string, event: string, body?: any): void;
1818
- $breakpointsDidChange(added: Breakpoint[], removed: string[], changed: Breakpoint[]): void;
1819
- $sessionDidCreate(sessionId: string): void;
1820
- $sessionDidStart(sessionId: string): void;
1821
- $sessionDidDestroy(sessionId: string): void;
1822
- $sessionDidChange(sessionId: string | undefined): void;
1823
- $provideDebugConfigurationsByHandle(handle: number, workspaceFolder: string | undefined): Promise<theia.DebugConfiguration[]>;
1824
- $resolveDebugConfigurationByHandle(
1825
- handle: number,
1826
- workspaceFolder: string | undefined,
1827
- debugConfiguration: theia.DebugConfiguration
1828
- ): Promise<theia.DebugConfiguration | undefined | null>;
1829
- $resolveDebugConfigurationWithSubstitutedVariablesByHandle(
1830
- handle: number,
1831
- workspaceFolder: string | undefined,
1832
- debugConfiguration: DebugConfiguration
1833
- ): Promise<theia.DebugConfiguration | undefined | null>;
1834
-
1835
- $createDebugSession(debugConfiguration: DebugConfiguration, workspaceFolder: string | undefined): Promise<string>;
1836
- $terminateDebugSession(sessionId: string): Promise<void>;
1837
- $getTerminalCreationOptions(debugType: string): Promise<TerminalOptionsExt | undefined>;
1838
- }
1839
-
1840
- export interface DebugMain {
1841
- $appendToDebugConsole(value: string): Promise<void>;
1842
- $appendLineToDebugConsole(value: string): Promise<void>;
1843
- $registerDebuggerContribution(description: DebuggerDescription): Promise<void>;
1844
- $unregisterDebuggerConfiguration(debugType: string): Promise<void>;
1845
- $registerDebugConfigurationProvider(description: DebugConfigurationProviderDescriptor): void;
1846
- $unregisterDebugConfigurationProvider(handle: number): Promise<void>;
1847
- $addBreakpoints(breakpoints: Breakpoint[]): Promise<void>;
1848
- $removeBreakpoints(breakpoints: string[]): Promise<void>;
1849
- $startDebugging(folder: theia.WorkspaceFolder | undefined, nameOrConfiguration: string | theia.DebugConfiguration, options: DebugSessionOptions): Promise<boolean>;
1850
- $stopDebugging(sessionId?: string): Promise<void>;
1851
- $customRequest(sessionId: string, command: string, args?: any): Promise<DebugProtocol.Response>;
1852
- $getDebugProtocolBreakpoint(sessionId: string, breakpointId: string): Promise<theia.DebugProtocolBreakpoint | undefined>;
1853
- }
1854
-
1855
- export interface FileSystemExt {
1856
- $acceptProviderInfos(scheme: string, capabilities?: files.FileSystemProviderCapabilities): void;
1857
- $stat(handle: number, resource: UriComponents): Promise<files.Stat>;
1858
- $readdir(handle: number, resource: UriComponents): Promise<[string, files.FileType][]>;
1859
- $readFile(handle: number, resource: UriComponents): Promise<BinaryBuffer>;
1860
- $writeFile(handle: number, resource: UriComponents, content: BinaryBuffer, opts: files.FileWriteOptions): Promise<void>;
1861
- $rename(handle: number, resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
1862
- $copy(handle: number, resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
1863
- $mkdir(handle: number, resource: UriComponents): Promise<void>;
1864
- $delete(handle: number, resource: UriComponents, opts: files.FileDeleteOptions): Promise<void>;
1865
- $watch(handle: number, session: number, resource: UriComponents, opts: files.WatchOptions): void;
1866
- $unwatch(handle: number, session: number): void;
1867
- $open(handle: number, resource: UriComponents, opts: files.FileOpenOptions): Promise<number>;
1868
- $close(handle: number, fd: number): Promise<void>;
1869
- $read(handle: number, fd: number, pos: number, length: number): Promise<BinaryBuffer>;
1870
- $write(handle: number, fd: number, pos: number, data: BinaryBuffer): Promise<number>;
1871
- }
1872
-
1873
- export interface IFileChangeDto {
1874
- resource: UriComponents;
1875
- type: files.FileChangeType;
1876
- }
1877
-
1878
- export interface FileSystemMain {
1879
- $registerFileSystemProvider(handle: number, scheme: string, capabilities: files.FileSystemProviderCapabilities): void;
1880
- $unregisterProvider(handle: number): void;
1881
- $onFileSystemChange(handle: number, resource: IFileChangeDto[]): void;
1882
-
1883
- $stat(uri: UriComponents): Promise<files.Stat>;
1884
- $readdir(resource: UriComponents): Promise<[string, files.FileType][]>;
1885
- $readFile(resource: UriComponents): Promise<BinaryBuffer>;
1886
- $writeFile(resource: UriComponents, content: BinaryBuffer): Promise<void>;
1887
- $rename(resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
1888
- $copy(resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
1889
- $mkdir(resource: UriComponents): Promise<void>;
1890
- $delete(resource: UriComponents, opts: files.FileDeleteOptions): Promise<void>;
1891
- }
1892
-
1893
- export interface FileSystemEvents {
1894
- created: UriComponents[];
1895
- changed: UriComponents[];
1896
- deleted: UriComponents[];
1897
- }
1898
-
1899
- export interface ExtHostFileSystemEventServiceShape {
1900
- $onFileEvent(events: FileSystemEvents): void;
1901
- $onWillRunFileOperation(operation: files.FileOperation, target: UriComponents, source: UriComponents | undefined, timeout: number, token: CancellationToken): Promise<any>;
1902
- $onDidRunFileOperation(operation: files.FileOperation, target: UriComponents, source: UriComponents | undefined): void;
1903
- }
1904
-
1905
- export interface ClipboardMain {
1906
- $readText(): Promise<string>;
1907
- $writeText(value: string): Promise<void>;
1908
- }
1909
-
1910
- export interface CommentsExt {
1911
- $createCommentThreadTemplate(commentControllerHandle: number, uriComponents: UriComponents, range: Range): void;
1912
- $updateCommentThreadTemplate(commentControllerHandle: number, threadHandle: number, range: Range): Promise<void>;
1913
- $deleteCommentThread(commentControllerHandle: number, commentThreadHandle: number): Promise<void>;
1914
- $provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<Range[] | undefined>;
1915
- }
1916
-
1917
- export interface CommentProviderFeatures {
1918
- options?: CommentOptions;
1919
- }
1920
-
1921
- export type CommentThreadChanges = Partial<{
1922
- range: Range,
1923
- label: string,
1924
- contextValue: string,
1925
- comments: Comment[],
1926
- collapseState: CommentThreadCollapsibleState;
1927
- canReply: boolean;
1928
- }>;
1929
-
1930
- export interface CommentsMain {
1931
- $registerCommentController(handle: number, id: string, label: string): void;
1932
- $unregisterCommentController(handle: number): void;
1933
- $updateCommentControllerFeatures(handle: number, features: CommentProviderFeatures): void;
1934
- $createCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, range: Range, extensionId: string): CommentThread | undefined;
1935
- $updateCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, changes: CommentThreadChanges): void;
1936
- $deleteCommentThread(handle: number, commentThreadHandle: number): void;
1937
- $onDidCommentThreadsChange(handle: number, event: CommentThreadChangedEvent): void;
1938
- }
1939
-
1940
- // #region
1941
-
1942
- export const enum TabInputKind {
1943
- UnknownInput,
1944
- TextInput,
1945
- TextDiffInput,
1946
- TextMergeInput,
1947
- NotebookInput,
1948
- NotebookDiffInput,
1949
- CustomEditorInput,
1950
- WebviewEditorInput,
1951
- TerminalEditorInput,
1952
- InteractiveEditorInput,
1953
- }
1954
-
1955
- export interface UnknownInputDto {
1956
- kind: TabInputKind.UnknownInput;
1957
- }
1958
-
1959
- export interface TextInputDto {
1960
- kind: TabInputKind.TextInput;
1961
- uri: UriComponents;
1962
- }
1963
-
1964
- export interface TextDiffInputDto {
1965
- kind: TabInputKind.TextDiffInput;
1966
- original: UriComponents;
1967
- modified: UriComponents;
1968
- }
1969
-
1970
- export interface TextMergeInputDto {
1971
- kind: TabInputKind.TextMergeInput;
1972
- base: UriComponents;
1973
- input1: UriComponents;
1974
- input2: UriComponents;
1975
- result: UriComponents;
1976
- }
1977
-
1978
- export interface NotebookInputDto {
1979
- kind: TabInputKind.NotebookInput;
1980
- notebookType: string;
1981
- uri: UriComponents;
1982
- }
1983
-
1984
- export interface NotebookDiffInputDto {
1985
- kind: TabInputKind.NotebookDiffInput;
1986
- notebookType: string;
1987
- original: UriComponents;
1988
- modified: UriComponents;
1989
- }
1990
-
1991
- export interface CustomInputDto {
1992
- kind: TabInputKind.CustomEditorInput;
1993
- viewType: string;
1994
- uri: UriComponents;
1995
- }
1996
-
1997
- export interface WebviewInputDto {
1998
- kind: TabInputKind.WebviewEditorInput;
1999
- viewType: string;
2000
- }
2001
-
2002
- export interface InteractiveEditorInputDto {
2003
- kind: TabInputKind.InteractiveEditorInput;
2004
- uri: UriComponents;
2005
- inputBoxUri: UriComponents;
2006
- }
2007
-
2008
- export interface TabInputDto {
2009
- kind: TabInputKind.TerminalEditorInput;
2010
- }
2011
-
2012
- export type EditorGroupColumn = number;
2013
- export type AnyInputDto = UnknownInputDto | TextInputDto | TextDiffInputDto | TextMergeInputDto | NotebookInputDto | NotebookDiffInputDto | CustomInputDto | WebviewInputDto | InteractiveEditorInputDto | TabInputDto;
2014
-
2015
- export interface TabGroupDto {
2016
- isActive: boolean;
2017
- viewColumn: EditorGroupColumn;
2018
- tabs: TabDto[];
2019
- groupId: number;
2020
- }
2021
-
2022
- export const enum TabModelOperationKind {
2023
- TAB_OPEN,
2024
- TAB_CLOSE,
2025
- TAB_UPDATE,
2026
- TAB_MOVE
2027
- }
2028
-
2029
- export interface TabOperation {
2030
- readonly kind: TabModelOperationKind.TAB_OPEN | TabModelOperationKind.TAB_CLOSE | TabModelOperationKind.TAB_UPDATE | TabModelOperationKind.TAB_MOVE;
2031
- readonly index: number;
2032
- readonly tabDto: TabDto;
2033
- readonly groupId: number;
2034
- readonly oldIndex?: number;
2035
- }
2036
-
2037
- export interface TabDto {
2038
- id: string;
2039
- label: string;
2040
- input: AnyInputDto;
2041
- editorId?: string;
2042
- isActive: boolean;
2043
- isPinned: boolean;
2044
- isPreview: boolean;
2045
- isDirty: boolean;
2046
- }
2047
-
2048
- export interface TabsExt {
2049
- $acceptEditorTabModel(tabGroups: TabGroupDto[]): void;
2050
- $acceptTabGroupUpdate(groupDto: TabGroupDto): void;
2051
- $acceptTabOperation(operation: TabOperation): void;
2052
- }
2053
-
2054
- export interface TabsMain {
2055
- $moveTab(tabId: string, index: number, viewColumn: EditorGroupColumn, preserveFocus?: boolean): void;
2056
- $closeTab(tabIds: string[], preserveFocus?: boolean): Promise<boolean>;
2057
- $closeGroup(groupIds: number[], preserveFocus?: boolean): Promise<boolean>;
2058
- }
2059
-
2060
- // endregion
2061
-
2062
- export const PLUGIN_RPC_CONTEXT = {
2063
- AUTHENTICATION_MAIN: <ProxyIdentifier<AuthenticationMain>>createProxyIdentifier<AuthenticationMain>('AuthenticationMain'),
2064
- COMMAND_REGISTRY_MAIN: <ProxyIdentifier<CommandRegistryMain>>createProxyIdentifier<CommandRegistryMain>('CommandRegistryMain'),
2065
- QUICK_OPEN_MAIN: createProxyIdentifier<QuickOpenMain>('QuickOpenMain'),
2066
- DIALOGS_MAIN: createProxyIdentifier<DialogsMain>('DialogsMain'),
2067
- WORKSPACE_MAIN: createProxyIdentifier<WorkspaceMain>('WorkspaceMain'),
2068
- MESSAGE_REGISTRY_MAIN: <ProxyIdentifier<MessageRegistryMain>>createProxyIdentifier<MessageRegistryMain>('MessageRegistryMain'),
2069
- TEXT_EDITORS_MAIN: createProxyIdentifier<TextEditorsMain>('TextEditorsMain'),
2070
- DOCUMENTS_MAIN: createProxyIdentifier<DocumentsMain>('DocumentsMain'),
2071
- STATUS_BAR_MESSAGE_REGISTRY_MAIN: <ProxyIdentifier<StatusBarMessageRegistryMain>>createProxyIdentifier<StatusBarMessageRegistryMain>('StatusBarMessageRegistryMain'),
2072
- ENV_MAIN: createProxyIdentifier<EnvMain>('EnvMain'),
2073
- NOTIFICATION_MAIN: createProxyIdentifier<NotificationMain>('NotificationMain'),
2074
- TERMINAL_MAIN: createProxyIdentifier<TerminalServiceMain>('TerminalServiceMain'),
2075
- TREE_VIEWS_MAIN: createProxyIdentifier<TreeViewsMain>('TreeViewsMain'),
2076
- PREFERENCE_REGISTRY_MAIN: createProxyIdentifier<PreferenceRegistryMain>('PreferenceRegistryMain'),
2077
- OUTPUT_CHANNEL_REGISTRY_MAIN: <ProxyIdentifier<OutputChannelRegistryMain>>createProxyIdentifier<OutputChannelRegistryMain>('OutputChannelRegistryMain'),
2078
- LANGUAGES_MAIN: createProxyIdentifier<LanguagesMain>('LanguagesMain'),
2079
- CONNECTION_MAIN: createProxyIdentifier<ConnectionMain>('ConnectionMain'),
2080
- WEBVIEWS_MAIN: createProxyIdentifier<WebviewsMain>('WebviewsMain'),
2081
- CUSTOM_EDITORS_MAIN: createProxyIdentifier<CustomEditorsMain>('CustomEditorsMain'),
2082
- WEBVIEW_VIEWS_MAIN: createProxyIdentifier<WebviewViewsMain>('WebviewViewsMain'),
2083
- STORAGE_MAIN: createProxyIdentifier<StorageMain>('StorageMain'),
2084
- TASKS_MAIN: createProxyIdentifier<TasksMain>('TasksMain'),
2085
- DEBUG_MAIN: createProxyIdentifier<DebugMain>('DebugMain'),
2086
- FILE_SYSTEM_MAIN: createProxyIdentifier<FileSystemMain>('FileSystemMain'),
2087
- SCM_MAIN: createProxyIdentifier<ScmMain>('ScmMain'),
2088
- SECRETS_MAIN: createProxyIdentifier<SecretsMain>('SecretsMain'),
2089
- DECORATIONS_MAIN: createProxyIdentifier<DecorationsMain>('DecorationsMain'),
2090
- WINDOW_MAIN: createProxyIdentifier<WindowMain>('WindowMain'),
2091
- CLIPBOARD_MAIN: <ProxyIdentifier<ClipboardMain>>createProxyIdentifier<ClipboardMain>('ClipboardMain'),
2092
- LABEL_SERVICE_MAIN: <ProxyIdentifier<LabelServiceMain>>createProxyIdentifier<LabelServiceMain>('LabelServiceMain'),
2093
- TIMELINE_MAIN: <ProxyIdentifier<TimelineMain>>createProxyIdentifier<TimelineMain>('TimelineMain'),
2094
- THEMING_MAIN: <ProxyIdentifier<ThemingMain>>createProxyIdentifier<ThemingMain>('ThemingMain'),
2095
- COMMENTS_MAIN: <ProxyIdentifier<CommentsMain>>createProxyIdentifier<CommentsMain>('CommentsMain'),
2096
- TABS_MAIN: <ProxyIdentifier<TabsMain>>createProxyIdentifier<TabsMain>('TabsMain')
2097
- };
2098
-
2099
- export const MAIN_RPC_CONTEXT = {
2100
- AUTHENTICATION_EXT: createProxyIdentifier<AuthenticationExt>('AuthenticationExt'),
2101
- HOSTED_PLUGIN_MANAGER_EXT: createProxyIdentifier<PluginManagerExt>('PluginManagerExt'),
2102
- COMMAND_REGISTRY_EXT: createProxyIdentifier<CommandRegistryExt>('CommandRegistryExt'),
2103
- QUICK_OPEN_EXT: createProxyIdentifier<QuickOpenExt>('QuickOpenExt'),
2104
- WINDOW_STATE_EXT: createProxyIdentifier<WindowStateExt>('WindowStateExt'),
2105
- NOTIFICATION_EXT: createProxyIdentifier<NotificationExt>('NotificationExt'),
2106
- WORKSPACE_EXT: createProxyIdentifier<WorkspaceExt>('WorkspaceExt'),
2107
- TEXT_EDITORS_EXT: createProxyIdentifier<TextEditorsExt>('TextEditorsExt'),
2108
- EDITORS_AND_DOCUMENTS_EXT: createProxyIdentifier<EditorsAndDocumentsExt>('EditorsAndDocumentsExt'),
2109
- DOCUMENTS_EXT: createProxyIdentifier<DocumentsExt>('DocumentsExt'),
2110
- TERMINAL_EXT: createProxyIdentifier<TerminalServiceExt>('TerminalServiceExt'),
2111
- OUTPUT_CHANNEL_REGISTRY_EXT: createProxyIdentifier<OutputChannelRegistryExt>('OutputChannelRegistryExt'),
2112
- TREE_VIEWS_EXT: createProxyIdentifier<TreeViewsExt>('TreeViewsExt'),
2113
- PREFERENCE_REGISTRY_EXT: createProxyIdentifier<PreferenceRegistryExt>('PreferenceRegistryExt'),
2114
- LANGUAGES_EXT: createProxyIdentifier<LanguagesExt>('LanguagesExt'),
2115
- CONNECTION_EXT: createProxyIdentifier<ConnectionExt>('ConnectionExt'),
2116
- WEBVIEWS_EXT: createProxyIdentifier<WebviewsExt>('WebviewsExt'),
2117
- CUSTOM_EDITORS_EXT: createProxyIdentifier<CustomEditorsExt>('CustomEditorsExt'),
2118
- WEBVIEW_VIEWS_EXT: createProxyIdentifier<WebviewViewsExt>('WebviewViewsExt'),
2119
- STORAGE_EXT: createProxyIdentifier<StorageExt>('StorageExt'),
2120
- TASKS_EXT: createProxyIdentifier<TasksExt>('TasksExt'),
2121
- DEBUG_EXT: createProxyIdentifier<DebugExt>('DebugExt'),
2122
- FILE_SYSTEM_EXT: createProxyIdentifier<FileSystemExt>('FileSystemExt'),
2123
- ExtHostFileSystemEventService: createProxyIdentifier<ExtHostFileSystemEventServiceShape>('ExtHostFileSystemEventService'),
2124
- SCM_EXT: createProxyIdentifier<ScmExt>('ScmExt'),
2125
- SECRETS_EXT: createProxyIdentifier<SecretsExt>('SecretsExt'),
2126
- DECORATIONS_EXT: createProxyIdentifier<DecorationsExt>('DecorationsExt'),
2127
- LABEL_SERVICE_EXT: createProxyIdentifier<LabelServiceExt>('LabelServiceExt'),
2128
- TIMELINE_EXT: createProxyIdentifier<TimelineExt>('TimeLineExt'),
2129
- THEMING_EXT: createProxyIdentifier<ThemingExt>('ThemingExt'),
2130
- COMMENTS_EXT: createProxyIdentifier<CommentsExt>('CommentsExt'),
2131
- TABS_EXT: createProxyIdentifier<TabsExt>('TabsExt')
2132
- };
2133
-
2134
- export interface TasksExt {
2135
- $initLoadedTasks(executions: TaskExecutionDto[]): Promise<void>;
2136
- $provideTasks(handle: number): Promise<TaskDto[] | undefined>;
2137
- $resolveTask(handle: number, task: TaskDto, token?: CancellationToken): Promise<TaskDto | undefined>;
2138
- $onDidStartTask(execution: TaskExecutionDto, terminalId: number): void;
2139
- $onDidEndTask(id: number): void;
2140
- $onDidStartTaskProcess(processId: number | undefined, execution: TaskExecutionDto): void;
2141
- $onDidEndTaskProcess(exitCode: number | undefined, taskId: number): void;
2142
- }
2143
-
2144
- export interface TasksMain {
2145
- $registerTaskProvider(handle: number, type: string): void;
2146
- $fetchTasks(taskVersion: string | undefined, taskType: string | undefined): Promise<TaskDto[]>;
2147
- $executeTask(taskDto: TaskDto): Promise<TaskExecutionDto | undefined>;
2148
- $taskExecutions(): Promise<TaskExecutionDto[]>;
2149
- $unregister(handle: number): void;
2150
- $terminateTask(id: number): void;
2151
- $customExecutionComplete(id: number, exitCode: number | undefined): void;
2152
- }
2153
-
2154
- export interface AuthenticationExt {
2155
- $getSessions(id: string, scopes?: string[]): Promise<ReadonlyArray<theia.AuthenticationSession>>;
2156
- $createSession(id: string, scopes: string[]): Promise<theia.AuthenticationSession>;
2157
- $removeSession(id: string, sessionId: string): Promise<void>;
2158
- $onDidChangeAuthenticationSessions(provider: theia.AuthenticationProviderInformation): Promise<void>;
2159
- }
2160
-
2161
- export interface AuthenticationMain {
2162
- $registerAuthenticationProvider(id: string, label: string, supportsMultipleAccounts: boolean): void;
2163
- $unregisterAuthenticationProvider(id: string): void;
2164
- $onDidChangeSessions(providerId: string, event: AuthenticationProviderAuthenticationSessionsChangeEvent): void;
2165
- $getSession(providerId: string, scopes: readonly string[], extensionId: string, extensionName: string,
2166
- options: theia.AuthenticationGetSessionOptions): Promise<theia.AuthenticationSession | undefined>;
2167
- }
2168
-
2169
- export interface RawColorInfo {
2170
- color: [number, number, number, number];
2171
- range: Range;
2172
- }
2173
-
2174
- export interface LabelServiceExt {
2175
- $registerResourceLabelFormatter(formatter: ResourceLabelFormatter): theia.Disposable;
2176
- }
2177
-
2178
- export interface LabelServiceMain {
2179
- $registerResourceLabelFormatter(handle: number, formatter: ResourceLabelFormatter): void;
2180
- $unregisterResourceLabelFormatter(handle: number): void;
2181
- }
2182
-
2183
- export interface SecretsExt {
2184
- $onDidChangePassword(e: { extensionId: string, key: string }): Promise<void>;
2185
- }
2186
-
2187
- export interface SecretsMain {
2188
- $getPassword(extensionId: string, key: string): Promise<string | undefined>;
2189
- $setPassword(extensionId: string, key: string, value: string): Promise<void>;
2190
- $deletePassword(extensionId: string, key: string): Promise<void>;
2191
- }
2192
-
2193
- export type InlayHintDto = CachedSessionItem<InlayHint>;
2194
- export type InlayHintsDto = CachedSession<{ hints: InlayHint[] }>;
2195
-
2196
- export interface IdentifiableInlineCompletions extends InlineCompletions<IdentifiableInlineCompletion> {
2197
- pid: number;
2198
- }
2199
-
2200
- export interface IdentifiableInlineCompletion extends InlineCompletion {
2201
- idx: number;
2202
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2018 Red Hat, Inc. and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ /* eslint-disable @typescript-eslint/no-explicit-any */
18
+
19
+ import { createProxyIdentifier, ProxyIdentifier, RPCProtocol } from './rpc-protocol';
20
+ import * as theia from '@theia/plugin';
21
+ import { PluginLifecycle, PluginModel, PluginMetadata, PluginPackage, IconUrl, PluginJsonValidationContribution } from './plugin-protocol';
22
+ import { QueryParameters } from './env';
23
+ import { TextEditorCursorStyle } from './editor-options';
24
+ import {
25
+ ConfigurationTarget,
26
+ TextEditorLineNumbersStyle,
27
+ EndOfLine,
28
+ OverviewRulerLane,
29
+ FileOperationOptions,
30
+ TextDocumentChangeReason,
31
+ IndentAction,
32
+ } from '../plugin/types-impl';
33
+ import { UriComponents } from './uri-components';
34
+ import {
35
+ SerializedDocumentFilter,
36
+ CompletionContext,
37
+ MarkdownString,
38
+ Range,
39
+ Completion,
40
+ CompletionResultDto,
41
+ MarkerData,
42
+ SignatureHelp,
43
+ Hover,
44
+ EvaluatableExpression,
45
+ InlineValue,
46
+ InlineValueContext,
47
+ DocumentHighlight,
48
+ FormattingOptions,
49
+ ChainedCacheId,
50
+ Definition,
51
+ DocumentLink,
52
+ CodeLensSymbol,
53
+ Command,
54
+ TextEdit,
55
+ DocumentSymbol,
56
+ ReferenceContext,
57
+ TextDocumentShowOptions,
58
+ WorkspaceRootsChangeEvent,
59
+ Location,
60
+ Breakpoint,
61
+ ColorPresentation,
62
+ RenameLocation,
63
+ SignatureHelpContext,
64
+ CodeAction,
65
+ CodeActionContext,
66
+ FoldingContext,
67
+ FoldingRange,
68
+ SelectionRange,
69
+ SearchInWorkspaceResult,
70
+ CallHierarchyItem,
71
+ CallHierarchyIncomingCall,
72
+ CallHierarchyOutgoingCall,
73
+ Comment,
74
+ CommentOptions,
75
+ CommentThreadCollapsibleState,
76
+ CommentThread,
77
+ CommentThreadChangedEvent,
78
+ CodeActionProviderDocumentation,
79
+ LinkedEditingRanges,
80
+ ProvidedTerminalLink,
81
+ InlayHint,
82
+ CachedSession,
83
+ CachedSessionItem,
84
+ TypeHierarchyItem,
85
+ InlineCompletion,
86
+ InlineCompletions,
87
+ InlineCompletionContext
88
+ } from './plugin-api-rpc-model';
89
+ import { ExtPluginApi } from './plugin-ext-api-contribution';
90
+ import { KeysToAnyValues, KeysToKeysToAnyValue } from './types';
91
+ import {
92
+ AuthenticationProviderAuthenticationSessionsChangeEvent,
93
+ CancellationToken,
94
+ Progress,
95
+ ProgressOptions,
96
+ } from '@theia/plugin';
97
+ import { DebuggerDescription } from '@theia/debug/lib/common/debug-service';
98
+ import { DebugProtocol } from '@vscode/debugprotocol';
99
+ import { SymbolInformation } from '@theia/core/shared/vscode-languageserver-protocol';
100
+ import { ArgumentProcessor } from '../plugin/command-registry';
101
+ import * as files from '@theia/filesystem/lib/common/files';
102
+ import { BinaryBuffer } from '@theia/core/lib/common/buffer';
103
+ import { ResourceLabelFormatter } from '@theia/core/lib/common/label-protocol';
104
+ import type {
105
+ InternalTimelineOptions,
106
+ Timeline,
107
+ TimelineChangeEvent,
108
+ TimelineProviderDescriptor
109
+ } from '@theia/timeline/lib/common/timeline-model';
110
+ import { SerializableEnvironmentVariableCollection } from '@theia/terminal/lib/common/base-terminal-protocol';
111
+ import { ThemeType } from '@theia/core/lib/common/theme';
112
+ import { Disposable } from '@theia/core/lib/common/disposable';
113
+ import { isString, isObject, PickOptions, QuickInputButtonHandle } from '@theia/core/lib/common';
114
+ import { Severity } from '@theia/core/lib/common/severity';
115
+ import { DebugConfiguration, DebugSessionOptions } from '@theia/debug/lib/common/debug-configuration';
116
+
117
+ export interface PreferenceData {
118
+ [scope: number]: any;
119
+ }
120
+
121
+ export interface Plugin {
122
+ pluginPath: string | undefined;
123
+ pluginFolder: string;
124
+ pluginUri: string;
125
+ model: PluginModel;
126
+ rawModel: PluginPackage;
127
+ lifecycle: PluginLifecycle;
128
+ isUnderDevelopment: boolean;
129
+ }
130
+
131
+ export interface ConfigStorage {
132
+ hostLogPath: string;
133
+ hostStoragePath?: string;
134
+ hostGlobalStoragePath: string;
135
+ }
136
+
137
+ export enum UIKind {
138
+
139
+ /**
140
+ * Extensions are accessed from a desktop application.
141
+ */
142
+ Desktop = 1,
143
+
144
+ /**
145
+ * Extensions are accessed from a web browser.
146
+ */
147
+ Web = 2
148
+ }
149
+
150
+ export interface EnvInit {
151
+ queryParams: QueryParameters;
152
+ language: string;
153
+ shell: string;
154
+ uiKind: UIKind,
155
+ appName: string;
156
+ appHost: string;
157
+ }
158
+
159
+ export interface PluginAPI {
160
+
161
+ }
162
+
163
+ export interface PluginManager {
164
+ getAllPlugins(): Plugin[];
165
+ getPluginById(pluginId: string): Plugin | undefined;
166
+ getPluginExport(pluginId: string): PluginAPI | undefined;
167
+ isRunning(pluginId: string): boolean;
168
+ isActive(pluginId: string): boolean;
169
+ activatePlugin(pluginId: string): PromiseLike<void>;
170
+ onDidChange: theia.Event<void>;
171
+ }
172
+
173
+ export interface PluginAPIFactory {
174
+ (plugin: Plugin): typeof theia;
175
+ }
176
+
177
+ export const emptyPlugin: Plugin = {
178
+ lifecycle: {
179
+ startMethod: 'empty',
180
+ stopMethod: 'empty'
181
+ },
182
+ model: {
183
+ id: 'emptyPlugin',
184
+ name: 'emptyPlugin',
185
+ publisher: 'Theia',
186
+ version: 'empty',
187
+ displayName: 'empty',
188
+ description: 'empty',
189
+ engine: {
190
+ type: 'empty',
191
+ version: 'empty'
192
+ },
193
+ packagePath: 'empty',
194
+ packageUri: 'empty',
195
+ entryPoint: {
196
+
197
+ }
198
+ },
199
+ pluginPath: 'empty',
200
+ pluginFolder: 'empty',
201
+ pluginUri: 'empty',
202
+ rawModel: {
203
+ name: 'emptyPlugin',
204
+ publisher: 'Theia',
205
+ version: 'empty',
206
+ displayName: 'empty',
207
+ description: 'empty',
208
+ engines: {
209
+ type: 'empty',
210
+ version: 'empty'
211
+ },
212
+ packagePath: 'empty'
213
+ },
214
+ isUnderDevelopment: false
215
+ };
216
+
217
+ export interface PluginManagerInitializeParams {
218
+ preferences: PreferenceData
219
+ globalState: KeysToKeysToAnyValue
220
+ workspaceState: KeysToKeysToAnyValue
221
+ env: EnvInit
222
+ extApi?: ExtPluginApi[]
223
+ webview: WebviewInitData
224
+ jsonValidation: PluginJsonValidationContribution[]
225
+ }
226
+
227
+ export interface PluginManagerStartParams {
228
+ plugins: PluginMetadata[]
229
+ configStorage: ConfigStorage
230
+ activationEvents: string[]
231
+ }
232
+
233
+ export interface PluginManagerExt {
234
+
235
+ /** initialize the manager, should be called only once */
236
+ $init(params: PluginManagerInitializeParams): Promise<void>;
237
+
238
+ /** load and activate plugins */
239
+ $start(params: PluginManagerStartParams): Promise<void>;
240
+
241
+ /** deactivate the plugin */
242
+ $stop(pluginId: string): Promise<void>;
243
+
244
+ /** deactivate all plugins */
245
+ $stop(): Promise<void>;
246
+
247
+ $updateStoragePath(path: string | undefined): Promise<void>;
248
+
249
+ $activateByEvent(event: string): Promise<void>;
250
+
251
+ $activatePlugin(id: string): Promise<void>;
252
+ }
253
+
254
+ export interface CommandRegistryMain {
255
+ $registerCommand(command: theia.CommandDescription): void;
256
+ $unregisterCommand(id: string): void;
257
+
258
+ $registerHandler(id: string): void;
259
+ $unregisterHandler(id: string): void;
260
+
261
+ $executeCommand<T>(id: string, ...args: any[]): PromiseLike<T | undefined>;
262
+ $getCommands(): PromiseLike<string[]>;
263
+ $getKeyBinding(commandId: string): PromiseLike<theia.CommandKeyBinding[] | undefined>;
264
+ }
265
+
266
+ export interface CommandRegistryExt {
267
+ $executeCommand<T>(id: string, ...ars: any[]): PromiseLike<T | undefined>;
268
+ registerArgumentProcessor(processor: ArgumentProcessor): void;
269
+ }
270
+
271
+ export interface TerminalServiceExt {
272
+ $startProfile(providerId: string, cancellationToken: theia.CancellationToken): Promise<string>;
273
+ $terminalCreated(id: string, name: string): void;
274
+ $terminalNameChanged(id: string, name: string): void;
275
+ $terminalOpened(id: string, processId: number, terminalId: number, cols: number, rows: number): void;
276
+ $terminalClosed(id: string, exitStatus: theia.TerminalExitStatus | undefined): void;
277
+ $terminalOnInput(id: string, data: string): void;
278
+ $terminalSizeChanged(id: string, cols: number, rows: number): void;
279
+ $currentTerminalChanged(id: string | undefined): void;
280
+ $terminalStateChanged(id: string): void;
281
+ $initEnvironmentVariableCollections(collections: [string, SerializableEnvironmentVariableCollection][]): void;
282
+ $provideTerminalLinks(line: string, terminalId: string, token: theia.CancellationToken): Promise<ProvidedTerminalLink[]>;
283
+ $handleTerminalLink(link: ProvidedTerminalLink): Promise<void>;
284
+ getEnvironmentVariableCollection(extensionIdentifier: string): theia.EnvironmentVariableCollection;
285
+ }
286
+ export interface OutputChannelRegistryExt {
287
+ createOutputChannel(name: string, pluginInfo: PluginInfo): theia.OutputChannel
288
+ }
289
+
290
+ export interface ConnectionMain {
291
+ $createConnection(id: string): Promise<void>;
292
+ $deleteConnection(id: string): Promise<void>;
293
+ $sendMessage(id: string, message: string): void;
294
+ }
295
+
296
+ export interface ConnectionExt {
297
+ $createConnection(id: string): Promise<void>;
298
+ $deleteConnection(id: string): Promise<void>
299
+ $sendMessage(id: string, message: string): void;
300
+ }
301
+
302
+ export interface TerminalServiceMain {
303
+ /**
304
+ * Create new Terminal with Terminal options.
305
+ * @param options - object with parameters to create new terminal.
306
+ */
307
+ $createTerminal(id: string, options: theia.TerminalOptions, parentId?: string, isPseudoTerminal?: boolean): Promise<string>;
308
+
309
+ /**
310
+ * Send text to the terminal by id.
311
+ * @param id - terminal widget id.
312
+ * @param text - text content.
313
+ * @param addNewLine - in case true - add new line after the text, otherwise - don't apply new line.
314
+ */
315
+ $sendText(id: string, text: string, addNewLine?: boolean): void;
316
+
317
+ /**
318
+ * Write data to the terminal by id.
319
+ * @param id - terminal widget id.
320
+ * @param data - data.
321
+ */
322
+ $write(id: string, data: string): void;
323
+
324
+ /**
325
+ * Resize the terminal by id.
326
+ * @param id - terminal widget id.
327
+ * @param cols - columns.
328
+ * @param rows - rows.
329
+ */
330
+ $resize(id: string, cols: number, rows: number): void;
331
+
332
+ /**
333
+ * Show terminal on the UI panel.
334
+ * @param id - terminal widget id.
335
+ * @param preserveFocus - set terminal focus in case true value, and don't set focus otherwise.
336
+ */
337
+ $show(id: string, preserveFocus?: boolean): void;
338
+
339
+ /**
340
+ * Hide UI panel where is located terminal widget.
341
+ * @param id - terminal widget id.
342
+ */
343
+ $hide(id: string): void;
344
+
345
+ /**
346
+ * Destroy terminal.
347
+ * @param id - terminal widget id.
348
+ */
349
+ $dispose(id: string): void;
350
+
351
+ /**
352
+ * Set the terminal widget name.
353
+ * @param id terminal widget id.
354
+ * @param name new terminal widget name.
355
+ */
356
+ $setName(id: string, name: string): void;
357
+
358
+ /**
359
+ * Send text to the terminal by id.
360
+ * @param id - terminal id.
361
+ * @param text - text content.
362
+ * @param addNewLine - in case true - add new line after the text, otherwise - don't apply new line.
363
+ */
364
+ $sendTextByTerminalId(id: number, text: string, addNewLine?: boolean): void;
365
+
366
+ /**
367
+ * Write data to the terminal by id.
368
+ * @param id - terminal id.
369
+ * @param data - data.
370
+ */
371
+ $writeByTerminalId(id: number, data: string): void;
372
+
373
+ /**
374
+ * Resize the terminal by id.
375
+ * @param id - terminal id.
376
+ * @param cols - columns.
377
+ * @param rows - rows.
378
+ */
379
+ $resizeByTerminalId(id: number, cols: number, rows: number): void;
380
+
381
+ /**
382
+ * Show terminal on the UI panel.
383
+ * @param id - terminal id.
384
+ * @param preserveFocus - set terminal focus in case true value, and don't set focus otherwise.
385
+ */
386
+ $showByTerminalId(id: number, preserveFocus?: boolean): void;
387
+
388
+ /**
389
+ * Hide UI panel where is located terminal widget.
390
+ * @param id - terminal id.
391
+ */
392
+ $hideByTerminalId(id: number): void;
393
+
394
+ /**
395
+ * Destroy terminal.
396
+ * @param id - terminal id.
397
+ * @param waitOnExit - Whether to wait for a key press before closing the terminal.
398
+ */
399
+ $disposeByTerminalId(id: number, waitOnExit?: boolean | string): void;
400
+
401
+ $setEnvironmentVariableCollection(extensionIdentifier: string, persistent: boolean, collection: SerializableEnvironmentVariableCollection | undefined): void;
402
+
403
+ /**
404
+ * Set the terminal widget name.
405
+ * @param id terminal id.
406
+ * @param name new terminal widget name.
407
+ */
408
+ $setNameByTerminalId(id: number, name: string): void;
409
+
410
+ /**
411
+ * Register a new terminal link provider.
412
+ * @param providerId id of the terminal link provider to be registered.
413
+ */
414
+ $registerTerminalLinkProvider(providerId: string): Promise<void>;
415
+
416
+ /**
417
+ * Unregister the terminal link provider with the specified id.
418
+ * @param providerId id of the terminal link provider to be unregistered.
419
+ */
420
+ $unregisterTerminalLinkProvider(providerId: string): Promise<void>;
421
+ }
422
+
423
+ export interface AutoFocus {
424
+ autoFocusFirstEntry?: boolean;
425
+ // TODO
426
+ }
427
+
428
+ export enum MainMessageType {
429
+ Error,
430
+ Warning,
431
+ Info
432
+ }
433
+
434
+ export interface MainMessageOptions {
435
+ detail?: string;
436
+ modal?: boolean
437
+ onCloseActionHandle?: number
438
+ }
439
+
440
+ export interface MainMessageItem {
441
+ title: string,
442
+ isCloseAffordance?: boolean;
443
+ handle?: number
444
+ }
445
+
446
+ export interface MessageRegistryMain {
447
+ $showMessage(type: MainMessageType, message: string, options: MainMessageOptions, actions: MainMessageItem[]): PromiseLike<number | undefined>;
448
+ }
449
+
450
+ export interface StatusBarMessageRegistryMain {
451
+ $setMessage(id: string,
452
+ name: string | undefined,
453
+ text: string | undefined,
454
+ priority: number,
455
+ alignment: theia.StatusBarAlignment,
456
+ color: string | undefined,
457
+ backgroundColor: string | undefined,
458
+ tooltip: string | theia.MarkdownString | undefined,
459
+ command: string | undefined,
460
+ accessibilityInformation: theia.AccessibilityInformation,
461
+ args: any[] | undefined): PromiseLike<void>;
462
+ $dispose(id: string): void;
463
+ }
464
+
465
+ export type Item = string | theia.QuickPickItem;
466
+
467
+ export interface QuickOpenExt {
468
+ $onItemSelected(handle: number): void;
469
+ $validateInput(input: string): Promise<string | { content: string; severity: Severity; } | null | undefined> | undefined;
470
+
471
+ $acceptOnDidAccept(sessionId: number): Promise<void>;
472
+ $acceptDidChangeValue(sessionId: number, changedValue: string): Promise<void>;
473
+ $acceptOnDidHide(sessionId: number): Promise<void>;
474
+ $acceptOnDidTriggerButton(sessionId: number, btn: QuickInputButtonHandle): Promise<void>;
475
+ $onDidTriggerItemButton(sessionId: number, itemHandle: number, buttonHandle: number): void;
476
+ $onDidChangeActive(sessionId: number, handles: number[]): void;
477
+ $onDidChangeSelection(sessionId: number, handles: number[]): void;
478
+
479
+ /* eslint-disable max-len */
480
+ showQuickPick(itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options: theia.QuickPickOptions & { canPickMany: true; },
481
+ token?: theia.CancellationToken): Promise<Array<theia.QuickPickItem> | undefined>;
482
+ showQuickPick(itemsOrItemsPromise: string[] | Promise<string[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<string | undefined>;
483
+ showQuickPick(itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<theia.QuickPickItem | undefined>;
484
+ showQuickPick(itemsOrItemsPromise: Item[] | Promise<Item[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<Item | Item[] | undefined>;
485
+
486
+ showInput(options?: theia.InputBoxOptions, token?: theia.CancellationToken): PromiseLike<string | undefined>;
487
+ // showWorkspaceFolderPick(options?: theia.WorkspaceFolderPickOptions, token?: theia.CancellationToken): Promise<theia.WorkspaceFolder | undefined>
488
+ createQuickPick<T extends theia.QuickPickItem>(plugin: Plugin): theia.QuickPick<T>;
489
+ createInputBox(plugin: Plugin): theia.InputBox;
490
+ }
491
+
492
+ /**
493
+ * Options to configure the behaviour of a file open dialog.
494
+ */
495
+ export interface OpenDialogOptionsMain {
496
+
497
+ /**
498
+ * Dialog title.
499
+ * This parameter might be ignored, as not all operating systems display a title on open dialogs.
500
+ */
501
+ title?: string;
502
+
503
+ /**
504
+ * The resource the dialog shows when opened.
505
+ */
506
+ defaultUri?: string;
507
+
508
+ /**
509
+ * A human-readable string for the open button.
510
+ */
511
+ openLabel?: string;
512
+
513
+ /**
514
+ * Allow to select files, defaults to `true`.
515
+ */
516
+ canSelectFiles?: boolean;
517
+
518
+ /**
519
+ * Allow to select folders, defaults to `false`.
520
+ */
521
+ canSelectFolders?: boolean;
522
+
523
+ /**
524
+ * Allow to select many files or folders.
525
+ */
526
+ canSelectMany?: boolean;
527
+
528
+ /**
529
+ * A set of file filters that are used by the dialog. Each entry is a human readable label,
530
+ * like "TypeScript", and an array of extensions, e.g.
531
+ * ```ts
532
+ * {
533
+ * 'Images': ['png', 'jpg']
534
+ * 'TypeScript': ['ts', 'tsx']
535
+ * }
536
+ * ```
537
+ */
538
+ filters?: { [name: string]: string[] };
539
+ }
540
+
541
+ /**
542
+ * Options to configure the behaviour of a file save dialog.
543
+ */
544
+ export interface SaveDialogOptionsMain {
545
+
546
+ /**
547
+ * Dialog title.
548
+ * This parameter might be ignored, as not all operating systems display a title on save dialogs.
549
+ */
550
+ title?: string;
551
+
552
+ /**
553
+ * The resource the dialog shows when opened.
554
+ */
555
+ defaultUri?: string;
556
+
557
+ /**
558
+ * A human-readable string for the save button.
559
+ */
560
+ saveLabel?: string;
561
+
562
+ /**
563
+ * A set of file filters that are used by the dialog. Each entry is a human readable label,
564
+ * like "TypeScript", and an array of extensions, e.g.
565
+ * ```ts
566
+ * {
567
+ * 'Images': ['png', 'jpg']
568
+ * 'TypeScript': ['ts', 'tsx']
569
+ * }
570
+ * ```
571
+ */
572
+ filters?: { [name: string]: string[] };
573
+ }
574
+
575
+ /**
576
+ * Options to configure the behaviour of a file upload dialog.
577
+ */
578
+ export interface UploadDialogOptionsMain {
579
+ /**
580
+ * The resource, where files should be uploaded.
581
+ */
582
+ defaultUri?: string;
583
+ }
584
+
585
+ export interface FileUploadResultMain {
586
+ uploaded: string[]
587
+ }
588
+
589
+ /**
590
+ * Options to configure the behaviour of the [workspace folder](#WorkspaceFolder) pick UI.
591
+ */
592
+ export interface WorkspaceFolderPickOptionsMain {
593
+ /**
594
+ * An optional string to show as place holder in the input box to guide the user what to pick on.
595
+ */
596
+ placeHolder?: string;
597
+
598
+ /**
599
+ * Set to `true` to keep the picker open when focus moves to another part of the editor or to another window.
600
+ */
601
+ ignoreFocusOut?: boolean;
602
+ }
603
+
604
+ export type TransferQuickPickItems = TransferQuickPickItemValue | TransferQuickPickSeparator;
605
+
606
+ export interface TransferQuickPickItemValue extends theia.QuickPickItem {
607
+ handle: number;
608
+ type?: 'item'
609
+ }
610
+
611
+ export interface TransferQuickPickSeparator extends theia.QuickPickItem {
612
+ handle: number;
613
+ type: 'separator';
614
+ }
615
+
616
+ export interface TransferQuickInputButton extends theia.QuickInputButton {
617
+ iconPath: theia.Uri | { light: theia.Uri, dark: theia.Uri } | ThemeIcon;
618
+ iconClass?: string;
619
+ handle?: number;
620
+ }
621
+
622
+ export type TransferQuickInput = TransferQuickPick | TransferInputBox;
623
+
624
+ export interface BaseTransferQuickInput {
625
+ [key: string]: any;
626
+ id: number;
627
+ type?: 'quickPick' | 'inputBox';
628
+ enabled?: boolean;
629
+ busy?: boolean;
630
+ visible?: boolean;
631
+ }
632
+
633
+ export interface TransferQuickPick extends BaseTransferQuickInput {
634
+ type?: 'quickPick';
635
+ value?: string;
636
+ placeholder?: string;
637
+ buttons?: TransferQuickInputButton[];
638
+ items?: TransferQuickPickItems[];
639
+ activeItems?: ReadonlyArray<theia.QuickPickItem>;
640
+ selectedItems?: ReadonlyArray<theia.QuickPickItem>;
641
+ canSelectMany?: boolean;
642
+ ignoreFocusOut?: boolean;
643
+ matchOnDescription?: boolean;
644
+ matchOnDetail?: boolean;
645
+ sortByLabel?: boolean;
646
+ }
647
+
648
+ export interface TransferInputBox extends BaseTransferQuickInput {
649
+ type?: 'inputBox';
650
+ value?: string;
651
+ placeholder?: string;
652
+ password?: boolean;
653
+ buttons?: TransferQuickInputButton[];
654
+ prompt?: string;
655
+ validationMessage?: string;
656
+ }
657
+
658
+ export interface IInputBoxOptions {
659
+ value?: string;
660
+ valueSelection?: [number, number];
661
+ prompt?: string;
662
+ placeHolder?: string;
663
+ password?: boolean;
664
+ ignoreFocusOut?: boolean;
665
+ }
666
+
667
+ export interface QuickOpenMain {
668
+ $show(instance: number, options: PickOptions<TransferQuickPickItemValue>, token: CancellationToken): Promise<number | number[] | undefined>;
669
+ $setItems(instance: number, items: TransferQuickPickItems[]): Promise<any>;
670
+ $setError(instance: number, error: Error): Promise<void>;
671
+ $input(options: theia.InputBoxOptions, validateInput: boolean, token: CancellationToken): Promise<string | undefined>;
672
+ $createOrUpdate<T extends theia.QuickPickItem>(params: TransferQuickInput): Promise<void>;
673
+ $dispose(id: number): Promise<void>;
674
+
675
+ $hide(): void;
676
+ $showInputBox(options: TransferInputBox, validateInput: boolean): Promise<string | undefined>;
677
+ }
678
+
679
+ export interface WorkspaceMain {
680
+ $pickWorkspaceFolder(options: WorkspaceFolderPickOptionsMain): Promise<theia.WorkspaceFolder | undefined>;
681
+ $startFileSearch(includePattern: string, includeFolder: string | undefined, excludePatternOrDisregardExcludes: string | false,
682
+ maxResults: number | undefined, token: theia.CancellationToken): PromiseLike<UriComponents[]>;
683
+ $findTextInFiles(query: theia.TextSearchQuery, options: theia.FindTextInFilesOptions, searchRequestId: number,
684
+ token?: theia.CancellationToken): Promise<theia.TextSearchComplete>
685
+ $registerTextDocumentContentProvider(scheme: string): Promise<void>;
686
+ $unregisterTextDocumentContentProvider(scheme: string): void;
687
+ $onTextDocumentContentChange(uri: string, content: string): void;
688
+ $updateWorkspaceFolders(start: number, deleteCount?: number, ...rootsToAdd: string[]): Promise<void>;
689
+ $getWorkspace(): Promise<files.FileStat | undefined>;
690
+ $requestWorkspaceTrust(options?: theia.WorkspaceTrustRequestOptions): Promise<boolean | undefined>;
691
+ }
692
+
693
+ export interface WorkspaceExt {
694
+ $onWorkspaceFoldersChanged(event: WorkspaceRootsChangeEvent): void;
695
+ $onWorkspaceLocationChanged(event: files.FileStat | undefined): void;
696
+ $provideTextDocumentContent(uri: string): Promise<string | undefined | null>;
697
+ $onTextSearchResult(searchRequestId: number, done: boolean, result?: SearchInWorkspaceResult): void;
698
+ $onWorkspaceTrustChanged(trust: boolean | undefined): void;
699
+ }
700
+
701
+ export interface TimelineExt {
702
+ $getTimeline(source: string, uri: UriComponents, options: theia.TimelineOptions, internalOptions?: InternalTimelineOptions): Promise<Timeline | undefined>;
703
+ }
704
+
705
+ export interface TimelineMain {
706
+ $registerTimelineProvider(provider: TimelineProviderDescriptor): Promise<void>;
707
+ $fireTimelineChanged(e: TimelineChangeEvent): Promise<void>;
708
+ $unregisterTimelineProvider(source: string): Promise<void>;
709
+ }
710
+
711
+ export interface ThemingExt {
712
+ $onColorThemeChange(type: ThemeType): void;
713
+ }
714
+ export interface ThemingMain extends Disposable {
715
+ }
716
+
717
+ export interface DialogsMain {
718
+ $showOpenDialog(options: OpenDialogOptionsMain): Promise<string[] | undefined>;
719
+ $showSaveDialog(options: SaveDialogOptionsMain): Promise<string | undefined>;
720
+ $showUploadDialog(options: UploadDialogOptionsMain): Promise<string[] | undefined>;
721
+ }
722
+
723
+ export interface RegisterTreeDataProviderOptions {
724
+ canSelectMany?: boolean
725
+ dragMimeTypes?: string[]
726
+ dropMimeTypes?: string[]
727
+ }
728
+
729
+ export interface TreeViewRevealOptions {
730
+ select: boolean
731
+ focus: boolean
732
+ expand: boolean | number
733
+ }
734
+
735
+ export interface TreeViewsMain {
736
+ $registerTreeDataProvider(treeViewId: string, options?: RegisterTreeDataProviderOptions): void;
737
+ $readDroppedFile(contentId: string): Promise<BinaryBuffer>;
738
+ $unregisterTreeDataProvider(treeViewId: string): void;
739
+ $refresh(treeViewId: string): Promise<void>;
740
+ $reveal(treeViewId: string, elementParentChain: string[], options: TreeViewRevealOptions): Promise<any>;
741
+ $setMessage(treeViewId: string, message: string): void;
742
+ $setTitle(treeViewId: string, title: string): void;
743
+ $setDescription(treeViewId: string, description: string): void;
744
+ }
745
+ export class DataTransferFileDTO {
746
+ constructor(readonly name: string, readonly contentId: string, readonly uri?: UriComponents) { }
747
+
748
+ static is(value: string | DataTransferFileDTO): value is DataTransferFileDTO {
749
+ return !(typeof value === 'string');
750
+ }
751
+ }
752
+
753
+ export interface TreeViewsExt {
754
+ $dragStarted(treeViewId: string, treeItemIds: string[], token: CancellationToken): Promise<UriComponents[] | undefined>;
755
+ $drop(treeViewId: string, treeItemId: string | undefined, dataTransferItems: [string, string | DataTransferFileDTO][], token: CancellationToken): Promise<void>;
756
+ $getChildren(treeViewId: string, treeItemId: string | undefined): Promise<TreeViewItem[] | undefined>;
757
+ $hasResolveTreeItem(treeViewId: string): Promise<boolean>;
758
+ $resolveTreeItem(treeViewId: string, treeItemId: string, token: CancellationToken): Promise<TreeViewItem | undefined>;
759
+ $setExpanded(treeViewId: string, treeItemId: string, expanded: boolean): Promise<any>;
760
+ $setSelection(treeViewId: string, treeItemIds: string[]): Promise<void>;
761
+ $setVisible(treeViewId: string, visible: boolean): Promise<void>;
762
+ }
763
+
764
+ export interface TreeViewItem {
765
+
766
+ id: string;
767
+
768
+ label: string;
769
+ /** Label highlights given as tuples of inclusive start index and exclusive end index. */
770
+ highlights?: [number, number][];
771
+
772
+ description?: string | boolean;
773
+
774
+ /* font-awesome icon for compatibility */
775
+ icon?: string;
776
+ iconUrl?: IconUrl;
777
+
778
+ themeIcon?: ThemeIcon;
779
+
780
+ resourceUri?: UriComponents;
781
+
782
+ tooltip?: string | MarkdownString;
783
+
784
+ collapsibleState?: TreeViewItemCollapsibleState;
785
+
786
+ contextValue?: string;
787
+
788
+ command?: Command;
789
+
790
+ accessibilityInformation?: theia.AccessibilityInformation;
791
+
792
+ }
793
+
794
+ export interface TreeViewItemReference {
795
+ viewId: string
796
+ itemId: string
797
+ }
798
+ export namespace TreeViewItemReference {
799
+ export function is(arg: unknown): arg is TreeViewItemReference {
800
+ return isObject(arg) && isString(arg.viewId) && isString(arg.itemId);
801
+ }
802
+ }
803
+
804
+ /**
805
+ * Collapsible state of the tree item
806
+ */
807
+ export enum TreeViewItemCollapsibleState {
808
+ /**
809
+ * Determines an item can be neither collapsed nor expanded. Implies it has no children.
810
+ */
811
+ None = 0,
812
+ /**
813
+ * Determines an item is collapsed
814
+ */
815
+ Collapsed = 1,
816
+ /**
817
+ * Determines an item is expanded
818
+ */
819
+ Expanded = 2
820
+ }
821
+
822
+ export interface WindowMain {
823
+ $openUri(uri: UriComponents): Promise<boolean>;
824
+ $asExternalUri(uri: UriComponents): Promise<UriComponents>;
825
+ }
826
+
827
+ export interface WindowStateExt {
828
+ $onWindowStateChanged(focus: boolean): void;
829
+ }
830
+
831
+ export interface NotificationExt {
832
+ withProgress<R>(
833
+ options: ProgressOptions,
834
+ task: (progress: Progress<{ message?: string; increment?: number }>, token: CancellationToken) => PromiseLike<R>
835
+ ): PromiseLike<R>;
836
+ $acceptProgressCanceled(progressId: string): void;
837
+ }
838
+
839
+ export interface ScmCommandArg {
840
+ sourceControlHandle: number
841
+ resourceGroupHandle?: number
842
+ resourceStateHandle?: number
843
+ }
844
+ export namespace ScmCommandArg {
845
+ export function is(arg: unknown): arg is ScmCommandArg {
846
+ return isObject(arg) && 'sourceControlHandle' in arg;
847
+ }
848
+ }
849
+
850
+ export interface ScmExt {
851
+ createSourceControl(plugin: Plugin, id: string, label: string, rootUri?: theia.Uri): theia.SourceControl;
852
+ getLastInputBox(plugin: Plugin): theia.SourceControlInputBox | undefined;
853
+ $onInputBoxValueChange(sourceControlHandle: number, message: string): Promise<void>;
854
+ $executeResourceCommand(sourceControlHandle: number, groupHandle: number, resourceHandle: number): Promise<void>;
855
+ $validateInput(sourceControlHandle: number, value: string, cursorPosition: number): Promise<[string, number] | undefined>;
856
+ $setSelectedSourceControl(selectedSourceControlHandle: number | undefined): Promise<void>;
857
+ $provideOriginalResource(sourceControlHandle: number, uri: string, token: theia.CancellationToken): Promise<UriComponents | undefined>;
858
+ }
859
+
860
+ export namespace TimelineCommandArg {
861
+ export function is(arg: unknown): arg is TimelineCommandArg {
862
+ return isObject(arg) && 'timelineHandle' in arg;
863
+ }
864
+ }
865
+ export interface TimelineCommandArg {
866
+ timelineHandle: string;
867
+ source: string;
868
+ uri: string;
869
+ }
870
+
871
+ export interface DecorationRequest {
872
+ readonly id: number;
873
+ readonly uri: UriComponents;
874
+ }
875
+
876
+ export type DecorationData = [boolean, string, string, ThemeColor];
877
+ export interface DecorationReply { [id: number]: DecorationData; }
878
+
879
+ export namespace CommentsCommandArg {
880
+ export function is(arg: unknown): arg is CommentsCommandArg {
881
+ return isObject(arg) && 'commentControlHandle' in arg && 'commentThreadHandle' in arg && 'text' in arg && !('commentUniqueId' in arg);
882
+ }
883
+ }
884
+ export interface CommentsCommandArg {
885
+ commentControlHandle: number;
886
+ commentThreadHandle: number;
887
+ text: string
888
+ }
889
+
890
+ export namespace CommentsContextCommandArg {
891
+ export function is(arg: unknown): arg is CommentsContextCommandArg {
892
+ return isObject(arg) && 'commentControlHandle' in arg && 'commentThreadHandle' in arg && 'commentUniqueId' in arg && !('text' in arg);
893
+ }
894
+ }
895
+ export interface CommentsContextCommandArg {
896
+ commentControlHandle: number;
897
+ commentThreadHandle: number;
898
+ commentUniqueId: number
899
+ }
900
+
901
+ export namespace CommentsEditCommandArg {
902
+ export function is(arg: unknown): arg is CommentsEditCommandArg {
903
+ return isObject(arg) && 'commentControlHandle' in arg && 'commentThreadHandle' in arg && 'commentUniqueId' in arg && 'text' in arg;
904
+ }
905
+ }
906
+ export interface CommentsEditCommandArg {
907
+ commentControlHandle: number;
908
+ commentThreadHandle: number;
909
+ commentUniqueId: number
910
+ text: string
911
+ }
912
+
913
+ export interface DecorationsExt {
914
+ registerFileDecorationProvider(provider: theia.FileDecorationProvider, pluginInfo: PluginInfo): theia.Disposable
915
+ $provideDecorations(handle: number, requests: DecorationRequest[], token: CancellationToken): Promise<DecorationReply>;
916
+ }
917
+
918
+ export interface DecorationsMain {
919
+ $registerDecorationProvider(handle: number): Promise<void>;
920
+ $unregisterDecorationProvider(handle: number): void;
921
+ $onDidChange(handle: number, resources: UriComponents[] | null): void;
922
+ }
923
+
924
+ export interface ScmMain {
925
+ $registerSourceControl(sourceControlHandle: number, id: string, label: string, rootUri?: UriComponents): Promise<void>;
926
+ $updateSourceControl(sourceControlHandle: number, features: SourceControlProviderFeatures): Promise<void>;
927
+ $unregisterSourceControl(sourceControlHandle: number): Promise<void>;
928
+
929
+ $registerGroups(sourceControlHandle: number, groups: ScmRawResourceGroup[], splices: ScmRawResourceSplices[]): void;
930
+ $updateGroup(sourceControlHandle: number, groupHandle: number, features: SourceControlGroupFeatures): void;
931
+ $updateGroupLabel(sourceControlHandle: number, groupHandle: number, label: string): void;
932
+ $unregisterGroup(sourceControlHandle: number, groupHandle: number): void;
933
+
934
+ $spliceResourceStates(sourceControlHandle: number, splices: ScmRawResourceSplices[]): void;
935
+
936
+ $setInputBoxValue(sourceControlHandle: number, value: string): void;
937
+ $setInputBoxPlaceholder(sourceControlHandle: number, placeholder: string): void;
938
+ $setInputBoxVisible(sourceControlHandle: number, visible: boolean): void;
939
+ $setInputBoxEnabled(sourceControlHandle: number, enabled: boolean): void;
940
+ }
941
+
942
+ export interface SourceControlProviderFeatures {
943
+ hasQuickDiffProvider?: boolean;
944
+ count?: number;
945
+ commitTemplate?: string;
946
+ acceptInputCommand?: Command;
947
+ statusBarCommands?: Command[];
948
+ }
949
+
950
+ export interface SourceControlGroupFeatures {
951
+ hideWhenEmpty: boolean | undefined;
952
+ }
953
+
954
+ export interface ScmRawResource {
955
+ handle: number,
956
+ sourceUri: UriComponents,
957
+ icons: UriComponents[],
958
+ tooltip: string,
959
+ strikeThrough: boolean,
960
+ faded: boolean,
961
+ contextValue: string,
962
+ command: Command | undefined
963
+ }
964
+
965
+ export interface ScmRawResourceGroup {
966
+ handle: number,
967
+ id: string,
968
+ label: string,
969
+ features: SourceControlGroupFeatures
970
+ }
971
+
972
+ export interface ScmRawResourceSplice {
973
+ start: number,
974
+ deleteCount: number,
975
+ rawResources: ScmRawResource[]
976
+ }
977
+
978
+ export interface ScmRawResourceSplices {
979
+ handle: number,
980
+ splices: ScmRawResourceSplice[]
981
+ }
982
+
983
+ export interface SourceControlResourceState {
984
+ readonly handle: number
985
+ /**
986
+ * The uri of the underlying resource inside the workspace.
987
+ */
988
+ readonly resourceUri: string;
989
+
990
+ /**
991
+ * The command which should be run when the resource
992
+ * state is open in the Source Control viewlet.
993
+ */
994
+ readonly command?: Command;
995
+
996
+ /**
997
+ * The decorations for this source control
998
+ * resource state.
999
+ */
1000
+ readonly decorations?: SourceControlResourceDecorations;
1001
+
1002
+ readonly letter?: string;
1003
+
1004
+ readonly colorId?: string
1005
+ }
1006
+
1007
+ /**
1008
+ * The decorations for a [source control resource state](#SourceControlResourceState).
1009
+ * Can be independently specified for light and dark themes.
1010
+ */
1011
+ export interface SourceControlResourceDecorations {
1012
+
1013
+ /**
1014
+ * Whether the source control resource state should be striked-through in the UI.
1015
+ */
1016
+ readonly strikeThrough?: boolean;
1017
+
1018
+ /**
1019
+ * Whether the source control resource state should be faded in the UI.
1020
+ */
1021
+ readonly faded?: boolean;
1022
+
1023
+ /**
1024
+ * The title for a specific source control resource state.
1025
+ */
1026
+ readonly tooltip?: string;
1027
+
1028
+ /**
1029
+ * The icon path for a specific source control resource state.
1030
+ */
1031
+ readonly iconPath?: string;
1032
+ }
1033
+
1034
+ export interface NotificationMain {
1035
+ $startProgress(options: NotificationMain.StartProgressOptions): Promise<string>;
1036
+ $stopProgress(id: string): void;
1037
+ $updateProgress(id: string, report: NotificationMain.ProgressReport): void;
1038
+ }
1039
+ export namespace NotificationMain {
1040
+ export interface StartProgressOptions {
1041
+ title: string;
1042
+ location?: string;
1043
+ cancellable?: boolean;
1044
+ }
1045
+ export interface ProgressReport {
1046
+ message?: string;
1047
+ increment?: number;
1048
+ total?: number;
1049
+ }
1050
+ }
1051
+
1052
+ export enum EditorPosition {
1053
+ ONE = 0,
1054
+ TWO = 1,
1055
+ THREE = 2,
1056
+ FOUR = 3,
1057
+ FIVE = 4,
1058
+ SIX = 5,
1059
+ SEVEN = 6,
1060
+ EIGHT = 7,
1061
+ NINE = 8
1062
+ }
1063
+
1064
+ export interface Position {
1065
+ readonly lineNumber: number;
1066
+ readonly column: number;
1067
+ }
1068
+
1069
+ export interface Selection {
1070
+ /**
1071
+ * The line number on which the selection has started.
1072
+ */
1073
+ readonly selectionStartLineNumber: number;
1074
+ /**
1075
+ * The column on `selectionStartLineNumber` where the selection has started.
1076
+ */
1077
+ readonly selectionStartColumn: number;
1078
+ /**
1079
+ * The line number on which the selection has ended.
1080
+ */
1081
+ readonly positionLineNumber: number;
1082
+ /**
1083
+ * The column on `positionLineNumber` where the selection has ended.
1084
+ */
1085
+ readonly positionColumn: number;
1086
+ }
1087
+
1088
+ export interface TextEditorConfiguration {
1089
+ tabSize: number;
1090
+ insertSpaces: boolean;
1091
+ cursorStyle: TextEditorCursorStyle;
1092
+ lineNumbers: TextEditorLineNumbersStyle;
1093
+ }
1094
+
1095
+ export interface TextEditorConfigurationUpdate {
1096
+ tabSize?: number | 'auto';
1097
+ insertSpaces?: boolean | 'auto';
1098
+ cursorStyle?: TextEditorCursorStyle;
1099
+ lineNumbers?: TextEditorLineNumbersStyle;
1100
+ }
1101
+
1102
+ export enum TextEditorRevealType {
1103
+ Default = 0,
1104
+ InCenter = 1,
1105
+ InCenterIfOutsideViewport = 2,
1106
+ AtTop = 3
1107
+ }
1108
+
1109
+ export interface SelectionChangeEvent {
1110
+ selections: Selection[];
1111
+ source?: string;
1112
+ }
1113
+
1114
+ export interface EditorChangedPropertiesData {
1115
+ options?: TextEditorConfiguration;
1116
+ selections?: SelectionChangeEvent;
1117
+ visibleRanges?: Range[];
1118
+ }
1119
+
1120
+ export interface TextEditorPositionData {
1121
+ [id: string]: EditorPosition;
1122
+ }
1123
+
1124
+ export interface TextEditorsExt {
1125
+ $acceptEditorPropertiesChanged(id: string, props: EditorChangedPropertiesData): void;
1126
+ $acceptEditorPositionData(data: TextEditorPositionData): void;
1127
+ }
1128
+
1129
+ export interface SingleEditOperation {
1130
+ range?: Range;
1131
+ text?: string;
1132
+ forceMoveMarkers?: boolean;
1133
+ }
1134
+
1135
+ export interface UndoStopOptions {
1136
+ undoStopBefore: boolean;
1137
+ undoStopAfter: boolean;
1138
+ }
1139
+
1140
+ export interface ApplyEditsOptions extends UndoStopOptions {
1141
+ setEndOfLine: EndOfLine;
1142
+ }
1143
+
1144
+ export interface ThemeColor {
1145
+ id: string;
1146
+ }
1147
+
1148
+ export interface ThemeIcon {
1149
+ id: string;
1150
+ color?: ThemeColor;
1151
+ }
1152
+
1153
+ /**
1154
+ * Describes the behavior of decorations when typing/editing near their edges.
1155
+ */
1156
+ export enum TrackedRangeStickiness {
1157
+ AlwaysGrowsWhenTypingAtEdges = 0,
1158
+ NeverGrowsWhenTypingAtEdges = 1,
1159
+ GrowsOnlyWhenTypingBefore = 2,
1160
+ GrowsOnlyWhenTypingAfter = 3,
1161
+ }
1162
+ export interface ContentDecorationRenderOptions {
1163
+ contentText?: string;
1164
+ contentIconPath?: UriComponents;
1165
+
1166
+ border?: string;
1167
+ borderColor?: string | ThemeColor;
1168
+ fontStyle?: string;
1169
+ fontWeight?: string;
1170
+ textDecoration?: string;
1171
+ color?: string | ThemeColor;
1172
+ backgroundColor?: string | ThemeColor;
1173
+
1174
+ margin?: string;
1175
+ width?: string;
1176
+ height?: string;
1177
+ }
1178
+
1179
+ export interface ThemeDecorationRenderOptions {
1180
+ backgroundColor?: string | ThemeColor;
1181
+
1182
+ outline?: string;
1183
+ outlineColor?: string | ThemeColor;
1184
+ outlineStyle?: string;
1185
+ outlineWidth?: string;
1186
+
1187
+ border?: string;
1188
+ borderColor?: string | ThemeColor;
1189
+ borderRadius?: string;
1190
+ borderSpacing?: string;
1191
+ borderStyle?: string;
1192
+ borderWidth?: string;
1193
+
1194
+ fontStyle?: string;
1195
+ fontWeight?: string;
1196
+ textDecoration?: string;
1197
+ cursor?: string;
1198
+ color?: string | ThemeColor;
1199
+ opacity?: string;
1200
+ letterSpacing?: string;
1201
+
1202
+ gutterIconPath?: UriComponents;
1203
+ gutterIconSize?: string;
1204
+
1205
+ overviewRulerColor?: string | ThemeColor;
1206
+
1207
+ before?: ContentDecorationRenderOptions;
1208
+ after?: ContentDecorationRenderOptions;
1209
+ }
1210
+
1211
+ export interface DecorationRenderOptions extends ThemeDecorationRenderOptions {
1212
+ isWholeLine?: boolean;
1213
+ rangeBehavior?: TrackedRangeStickiness;
1214
+ overviewRulerLane?: OverviewRulerLane;
1215
+
1216
+ light?: ThemeDecorationRenderOptions;
1217
+ dark?: ThemeDecorationRenderOptions;
1218
+ }
1219
+
1220
+ export interface ThemeDecorationInstanceRenderOptions {
1221
+ before?: ContentDecorationRenderOptions;
1222
+ after?: ContentDecorationRenderOptions;
1223
+ }
1224
+
1225
+ export interface DecorationInstanceRenderOptions extends ThemeDecorationInstanceRenderOptions {
1226
+ light?: ThemeDecorationInstanceRenderOptions;
1227
+ dark?: ThemeDecorationInstanceRenderOptions;
1228
+ }
1229
+
1230
+ export interface DecorationOptions {
1231
+ range: Range;
1232
+ hoverMessage?: MarkdownString | MarkdownString[];
1233
+ renderOptions?: DecorationInstanceRenderOptions;
1234
+ }
1235
+
1236
+ export interface TextEditorsMain {
1237
+ $tryShowTextDocument(uri: UriComponents, options?: TextDocumentShowOptions): Promise<void>;
1238
+ $registerTextEditorDecorationType(key: string, options: DecorationRenderOptions): void;
1239
+ $removeTextEditorDecorationType(key: string): void;
1240
+ $tryHideEditor(id: string): Promise<void>;
1241
+ $trySetOptions(id: string, options: TextEditorConfigurationUpdate): Promise<void>;
1242
+ $trySetDecorations(id: string, key: string, ranges: DecorationOptions[]): Promise<void>;
1243
+ $trySetDecorationsFast(id: string, key: string, ranges: number[]): Promise<void>;
1244
+ $tryRevealRange(id: string, range: Range, revealType: TextEditorRevealType): Promise<void>;
1245
+ $trySetSelections(id: string, selections: Selection[]): Promise<void>;
1246
+ $tryApplyEdits(id: string, modelVersionId: number, edits: SingleEditOperation[], opts: ApplyEditsOptions): Promise<boolean>;
1247
+ $tryApplyWorkspaceEdit(workspaceEditDto: WorkspaceEditDto): Promise<boolean>;
1248
+ $tryInsertSnippet(id: string, template: string, selections: Range[], opts: UndoStopOptions): Promise<boolean>;
1249
+ $saveAll(includeUntitled?: boolean): Promise<boolean>;
1250
+ // $getDiffInformation(id: string): Promise<editorCommon.ILineChange[]>;
1251
+ }
1252
+
1253
+ export interface ModelAddedData {
1254
+ uri: UriComponents;
1255
+ versionId: number;
1256
+ lines: string[];
1257
+ EOL: string;
1258
+ modeId: string;
1259
+ isDirty: boolean;
1260
+ }
1261
+
1262
+ export interface TextEditorAddData {
1263
+ id: string;
1264
+ documentUri: UriComponents;
1265
+ options: TextEditorConfiguration;
1266
+ selections: Selection[];
1267
+ visibleRanges: Range[];
1268
+ editorPosition?: EditorPosition;
1269
+ }
1270
+
1271
+ export interface EditorsAndDocumentsDelta {
1272
+ removedDocuments?: UriComponents[];
1273
+ addedDocuments?: ModelAddedData[];
1274
+ removedEditors?: string[];
1275
+ addedEditors?: TextEditorAddData[];
1276
+ /**
1277
+ * undefined means no changes
1278
+ * null means no active
1279
+ * string means id of active
1280
+ */
1281
+ newActiveEditor?: string | null;
1282
+ }
1283
+
1284
+ export interface EditorsAndDocumentsExt {
1285
+ $acceptEditorsAndDocumentsDelta(delta: EditorsAndDocumentsDelta): void;
1286
+ }
1287
+
1288
+ export interface ModelContentChange {
1289
+ readonly range: Range;
1290
+ readonly rangeOffset: number;
1291
+ readonly rangeLength: number;
1292
+ readonly text: string;
1293
+ }
1294
+ export interface ModelChangedEvent {
1295
+ readonly changes: ModelContentChange[];
1296
+
1297
+ readonly eol: string;
1298
+
1299
+ readonly versionId: number;
1300
+
1301
+ readonly reason: TextDocumentChangeReason | undefined;
1302
+ }
1303
+
1304
+ export interface DocumentsExt {
1305
+ $acceptModelModeChanged(startUrl: UriComponents, oldModeId: string, newModeId: string): void;
1306
+ $acceptModelSaved(strUrl: UriComponents): void;
1307
+ $acceptModelWillSave(strUrl: UriComponents, reason: theia.TextDocumentSaveReason, saveTimeout: number): Promise<SingleEditOperation[]>;
1308
+ $acceptDirtyStateChanged(strUrl: UriComponents, isDirty: boolean): void;
1309
+ $acceptModelChanged(strUrl: UriComponents, e: ModelChangedEvent, isDirty: boolean): void;
1310
+ }
1311
+
1312
+ export interface DocumentsMain {
1313
+ $tryCreateDocument(options?: { language?: string; content?: string; }): Promise<UriComponents>;
1314
+ $tryShowDocument(uri: UriComponents, options?: TextDocumentShowOptions): Promise<void>;
1315
+ $tryOpenDocument(uri: UriComponents): Promise<boolean>;
1316
+ $trySaveDocument(uri: UriComponents): Promise<boolean>;
1317
+ $tryCloseDocument(uri: UriComponents): Promise<boolean>;
1318
+ }
1319
+
1320
+ export interface EnvMain {
1321
+ $getEnvVariable(envVarName: string): Promise<string | undefined>;
1322
+ $getClientOperatingSystem(): Promise<theia.OperatingSystem>;
1323
+ }
1324
+
1325
+ export interface PreferenceRegistryMain {
1326
+ $updateConfigurationOption(
1327
+ target: boolean | ConfigurationTarget | undefined,
1328
+ key: string,
1329
+ value: any,
1330
+ resource?: string,
1331
+ withLanguageOverride?: boolean
1332
+ ): PromiseLike<void>;
1333
+ $removeConfigurationOption(
1334
+ target: boolean | ConfigurationTarget | undefined,
1335
+ key: string,
1336
+ resource?: string,
1337
+ withLanguageOverride?: boolean,
1338
+ ): PromiseLike<void>;
1339
+ }
1340
+
1341
+ export interface PreferenceChangeExt {
1342
+ preferenceName: string,
1343
+ newValue: any,
1344
+ /**
1345
+ * The URI the folder affected, or undefined if User scope.
1346
+ */
1347
+ scope?: string;
1348
+ }
1349
+
1350
+ export interface TerminalOptionsExt {
1351
+ attributes?: {
1352
+ [key: string]: string;
1353
+ }
1354
+ }
1355
+
1356
+ export interface PreferenceRegistryExt {
1357
+ $acceptConfigurationChanged(data: { [key: string]: any }, eventData: PreferenceChangeExt[]): void;
1358
+ }
1359
+
1360
+ export interface OutputChannelRegistryMain {
1361
+ $append(channelName: string, value: string, pluginInfo: PluginInfo): PromiseLike<void>;
1362
+ $clear(channelName: string): PromiseLike<void>;
1363
+ $dispose(channelName: string): PromiseLike<void>;
1364
+ $reveal(channelName: string, preserveFocus: boolean): PromiseLike<void>;
1365
+ $close(channelName: string): PromiseLike<void>;
1366
+ }
1367
+
1368
+ export type CharacterPair = [string, string];
1369
+
1370
+ export interface CommentRule {
1371
+ lineComment?: string;
1372
+ blockComment?: CharacterPair;
1373
+ }
1374
+
1375
+ export interface SerializedRegExp {
1376
+ pattern: string;
1377
+ flags?: string;
1378
+ }
1379
+
1380
+ export interface SerializedIndentationRule {
1381
+ decreaseIndentPattern?: SerializedRegExp;
1382
+ increaseIndentPattern?: SerializedRegExp;
1383
+ indentNextLinePattern?: SerializedRegExp;
1384
+ unIndentedLinePattern?: SerializedRegExp;
1385
+ }
1386
+
1387
+ export interface SerializedOnEnterRule {
1388
+ beforeText: SerializedRegExp;
1389
+ afterText?: SerializedRegExp;
1390
+ previousLineText?: SerializedRegExp;
1391
+ action: SerializedEnterAction;
1392
+ }
1393
+
1394
+ export interface SerializedEnterAction {
1395
+ indentAction: IndentAction;
1396
+ outdentCurrentLine?: boolean;
1397
+ appendText?: string;
1398
+ removeText?: number;
1399
+ }
1400
+
1401
+ export interface SerializedLanguageConfiguration {
1402
+ comments?: CommentRule;
1403
+ brackets?: CharacterPair[];
1404
+ wordPattern?: SerializedRegExp;
1405
+ indentationRules?: SerializedIndentationRule;
1406
+ onEnterRules?: SerializedOnEnterRule[];
1407
+ }
1408
+
1409
+ export interface CodeActionDto {
1410
+ title: string;
1411
+ edit?: WorkspaceEditDto;
1412
+ diagnostics?: MarkerData[];
1413
+ command?: Command;
1414
+ kind?: string;
1415
+ isPreferred?: boolean;
1416
+ disabled?: string;
1417
+ }
1418
+
1419
+ export interface WorkspaceEditMetadataDto {
1420
+ needsConfirmation: boolean;
1421
+ label: string;
1422
+ description?: string;
1423
+ iconPath?: {
1424
+ id: string;
1425
+ } | {
1426
+ light: UriComponents;
1427
+ dark: UriComponents;
1428
+ } | ThemeIcon;
1429
+ }
1430
+
1431
+ export interface WorkspaceFileEditDto {
1432
+ oldResource?: UriComponents;
1433
+ newResource?: UriComponents;
1434
+ options?: FileOperationOptions;
1435
+ metadata?: WorkspaceEditMetadataDto;
1436
+ }
1437
+
1438
+ export interface WorkspaceTextEditDto {
1439
+ resource: UriComponents;
1440
+ modelVersionId?: number;
1441
+ textEdit: TextEdit & { insertAsSnippet?: boolean };
1442
+ metadata?: WorkspaceEditMetadataDto;
1443
+ }
1444
+ export namespace WorkspaceTextEditDto {
1445
+ export function is(arg: WorkspaceTextEditDto | WorkspaceFileEditDto): arg is WorkspaceTextEditDto {
1446
+ return !!arg
1447
+ && 'resource' in arg
1448
+ && 'textEdit' in arg
1449
+ && arg.textEdit !== null
1450
+ && typeof arg.textEdit === 'object';
1451
+ }
1452
+ }
1453
+
1454
+ export interface WorkspaceEditDto {
1455
+ edits: Array<WorkspaceTextEditDto | WorkspaceFileEditDto>;
1456
+ }
1457
+
1458
+ export interface CommandProperties {
1459
+ command: string;
1460
+ args?: string[];
1461
+ options?: {
1462
+ cwd?: string;
1463
+ [key: string]: any
1464
+ };
1465
+ }
1466
+
1467
+ export type TaskGroupKind = 'build' | 'test' | 'rebuild' | 'clean';
1468
+ export interface TaskDto {
1469
+ type: string;
1470
+ taskType?: 'shell' | 'process' | 'customExecution'; // the task execution type
1471
+ executionId?: string,
1472
+ label: string;
1473
+ source?: string;
1474
+ scope: string | number;
1475
+ // Provide a more specific type when necessary (see ProblemMatcherContribution)
1476
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1477
+ problemMatcher?: any;
1478
+ group?: {
1479
+ kind: TaskGroupKind;
1480
+ isDefault: boolean;
1481
+ }
1482
+ detail?: string;
1483
+ presentation?: TaskPresentationOptionsDTO;
1484
+ runOptions?: RunOptionsDTO;
1485
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1486
+ [key: string]: any;
1487
+ }
1488
+
1489
+ export interface RunOptionsDTO {
1490
+ reevaluateOnRerun?: boolean;
1491
+ }
1492
+
1493
+ export interface TaskPresentationOptionsDTO {
1494
+ reveal?: number;
1495
+ focus?: boolean;
1496
+ echo?: boolean;
1497
+ panel?: number;
1498
+ showReuseMessage?: boolean;
1499
+ clear?: boolean;
1500
+ }
1501
+
1502
+ export interface TaskExecutionDto {
1503
+ id: number;
1504
+ task: TaskDto;
1505
+ }
1506
+
1507
+ export interface ProcessTaskDto extends TaskDto, CommandProperties {
1508
+ windows?: CommandProperties;
1509
+ }
1510
+
1511
+ export interface PluginInfo {
1512
+ id: string;
1513
+ name: string;
1514
+ displayName?: string;
1515
+ }
1516
+
1517
+ export interface LanguageStatus {
1518
+ readonly id: string;
1519
+ readonly name: string;
1520
+ readonly selector: SerializedDocumentFilter[];
1521
+ readonly severity: Severity;
1522
+ readonly label: string;
1523
+ readonly detail: string;
1524
+ readonly busy: boolean;
1525
+ readonly source: string;
1526
+ readonly command: Command | undefined;
1527
+ readonly accessibilityInfo: theia.AccessibilityInformation | undefined;
1528
+ }
1529
+
1530
+ export interface LanguagesExt {
1531
+ $provideCompletionItems(handle: number, resource: UriComponents, position: Position,
1532
+ context: CompletionContext, token: CancellationToken): Promise<CompletionResultDto | undefined>;
1533
+ $resolveCompletionItem(handle: number, chainedId: ChainedCacheId, token: CancellationToken): Promise<Completion | undefined>;
1534
+ $releaseCompletionItems(handle: number, id: number): void;
1535
+ $provideImplementation(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<Definition | undefined>;
1536
+ $provideTypeDefinition(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<Definition | undefined>;
1537
+ $provideDefinition(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<Definition | undefined>;
1538
+ $provideDeclaration(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<Definition | undefined>;
1539
+ $provideReferences(handle: number, resource: UriComponents, position: Position, context: ReferenceContext, token: CancellationToken): Promise<Location[] | undefined>;
1540
+ $provideSignatureHelp(
1541
+ handle: number, resource: UriComponents, position: Position, context: SignatureHelpContext, token: CancellationToken
1542
+ ): Promise<SignatureHelp | undefined>;
1543
+ $releaseSignatureHelp(handle: number, id: number): void;
1544
+ $provideHover(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<Hover | undefined>;
1545
+ $provideEvaluatableExpression(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<EvaluatableExpression | undefined>;
1546
+ $provideInlineValues(handle: number, resource: UriComponents, range: Range, context: InlineValueContext, token: CancellationToken): Promise<InlineValue[] | undefined>;
1547
+ $provideDocumentHighlights(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<DocumentHighlight[] | undefined>;
1548
+ $provideDocumentFormattingEdits(handle: number, resource: UriComponents,
1549
+ options: FormattingOptions, token: CancellationToken): Promise<TextEdit[] | undefined>;
1550
+ $provideDocumentRangeFormattingEdits(handle: number, resource: UriComponents, range: Range,
1551
+ options: FormattingOptions, token: CancellationToken): Promise<TextEdit[] | undefined>;
1552
+ $provideOnTypeFormattingEdits(
1553
+ handle: number,
1554
+ resource: UriComponents,
1555
+ position: Position,
1556
+ ch: string,
1557
+ options: FormattingOptions,
1558
+ token: CancellationToken
1559
+ ): Promise<TextEdit[] | undefined>;
1560
+ $provideDocumentLinks(handle: number, resource: UriComponents, token: CancellationToken): Promise<DocumentLink[] | undefined>;
1561
+ $resolveDocumentLink(handle: number, link: DocumentLink, token: CancellationToken): Promise<DocumentLink | undefined>;
1562
+ $releaseDocumentLinks(handle: number, ids: number[]): void;
1563
+ $provideCodeLenses(handle: number, resource: UriComponents, token: CancellationToken): Promise<CodeLensSymbol[] | undefined>;
1564
+ $resolveCodeLens(handle: number, resource: UriComponents, symbol: CodeLensSymbol, token: CancellationToken): Promise<CodeLensSymbol | undefined>;
1565
+ $releaseCodeLenses(handle: number, ids: number[]): void;
1566
+ $provideCodeActions(
1567
+ handle: number,
1568
+ resource: UriComponents,
1569
+ rangeOrSelection: Range | Selection,
1570
+ context: CodeActionContext,
1571
+ token: CancellationToken
1572
+ ): Promise<CodeAction[] | undefined>;
1573
+ $releaseCodeActions(handle: number, cacheIds: number[]): void;
1574
+ $resolveCodeAction(handle: number, cacheId: number, token: CancellationToken): Promise<WorkspaceEditDto | undefined>;
1575
+ $provideDocumentSymbols(handle: number, resource: UriComponents, token: CancellationToken): Promise<DocumentSymbol[] | undefined>;
1576
+ $provideWorkspaceSymbols(handle: number, query: string, token: CancellationToken): PromiseLike<SymbolInformation[]>;
1577
+ $resolveWorkspaceSymbol(handle: number, symbol: SymbolInformation, token: CancellationToken): PromiseLike<SymbolInformation | undefined>;
1578
+ $provideFoldingRange(
1579
+ handle: number,
1580
+ resource: UriComponents,
1581
+ context: FoldingContext,
1582
+ token: CancellationToken
1583
+ ): PromiseLike<FoldingRange[] | undefined>;
1584
+ $provideSelectionRanges(handle: number, resource: UriComponents, positions: Position[], token: CancellationToken): PromiseLike<SelectionRange[][]>;
1585
+ $provideDocumentColors(handle: number, resource: UriComponents, token: CancellationToken): PromiseLike<RawColorInfo[]>;
1586
+ $provideColorPresentations(handle: number, resource: UriComponents, colorInfo: RawColorInfo, token: CancellationToken): PromiseLike<ColorPresentation[]>;
1587
+ $provideInlayHints(handle: number, resource: UriComponents, range: Range, token: CancellationToken): Promise<InlayHintsDto | undefined>;
1588
+ $resolveInlayHint(handle: number, id: ChainedCacheId, token: CancellationToken): Promise<InlayHintDto | undefined>;
1589
+ $releaseInlayHints(handle: number, id: number): void;
1590
+ $provideRenameEdits(handle: number, resource: UriComponents, position: Position, newName: string, token: CancellationToken): PromiseLike<WorkspaceEditDto | undefined>;
1591
+ $resolveRenameLocation(handle: number, resource: UriComponents, position: Position, token: CancellationToken): PromiseLike<RenameLocation | undefined>;
1592
+ $provideDocumentSemanticTokens(handle: number, resource: UriComponents, previousResultId: number, token: CancellationToken): Promise<BinaryBuffer | null>;
1593
+ $releaseDocumentSemanticTokens(handle: number, semanticColoringResultId: number): void;
1594
+ $provideDocumentRangeSemanticTokens(handle: number, resource: UriComponents, range: Range, token: CancellationToken): Promise<BinaryBuffer | null>;
1595
+ $provideRootDefinition(handle: number, resource: UriComponents, location: Position, token: CancellationToken): Promise<CallHierarchyItem[] | undefined>;
1596
+ $provideCallers(handle: number, definition: CallHierarchyItem, token: CancellationToken): Promise<CallHierarchyIncomingCall[] | undefined>;
1597
+ $provideCallees(handle: number, definition: CallHierarchyItem, token: CancellationToken): Promise<CallHierarchyOutgoingCall[] | undefined>;
1598
+ $provideLinkedEditingRanges(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise<LinkedEditingRanges | undefined>;
1599
+ $releaseCallHierarchy(handle: number, session?: string): Promise<boolean>;
1600
+ $prepareTypeHierarchy(handle: number, resource: UriComponents, location: Position, token: theia.CancellationToken): Promise<TypeHierarchyItem[] | undefined>
1601
+ $provideSuperTypes(handle: number, sessionId: string, itemId: string, token: theia.CancellationToken): Promise<TypeHierarchyItem[] | undefined>
1602
+ $provideSubTypes(handle: number, sessionId: string, itemId: string, token: theia.CancellationToken): Promise<TypeHierarchyItem[] | undefined>;
1603
+ $releaseTypeHierarchy(handle: number, session?: string): Promise<boolean>;
1604
+ $provideInlineCompletions(handle: number, resource: UriComponents, position: Position, context: InlineCompletionContext, token: CancellationToken): Promise<IdentifiableInlineCompletions | undefined>;
1605
+ $freeInlineCompletionsList(handle: number, pid: number): void;
1606
+ }
1607
+
1608
+ export const LanguagesMainFactory = Symbol('LanguagesMainFactory');
1609
+ export interface LanguagesMainFactory {
1610
+ (proxy: RPCProtocol): LanguagesMain;
1611
+ }
1612
+
1613
+ export const OutputChannelRegistryFactory = Symbol('OutputChannelRegistryFactory');
1614
+ export interface OutputChannelRegistryFactory {
1615
+ (): OutputChannelRegistryMain;
1616
+ }
1617
+
1618
+ export interface LanguagesMain {
1619
+ $getLanguages(): Promise<string[]>;
1620
+ $changeLanguage(resource: UriComponents, languageId: string): Promise<void>;
1621
+ $setLanguageConfiguration(handle: number, languageId: string, configuration: SerializedLanguageConfiguration): void;
1622
+ $unregister(handle: number): void;
1623
+ $registerCompletionSupport(handle: number, pluginInfo: PluginInfo,
1624
+ selector: SerializedDocumentFilter[], triggerCharacters: string[], supportsResolveDetails: boolean): void;
1625
+ $registerImplementationProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1626
+ $registerTypeDefinitionProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1627
+ $registerDefinitionProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1628
+ $registerDeclarationProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1629
+ $registerReferenceProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1630
+ $registerSignatureHelpProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], metadata: theia.SignatureHelpProviderMetadata): void;
1631
+ $registerHoverProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1632
+ $registerEvaluatableExpressionProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1633
+ $registerInlineValuesProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1634
+ $emitInlineValuesEvent(eventHandle: number, event?: any): void;
1635
+ $registerDocumentHighlightProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1636
+ $registerQuickFixProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], codeActionKinds?: string[], documentation?: CodeActionProviderDocumentation): void;
1637
+ $clearDiagnostics(id: string): void;
1638
+ $changeDiagnostics(id: string, delta: [string, MarkerData[]][]): void;
1639
+ $registerDocumentFormattingSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1640
+ $registerRangeFormattingSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1641
+ $registerOnTypeFormattingProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], autoFormatTriggerCharacters: string[]): void;
1642
+ $registerDocumentLinkProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1643
+ $registerCodeLensSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], eventHandle?: number): void;
1644
+ $emitCodeLensEvent(eventHandle: number, event?: any): void;
1645
+ $registerOutlineSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], displayName?: string): void;
1646
+ $registerWorkspaceSymbolProvider(handle: number, pluginInfo: PluginInfo): void;
1647
+ $registerFoldingRangeProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], eventHandle?: number): void;
1648
+ $emitFoldingRangeEvent(handle: number, event?: any): void;
1649
+ $registerSelectionRangeProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1650
+ $registerDocumentColorProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
1651
+ $registerInlayHintsProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], displayName?: string, eventHandle?: number): void;
1652
+ $emitInlayHintsEvent(eventHandle: number, event?: any): void;
1653
+ $registerRenameProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], supportsResolveInitialValues: boolean): void;
1654
+ $registerDocumentSemanticTokensProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[],
1655
+ legend: theia.SemanticTokensLegend, eventHandle: number | undefined): void;
1656
+ $emitDocumentSemanticTokensEvent(eventHandle: number): void;
1657
+ $registerDocumentRangeSemanticTokensProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], legend: theia.SemanticTokensLegend): void;
1658
+ $registerCallHierarchyProvider(handle: number, selector: SerializedDocumentFilter[]): void;
1659
+ $registerLinkedEditingRangeProvider(handle: number, selector: SerializedDocumentFilter[]): void;
1660
+ $registerTypeHierarchyProvider(handle: number, selector: SerializedDocumentFilter[]): void;
1661
+ $setLanguageStatus(handle: number, status: LanguageStatus): void;
1662
+ $removeLanguageStatus(handle: number): void;
1663
+ $registerInlineCompletionsSupport(handle: number, selector: SerializedDocumentFilter[]): void;
1664
+ }
1665
+
1666
+ export interface WebviewInitData {
1667
+ webviewResourceRoot: string
1668
+ webviewCspSource: string
1669
+ }
1670
+
1671
+ export interface WebviewPanelViewState {
1672
+ readonly active: boolean;
1673
+ readonly visible: boolean;
1674
+ readonly position: number;
1675
+ }
1676
+
1677
+ export interface WebviewsExt {
1678
+ $onMessage(handle: string, message: any): void;
1679
+ $onDidChangeWebviewPanelViewState(handle: string, newState: WebviewPanelViewState): void;
1680
+ $onDidDisposeWebviewPanel(handle: string): PromiseLike<void>;
1681
+ $deserializeWebviewPanel(newWebviewHandle: string,
1682
+ viewType: string,
1683
+ title: string,
1684
+ state: any,
1685
+ viewState: WebviewPanelViewState,
1686
+ options: theia.WebviewOptions & theia.WebviewPanelOptions): PromiseLike<void>;
1687
+ }
1688
+
1689
+ export interface WebviewsMain {
1690
+ $createWebviewPanel(handle: string,
1691
+ viewType: string,
1692
+ title: string,
1693
+ showOptions: theia.WebviewPanelShowOptions,
1694
+ options: theia.WebviewPanelOptions & theia.WebviewOptions): void;
1695
+ $disposeWebview(handle: string): void;
1696
+ $reveal(handle: string, showOptions: theia.WebviewPanelShowOptions): void;
1697
+ $setTitle(handle: string, value: string): void;
1698
+ $setIconPath(handle: string, value: IconUrl | undefined): void;
1699
+ $setHtml(handle: string, value: string): void;
1700
+ $setOptions(handle: string, options: theia.WebviewOptions): void;
1701
+ $postMessage(handle: string, value: any): Thenable<boolean>;
1702
+
1703
+ $registerSerializer(viewType: string): void;
1704
+ $unregisterSerializer(viewType: string): void;
1705
+ }
1706
+
1707
+ export interface WebviewViewsExt {
1708
+ $resolveWebviewView(handle: string,
1709
+ viewType: string,
1710
+ title: string | undefined,
1711
+ state: any,
1712
+ cancellation: CancellationToken): Promise<void>;
1713
+ $onDidChangeWebviewViewVisibility(handle: string, visible: boolean): void;
1714
+ $disposeWebviewView(handle: string): void;
1715
+ }
1716
+
1717
+ export interface WebviewViewsMain extends Disposable {
1718
+ $registerWebviewViewProvider(viewType: string,
1719
+ options: { retainContextWhenHidden?: boolean, serializeBuffersForPostMessage: boolean }): void;
1720
+ $unregisterWebviewViewProvider(viewType: string): void;
1721
+
1722
+ $setWebviewViewTitle(handle: string, value: string | undefined): void;
1723
+ $setWebviewViewDescription(handle: string, value: string | undefined): void;
1724
+
1725
+ $show(handle: string, preserveFocus: boolean): void;
1726
+ }
1727
+
1728
+ export interface CustomEditorsExt {
1729
+ $resolveWebviewEditor<T>(
1730
+ resource: UriComponents,
1731
+ newWebviewHandle: string,
1732
+ viewType: string,
1733
+ title: string,
1734
+ widgetOpenerOptions: T | undefined,
1735
+ options: theia.WebviewPanelOptions,
1736
+ cancellation: CancellationToken): Promise<void>;
1737
+ $createCustomDocument(resource: UriComponents, viewType: string, openContext: theia.CustomDocumentOpenContext, cancellation: CancellationToken): Promise<{ editable: boolean }>;
1738
+ $disposeCustomDocument(resource: UriComponents, viewType: string): Promise<void>;
1739
+ $undo(resource: UriComponents, viewType: string, editId: number, isDirty: boolean): Promise<void>;
1740
+ $redo(resource: UriComponents, viewType: string, editId: number, isDirty: boolean): Promise<void>;
1741
+ $revert(resource: UriComponents, viewType: string, cancellation: CancellationToken): Promise<void>;
1742
+ $disposeEdits(resourceComponents: UriComponents, viewType: string, editIds: number[]): void;
1743
+ $onSave(resource: UriComponents, viewType: string, cancellation: CancellationToken): Promise<void>;
1744
+ $onSaveAs(resource: UriComponents, viewType: string, targetResource: UriComponents, cancellation: CancellationToken): Promise<void>;
1745
+ // $backup(resource: UriComponents, viewType: string, cancellation: CancellationToken): Promise<string>;
1746
+ $onMoveCustomEditor(handle: string, newResource: UriComponents, viewType: string): Promise<void>;
1747
+ }
1748
+
1749
+ export interface CustomTextEditorCapabilities {
1750
+ readonly supportsMove?: boolean;
1751
+ }
1752
+
1753
+ export interface CustomEditorsMain {
1754
+ $registerTextEditorProvider(viewType: string, options: theia.WebviewPanelOptions, capabilities: CustomTextEditorCapabilities): void;
1755
+ $registerCustomEditorProvider(viewType: string, options: theia.WebviewPanelOptions, supportsMultipleEditorsPerDocument: boolean): void;
1756
+ $unregisterEditorProvider(viewType: string): void;
1757
+ $createCustomEditorPanel<T>(handle: string, title: string, widgetOpenerOptions: T | undefined, options: theia.WebviewPanelOptions & theia.WebviewOptions): Promise<void>;
1758
+ $onDidEdit(resource: UriComponents, viewType: string, editId: number, label: string | undefined): void;
1759
+ $onContentChange(resource: UriComponents, viewType: string): void;
1760
+ }
1761
+
1762
+ export interface StorageMain {
1763
+ $set(key: string, value: KeysToAnyValues, isGlobal: boolean): Promise<boolean>;
1764
+ $get(key: string, isGlobal: boolean): Promise<KeysToAnyValues>;
1765
+ $getAll(isGlobal: boolean): Promise<KeysToKeysToAnyValue>;
1766
+ }
1767
+
1768
+ export interface StorageExt {
1769
+ $updatePluginsWorkspaceData(data: KeysToKeysToAnyValue): void;
1770
+ }
1771
+
1772
+ /**
1773
+ * A DebugConfigurationProviderTriggerKind specifies when the `provideDebugConfigurations` method of a `DebugConfigurationProvider` should be called.
1774
+ * Currently there are two situations:
1775
+ * (1) providing debug configurations to populate a newly created `launch.json`
1776
+ * (2) providing dynamically generated configurations when the user asks for them through the UI (e.g. via the "Select and Start Debugging" command).
1777
+ * A trigger kind is used when registering a `DebugConfigurationProvider` with {@link debug.registerDebugConfigurationProvider}.
1778
+ */
1779
+ export enum DebugConfigurationProviderTriggerKind {
1780
+ /**
1781
+ * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide the initial debug
1782
+ * configurations for a newly created launch.json.
1783
+ */
1784
+ Initial = 1,
1785
+ /**
1786
+ * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide dynamically generated debug configurations when the user asks for them through the UI
1787
+ * (e.g. via the "Select and Start Debugging" command).
1788
+ */
1789
+ Dynamic = 2
1790
+ }
1791
+
1792
+ export interface DebugConfigurationProvider {
1793
+ readonly handle: number;
1794
+ readonly type: string;
1795
+ readonly triggerKind: DebugConfigurationProviderTriggerKind;
1796
+ provideDebugConfigurations?(folder: string | undefined): Promise<theia.DebugConfiguration[]>;
1797
+ resolveDebugConfiguration?(
1798
+ folder: string | undefined,
1799
+ debugConfiguration: theia.DebugConfiguration
1800
+ ): Promise<theia.DebugConfiguration | undefined | null>;
1801
+ resolveDebugConfigurationWithSubstitutedVariables?(
1802
+ folder: string | undefined,
1803
+ debugConfiguration: theia.DebugConfiguration
1804
+ ): Promise<theia.DebugConfiguration | undefined | null>;
1805
+ }
1806
+
1807
+ export interface DebugConfigurationProviderDescriptor {
1808
+ readonly handle: number,
1809
+ readonly type: string,
1810
+ readonly trigger: DebugConfigurationProviderTriggerKind,
1811
+ readonly provideDebugConfiguration: boolean,
1812
+ readonly resolveDebugConfigurations: boolean,
1813
+ readonly resolveDebugConfigurationWithSubstitutedVariables: boolean
1814
+ }
1815
+
1816
+ export interface DebugExt {
1817
+ $onSessionCustomEvent(sessionId: string, event: string, body?: any): void;
1818
+ $breakpointsDidChange(added: Breakpoint[], removed: string[], changed: Breakpoint[]): void;
1819
+ $sessionDidCreate(sessionId: string): void;
1820
+ $sessionDidStart(sessionId: string): void;
1821
+ $sessionDidDestroy(sessionId: string): void;
1822
+ $sessionDidChange(sessionId: string | undefined): void;
1823
+ $provideDebugConfigurationsByHandle(handle: number, workspaceFolder: string | undefined): Promise<theia.DebugConfiguration[]>;
1824
+ $resolveDebugConfigurationByHandle(
1825
+ handle: number,
1826
+ workspaceFolder: string | undefined,
1827
+ debugConfiguration: theia.DebugConfiguration
1828
+ ): Promise<theia.DebugConfiguration | undefined | null>;
1829
+ $resolveDebugConfigurationWithSubstitutedVariablesByHandle(
1830
+ handle: number,
1831
+ workspaceFolder: string | undefined,
1832
+ debugConfiguration: DebugConfiguration
1833
+ ): Promise<theia.DebugConfiguration | undefined | null>;
1834
+
1835
+ $createDebugSession(debugConfiguration: DebugConfiguration, workspaceFolder: string | undefined): Promise<string>;
1836
+ $terminateDebugSession(sessionId: string): Promise<void>;
1837
+ $getTerminalCreationOptions(debugType: string): Promise<TerminalOptionsExt | undefined>;
1838
+ }
1839
+
1840
+ export interface DebugMain {
1841
+ $appendToDebugConsole(value: string): Promise<void>;
1842
+ $appendLineToDebugConsole(value: string): Promise<void>;
1843
+ $registerDebuggerContribution(description: DebuggerDescription): Promise<void>;
1844
+ $unregisterDebuggerConfiguration(debugType: string): Promise<void>;
1845
+ $registerDebugConfigurationProvider(description: DebugConfigurationProviderDescriptor): void;
1846
+ $unregisterDebugConfigurationProvider(handle: number): Promise<void>;
1847
+ $addBreakpoints(breakpoints: Breakpoint[]): Promise<void>;
1848
+ $removeBreakpoints(breakpoints: string[]): Promise<void>;
1849
+ $startDebugging(folder: theia.WorkspaceFolder | undefined, nameOrConfiguration: string | theia.DebugConfiguration, options: DebugSessionOptions): Promise<boolean>;
1850
+ $stopDebugging(sessionId?: string): Promise<void>;
1851
+ $customRequest(sessionId: string, command: string, args?: any): Promise<DebugProtocol.Response>;
1852
+ $getDebugProtocolBreakpoint(sessionId: string, breakpointId: string): Promise<theia.DebugProtocolBreakpoint | undefined>;
1853
+ }
1854
+
1855
+ export interface FileSystemExt {
1856
+ $acceptProviderInfos(scheme: string, capabilities?: files.FileSystemProviderCapabilities): void;
1857
+ $stat(handle: number, resource: UriComponents): Promise<files.Stat>;
1858
+ $readdir(handle: number, resource: UriComponents): Promise<[string, files.FileType][]>;
1859
+ $readFile(handle: number, resource: UriComponents): Promise<BinaryBuffer>;
1860
+ $writeFile(handle: number, resource: UriComponents, content: BinaryBuffer, opts: files.FileWriteOptions): Promise<void>;
1861
+ $rename(handle: number, resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
1862
+ $copy(handle: number, resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
1863
+ $mkdir(handle: number, resource: UriComponents): Promise<void>;
1864
+ $delete(handle: number, resource: UriComponents, opts: files.FileDeleteOptions): Promise<void>;
1865
+ $watch(handle: number, session: number, resource: UriComponents, opts: files.WatchOptions): void;
1866
+ $unwatch(handle: number, session: number): void;
1867
+ $open(handle: number, resource: UriComponents, opts: files.FileOpenOptions): Promise<number>;
1868
+ $close(handle: number, fd: number): Promise<void>;
1869
+ $read(handle: number, fd: number, pos: number, length: number): Promise<BinaryBuffer>;
1870
+ $write(handle: number, fd: number, pos: number, data: BinaryBuffer): Promise<number>;
1871
+ }
1872
+
1873
+ export interface IFileChangeDto {
1874
+ resource: UriComponents;
1875
+ type: files.FileChangeType;
1876
+ }
1877
+
1878
+ export interface FileSystemMain {
1879
+ $registerFileSystemProvider(handle: number, scheme: string, capabilities: files.FileSystemProviderCapabilities): void;
1880
+ $unregisterProvider(handle: number): void;
1881
+ $onFileSystemChange(handle: number, resource: IFileChangeDto[]): void;
1882
+
1883
+ $stat(uri: UriComponents): Promise<files.Stat>;
1884
+ $readdir(resource: UriComponents): Promise<[string, files.FileType][]>;
1885
+ $readFile(resource: UriComponents): Promise<BinaryBuffer>;
1886
+ $writeFile(resource: UriComponents, content: BinaryBuffer): Promise<void>;
1887
+ $rename(resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
1888
+ $copy(resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise<void>;
1889
+ $mkdir(resource: UriComponents): Promise<void>;
1890
+ $delete(resource: UriComponents, opts: files.FileDeleteOptions): Promise<void>;
1891
+ }
1892
+
1893
+ export interface FileSystemEvents {
1894
+ created: UriComponents[];
1895
+ changed: UriComponents[];
1896
+ deleted: UriComponents[];
1897
+ }
1898
+
1899
+ export interface ExtHostFileSystemEventServiceShape {
1900
+ $onFileEvent(events: FileSystemEvents): void;
1901
+ $onWillRunFileOperation(operation: files.FileOperation, target: UriComponents, source: UriComponents | undefined, timeout: number, token: CancellationToken): Promise<any>;
1902
+ $onDidRunFileOperation(operation: files.FileOperation, target: UriComponents, source: UriComponents | undefined): void;
1903
+ }
1904
+
1905
+ export interface ClipboardMain {
1906
+ $readText(): Promise<string>;
1907
+ $writeText(value: string): Promise<void>;
1908
+ }
1909
+
1910
+ export interface CommentsExt {
1911
+ $createCommentThreadTemplate(commentControllerHandle: number, uriComponents: UriComponents, range: Range): void;
1912
+ $updateCommentThreadTemplate(commentControllerHandle: number, threadHandle: number, range: Range): Promise<void>;
1913
+ $deleteCommentThread(commentControllerHandle: number, commentThreadHandle: number): Promise<void>;
1914
+ $provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<Range[] | undefined>;
1915
+ }
1916
+
1917
+ export interface CommentProviderFeatures {
1918
+ options?: CommentOptions;
1919
+ }
1920
+
1921
+ export type CommentThreadChanges = Partial<{
1922
+ range: Range,
1923
+ label: string,
1924
+ contextValue: string,
1925
+ comments: Comment[],
1926
+ collapseState: CommentThreadCollapsibleState;
1927
+ canReply: boolean;
1928
+ }>;
1929
+
1930
+ export interface CommentsMain {
1931
+ $registerCommentController(handle: number, id: string, label: string): void;
1932
+ $unregisterCommentController(handle: number): void;
1933
+ $updateCommentControllerFeatures(handle: number, features: CommentProviderFeatures): void;
1934
+ $createCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, range: Range, extensionId: string): CommentThread | undefined;
1935
+ $updateCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, changes: CommentThreadChanges): void;
1936
+ $deleteCommentThread(handle: number, commentThreadHandle: number): void;
1937
+ $onDidCommentThreadsChange(handle: number, event: CommentThreadChangedEvent): void;
1938
+ }
1939
+
1940
+ // #region
1941
+
1942
+ export const enum TabInputKind {
1943
+ UnknownInput,
1944
+ TextInput,
1945
+ TextDiffInput,
1946
+ TextMergeInput,
1947
+ NotebookInput,
1948
+ NotebookDiffInput,
1949
+ CustomEditorInput,
1950
+ WebviewEditorInput,
1951
+ TerminalEditorInput,
1952
+ InteractiveEditorInput,
1953
+ }
1954
+
1955
+ export interface UnknownInputDto {
1956
+ kind: TabInputKind.UnknownInput;
1957
+ }
1958
+
1959
+ export interface TextInputDto {
1960
+ kind: TabInputKind.TextInput;
1961
+ uri: UriComponents;
1962
+ }
1963
+
1964
+ export interface TextDiffInputDto {
1965
+ kind: TabInputKind.TextDiffInput;
1966
+ original: UriComponents;
1967
+ modified: UriComponents;
1968
+ }
1969
+
1970
+ export interface TextMergeInputDto {
1971
+ kind: TabInputKind.TextMergeInput;
1972
+ base: UriComponents;
1973
+ input1: UriComponents;
1974
+ input2: UriComponents;
1975
+ result: UriComponents;
1976
+ }
1977
+
1978
+ export interface NotebookInputDto {
1979
+ kind: TabInputKind.NotebookInput;
1980
+ notebookType: string;
1981
+ uri: UriComponents;
1982
+ }
1983
+
1984
+ export interface NotebookDiffInputDto {
1985
+ kind: TabInputKind.NotebookDiffInput;
1986
+ notebookType: string;
1987
+ original: UriComponents;
1988
+ modified: UriComponents;
1989
+ }
1990
+
1991
+ export interface CustomInputDto {
1992
+ kind: TabInputKind.CustomEditorInput;
1993
+ viewType: string;
1994
+ uri: UriComponents;
1995
+ }
1996
+
1997
+ export interface WebviewInputDto {
1998
+ kind: TabInputKind.WebviewEditorInput;
1999
+ viewType: string;
2000
+ }
2001
+
2002
+ export interface InteractiveEditorInputDto {
2003
+ kind: TabInputKind.InteractiveEditorInput;
2004
+ uri: UriComponents;
2005
+ inputBoxUri: UriComponents;
2006
+ }
2007
+
2008
+ export interface TabInputDto {
2009
+ kind: TabInputKind.TerminalEditorInput;
2010
+ }
2011
+
2012
+ export type EditorGroupColumn = number;
2013
+ export type AnyInputDto = UnknownInputDto | TextInputDto | TextDiffInputDto | TextMergeInputDto | NotebookInputDto | NotebookDiffInputDto | CustomInputDto | WebviewInputDto | InteractiveEditorInputDto | TabInputDto;
2014
+
2015
+ export interface TabGroupDto {
2016
+ isActive: boolean;
2017
+ viewColumn: EditorGroupColumn;
2018
+ tabs: TabDto[];
2019
+ groupId: number;
2020
+ }
2021
+
2022
+ export const enum TabModelOperationKind {
2023
+ TAB_OPEN,
2024
+ TAB_CLOSE,
2025
+ TAB_UPDATE,
2026
+ TAB_MOVE
2027
+ }
2028
+
2029
+ export interface TabOperation {
2030
+ readonly kind: TabModelOperationKind.TAB_OPEN | TabModelOperationKind.TAB_CLOSE | TabModelOperationKind.TAB_UPDATE | TabModelOperationKind.TAB_MOVE;
2031
+ readonly index: number;
2032
+ readonly tabDto: TabDto;
2033
+ readonly groupId: number;
2034
+ readonly oldIndex?: number;
2035
+ }
2036
+
2037
+ export interface TabDto {
2038
+ id: string;
2039
+ label: string;
2040
+ input: AnyInputDto;
2041
+ editorId?: string;
2042
+ isActive: boolean;
2043
+ isPinned: boolean;
2044
+ isPreview: boolean;
2045
+ isDirty: boolean;
2046
+ }
2047
+
2048
+ export interface TabsExt {
2049
+ $acceptEditorTabModel(tabGroups: TabGroupDto[]): void;
2050
+ $acceptTabGroupUpdate(groupDto: TabGroupDto): void;
2051
+ $acceptTabOperation(operation: TabOperation): void;
2052
+ }
2053
+
2054
+ export interface TabsMain {
2055
+ $moveTab(tabId: string, index: number, viewColumn: EditorGroupColumn, preserveFocus?: boolean): void;
2056
+ $closeTab(tabIds: string[], preserveFocus?: boolean): Promise<boolean>;
2057
+ $closeGroup(groupIds: number[], preserveFocus?: boolean): Promise<boolean>;
2058
+ }
2059
+
2060
+ // endregion
2061
+
2062
+ export const PLUGIN_RPC_CONTEXT = {
2063
+ AUTHENTICATION_MAIN: <ProxyIdentifier<AuthenticationMain>>createProxyIdentifier<AuthenticationMain>('AuthenticationMain'),
2064
+ COMMAND_REGISTRY_MAIN: <ProxyIdentifier<CommandRegistryMain>>createProxyIdentifier<CommandRegistryMain>('CommandRegistryMain'),
2065
+ QUICK_OPEN_MAIN: createProxyIdentifier<QuickOpenMain>('QuickOpenMain'),
2066
+ DIALOGS_MAIN: createProxyIdentifier<DialogsMain>('DialogsMain'),
2067
+ WORKSPACE_MAIN: createProxyIdentifier<WorkspaceMain>('WorkspaceMain'),
2068
+ MESSAGE_REGISTRY_MAIN: <ProxyIdentifier<MessageRegistryMain>>createProxyIdentifier<MessageRegistryMain>('MessageRegistryMain'),
2069
+ TEXT_EDITORS_MAIN: createProxyIdentifier<TextEditorsMain>('TextEditorsMain'),
2070
+ DOCUMENTS_MAIN: createProxyIdentifier<DocumentsMain>('DocumentsMain'),
2071
+ STATUS_BAR_MESSAGE_REGISTRY_MAIN: <ProxyIdentifier<StatusBarMessageRegistryMain>>createProxyIdentifier<StatusBarMessageRegistryMain>('StatusBarMessageRegistryMain'),
2072
+ ENV_MAIN: createProxyIdentifier<EnvMain>('EnvMain'),
2073
+ NOTIFICATION_MAIN: createProxyIdentifier<NotificationMain>('NotificationMain'),
2074
+ TERMINAL_MAIN: createProxyIdentifier<TerminalServiceMain>('TerminalServiceMain'),
2075
+ TREE_VIEWS_MAIN: createProxyIdentifier<TreeViewsMain>('TreeViewsMain'),
2076
+ PREFERENCE_REGISTRY_MAIN: createProxyIdentifier<PreferenceRegistryMain>('PreferenceRegistryMain'),
2077
+ OUTPUT_CHANNEL_REGISTRY_MAIN: <ProxyIdentifier<OutputChannelRegistryMain>>createProxyIdentifier<OutputChannelRegistryMain>('OutputChannelRegistryMain'),
2078
+ LANGUAGES_MAIN: createProxyIdentifier<LanguagesMain>('LanguagesMain'),
2079
+ CONNECTION_MAIN: createProxyIdentifier<ConnectionMain>('ConnectionMain'),
2080
+ WEBVIEWS_MAIN: createProxyIdentifier<WebviewsMain>('WebviewsMain'),
2081
+ CUSTOM_EDITORS_MAIN: createProxyIdentifier<CustomEditorsMain>('CustomEditorsMain'),
2082
+ WEBVIEW_VIEWS_MAIN: createProxyIdentifier<WebviewViewsMain>('WebviewViewsMain'),
2083
+ STORAGE_MAIN: createProxyIdentifier<StorageMain>('StorageMain'),
2084
+ TASKS_MAIN: createProxyIdentifier<TasksMain>('TasksMain'),
2085
+ DEBUG_MAIN: createProxyIdentifier<DebugMain>('DebugMain'),
2086
+ FILE_SYSTEM_MAIN: createProxyIdentifier<FileSystemMain>('FileSystemMain'),
2087
+ SCM_MAIN: createProxyIdentifier<ScmMain>('ScmMain'),
2088
+ SECRETS_MAIN: createProxyIdentifier<SecretsMain>('SecretsMain'),
2089
+ DECORATIONS_MAIN: createProxyIdentifier<DecorationsMain>('DecorationsMain'),
2090
+ WINDOW_MAIN: createProxyIdentifier<WindowMain>('WindowMain'),
2091
+ CLIPBOARD_MAIN: <ProxyIdentifier<ClipboardMain>>createProxyIdentifier<ClipboardMain>('ClipboardMain'),
2092
+ LABEL_SERVICE_MAIN: <ProxyIdentifier<LabelServiceMain>>createProxyIdentifier<LabelServiceMain>('LabelServiceMain'),
2093
+ TIMELINE_MAIN: <ProxyIdentifier<TimelineMain>>createProxyIdentifier<TimelineMain>('TimelineMain'),
2094
+ THEMING_MAIN: <ProxyIdentifier<ThemingMain>>createProxyIdentifier<ThemingMain>('ThemingMain'),
2095
+ COMMENTS_MAIN: <ProxyIdentifier<CommentsMain>>createProxyIdentifier<CommentsMain>('CommentsMain'),
2096
+ TABS_MAIN: <ProxyIdentifier<TabsMain>>createProxyIdentifier<TabsMain>('TabsMain')
2097
+ };
2098
+
2099
+ export const MAIN_RPC_CONTEXT = {
2100
+ AUTHENTICATION_EXT: createProxyIdentifier<AuthenticationExt>('AuthenticationExt'),
2101
+ HOSTED_PLUGIN_MANAGER_EXT: createProxyIdentifier<PluginManagerExt>('PluginManagerExt'),
2102
+ COMMAND_REGISTRY_EXT: createProxyIdentifier<CommandRegistryExt>('CommandRegistryExt'),
2103
+ QUICK_OPEN_EXT: createProxyIdentifier<QuickOpenExt>('QuickOpenExt'),
2104
+ WINDOW_STATE_EXT: createProxyIdentifier<WindowStateExt>('WindowStateExt'),
2105
+ NOTIFICATION_EXT: createProxyIdentifier<NotificationExt>('NotificationExt'),
2106
+ WORKSPACE_EXT: createProxyIdentifier<WorkspaceExt>('WorkspaceExt'),
2107
+ TEXT_EDITORS_EXT: createProxyIdentifier<TextEditorsExt>('TextEditorsExt'),
2108
+ EDITORS_AND_DOCUMENTS_EXT: createProxyIdentifier<EditorsAndDocumentsExt>('EditorsAndDocumentsExt'),
2109
+ DOCUMENTS_EXT: createProxyIdentifier<DocumentsExt>('DocumentsExt'),
2110
+ TERMINAL_EXT: createProxyIdentifier<TerminalServiceExt>('TerminalServiceExt'),
2111
+ OUTPUT_CHANNEL_REGISTRY_EXT: createProxyIdentifier<OutputChannelRegistryExt>('OutputChannelRegistryExt'),
2112
+ TREE_VIEWS_EXT: createProxyIdentifier<TreeViewsExt>('TreeViewsExt'),
2113
+ PREFERENCE_REGISTRY_EXT: createProxyIdentifier<PreferenceRegistryExt>('PreferenceRegistryExt'),
2114
+ LANGUAGES_EXT: createProxyIdentifier<LanguagesExt>('LanguagesExt'),
2115
+ CONNECTION_EXT: createProxyIdentifier<ConnectionExt>('ConnectionExt'),
2116
+ WEBVIEWS_EXT: createProxyIdentifier<WebviewsExt>('WebviewsExt'),
2117
+ CUSTOM_EDITORS_EXT: createProxyIdentifier<CustomEditorsExt>('CustomEditorsExt'),
2118
+ WEBVIEW_VIEWS_EXT: createProxyIdentifier<WebviewViewsExt>('WebviewViewsExt'),
2119
+ STORAGE_EXT: createProxyIdentifier<StorageExt>('StorageExt'),
2120
+ TASKS_EXT: createProxyIdentifier<TasksExt>('TasksExt'),
2121
+ DEBUG_EXT: createProxyIdentifier<DebugExt>('DebugExt'),
2122
+ FILE_SYSTEM_EXT: createProxyIdentifier<FileSystemExt>('FileSystemExt'),
2123
+ ExtHostFileSystemEventService: createProxyIdentifier<ExtHostFileSystemEventServiceShape>('ExtHostFileSystemEventService'),
2124
+ SCM_EXT: createProxyIdentifier<ScmExt>('ScmExt'),
2125
+ SECRETS_EXT: createProxyIdentifier<SecretsExt>('SecretsExt'),
2126
+ DECORATIONS_EXT: createProxyIdentifier<DecorationsExt>('DecorationsExt'),
2127
+ LABEL_SERVICE_EXT: createProxyIdentifier<LabelServiceExt>('LabelServiceExt'),
2128
+ TIMELINE_EXT: createProxyIdentifier<TimelineExt>('TimeLineExt'),
2129
+ THEMING_EXT: createProxyIdentifier<ThemingExt>('ThemingExt'),
2130
+ COMMENTS_EXT: createProxyIdentifier<CommentsExt>('CommentsExt'),
2131
+ TABS_EXT: createProxyIdentifier<TabsExt>('TabsExt')
2132
+ };
2133
+
2134
+ export interface TasksExt {
2135
+ $initLoadedTasks(executions: TaskExecutionDto[]): Promise<void>;
2136
+ $provideTasks(handle: number): Promise<TaskDto[] | undefined>;
2137
+ $resolveTask(handle: number, task: TaskDto, token?: CancellationToken): Promise<TaskDto | undefined>;
2138
+ $onDidStartTask(execution: TaskExecutionDto, terminalId: number): void;
2139
+ $onDidEndTask(id: number): void;
2140
+ $onDidStartTaskProcess(processId: number | undefined, execution: TaskExecutionDto): void;
2141
+ $onDidEndTaskProcess(exitCode: number | undefined, taskId: number): void;
2142
+ }
2143
+
2144
+ export interface TasksMain {
2145
+ $registerTaskProvider(handle: number, type: string): void;
2146
+ $fetchTasks(taskVersion: string | undefined, taskType: string | undefined): Promise<TaskDto[]>;
2147
+ $executeTask(taskDto: TaskDto): Promise<TaskExecutionDto | undefined>;
2148
+ $taskExecutions(): Promise<TaskExecutionDto[]>;
2149
+ $unregister(handle: number): void;
2150
+ $terminateTask(id: number): void;
2151
+ $customExecutionComplete(id: number, exitCode: number | undefined): void;
2152
+ }
2153
+
2154
+ export interface AuthenticationExt {
2155
+ $getSessions(id: string, scopes?: string[]): Promise<ReadonlyArray<theia.AuthenticationSession>>;
2156
+ $createSession(id: string, scopes: string[]): Promise<theia.AuthenticationSession>;
2157
+ $removeSession(id: string, sessionId: string): Promise<void>;
2158
+ $onDidChangeAuthenticationSessions(provider: theia.AuthenticationProviderInformation): Promise<void>;
2159
+ }
2160
+
2161
+ export interface AuthenticationMain {
2162
+ $registerAuthenticationProvider(id: string, label: string, supportsMultipleAccounts: boolean): void;
2163
+ $unregisterAuthenticationProvider(id: string): void;
2164
+ $onDidChangeSessions(providerId: string, event: AuthenticationProviderAuthenticationSessionsChangeEvent): void;
2165
+ $getSession(providerId: string, scopes: readonly string[], extensionId: string, extensionName: string,
2166
+ options: theia.AuthenticationGetSessionOptions): Promise<theia.AuthenticationSession | undefined>;
2167
+ }
2168
+
2169
+ export interface RawColorInfo {
2170
+ color: [number, number, number, number];
2171
+ range: Range;
2172
+ }
2173
+
2174
+ export interface LabelServiceExt {
2175
+ $registerResourceLabelFormatter(formatter: ResourceLabelFormatter): theia.Disposable;
2176
+ }
2177
+
2178
+ export interface LabelServiceMain {
2179
+ $registerResourceLabelFormatter(handle: number, formatter: ResourceLabelFormatter): void;
2180
+ $unregisterResourceLabelFormatter(handle: number): void;
2181
+ }
2182
+
2183
+ export interface SecretsExt {
2184
+ $onDidChangePassword(e: { extensionId: string, key: string }): Promise<void>;
2185
+ }
2186
+
2187
+ export interface SecretsMain {
2188
+ $getPassword(extensionId: string, key: string): Promise<string | undefined>;
2189
+ $setPassword(extensionId: string, key: string, value: string): Promise<void>;
2190
+ $deletePassword(extensionId: string, key: string): Promise<void>;
2191
+ }
2192
+
2193
+ export type InlayHintDto = CachedSessionItem<InlayHint>;
2194
+ export type InlayHintsDto = CachedSession<{ hints: InlayHint[] }>;
2195
+
2196
+ export interface IdentifiableInlineCompletions extends InlineCompletions<IdentifiableInlineCompletion> {
2197
+ pid: number;
2198
+ }
2199
+
2200
+ export interface IdentifiableInlineCompletion extends InlineCompletion {
2201
+ idx: number;
2202
+ }