@theia/plugin-ext 1.18.0-next.d3501165 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/LICENSE +642 -0
  2. package/README.md +5 -0
  3. package/lib/common/arrays.d.ts +4 -0
  4. package/lib/common/arrays.d.ts.map +1 -1
  5. package/lib/common/arrays.js +9 -1
  6. package/lib/common/arrays.js.map +1 -1
  7. package/lib/common/connection.d.ts +1 -2
  8. package/lib/common/connection.d.ts.map +1 -1
  9. package/lib/common/connection.js.map +1 -1
  10. package/lib/common/plugin-api-rpc-model.d.ts +4 -0
  11. package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
  12. package/lib/common/plugin-api-rpc-model.js.map +1 -1
  13. package/lib/common/plugin-api-rpc.d.ts +29 -11
  14. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  15. package/lib/common/plugin-api-rpc.js +21 -1
  16. package/lib/common/plugin-api-rpc.js.map +1 -1
  17. package/lib/common/plugin-protocol.d.ts +1 -0
  18. package/lib/common/plugin-protocol.d.ts.map +1 -1
  19. package/lib/common/plugin-protocol.js.map +1 -1
  20. package/lib/hosted/browser/hosted-plugin.d.ts +5 -6
  21. package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
  22. package/lib/hosted/browser/hosted-plugin.js +19 -13
  23. package/lib/hosted/browser/hosted-plugin.js.map +1 -1
  24. package/lib/hosted/browser/worker/debug-stub.d.ts.map +1 -1
  25. package/lib/hosted/browser/worker/debug-stub.js +1 -0
  26. package/lib/hosted/browser/worker/debug-stub.js.map +1 -1
  27. package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts +1 -1
  28. package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts.map +1 -1
  29. package/lib/hosted/node/hosted-plugin-deployer-handler.js +14 -38
  30. package/lib/hosted/node/hosted-plugin-deployer-handler.js.map +1 -1
  31. package/lib/hosted/node/hosted-plugin-localization-service.d.ts +37 -0
  32. package/lib/hosted/node/hosted-plugin-localization-service.d.ts.map +1 -0
  33. package/lib/hosted/node/hosted-plugin-localization-service.js +197 -0
  34. package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -0
  35. package/lib/hosted/node/hosted-plugin-process.d.ts +2 -2
  36. package/lib/hosted/node/hosted-plugin-process.d.ts.map +1 -1
  37. package/lib/hosted/node/hosted-plugin-process.js +5 -7
  38. package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
  39. package/lib/hosted/node/plugin-ext-hosted-backend-module.d.ts.map +1 -1
  40. package/lib/hosted/node/plugin-ext-hosted-backend-module.js +2 -0
  41. package/lib/hosted/node/plugin-ext-hosted-backend-module.js.map +1 -1
  42. package/lib/hosted/node/plugin-manifest-loader.d.ts +1 -1
  43. package/lib/hosted/node/plugin-manifest-loader.d.ts.map +1 -1
  44. package/lib/hosted/node/plugin-manifest-loader.js +4 -52
  45. package/lib/hosted/node/plugin-manifest-loader.js.map +1 -1
  46. package/lib/hosted/node/plugin-service.d.ts +3 -6
  47. package/lib/hosted/node/plugin-service.d.ts.map +1 -1
  48. package/lib/hosted/node/plugin-service.js +7 -40
  49. package/lib/hosted/node/plugin-service.js.map +1 -1
  50. package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
  51. package/lib/hosted/node/scanners/scanner-theia.js +3 -2
  52. package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
  53. package/lib/main/browser/callhierarchy/callhierarchy-type-converters.d.ts.map +1 -1
  54. package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js +6 -2
  55. package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js.map +1 -1
  56. package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +2 -2
  57. package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
  58. package/lib/main/browser/custom-editors/custom-editor-opener.js +6 -2
  59. package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
  60. package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
  61. package/lib/main/browser/custom-editors/custom-editors-main.js +1 -2
  62. package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
  63. package/lib/main/browser/debug/debug-main.js +1 -1
  64. package/lib/main/browser/debug/debug-main.js.map +1 -1
  65. package/lib/main/browser/debug/plugin-debug-adapter-contribution.d.ts +1 -1
  66. package/lib/main/browser/debug/plugin-debug-adapter-contribution.d.ts.map +1 -1
  67. package/lib/main/browser/debug/plugin-debug-adapter-contribution.js +2 -2
  68. package/lib/main/browser/debug/plugin-debug-adapter-contribution.js.map +1 -1
  69. package/lib/main/browser/debug/plugin-debug-service.d.ts +8 -0
  70. package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
  71. package/lib/main/browser/debug/plugin-debug-service.js +15 -0
  72. package/lib/main/browser/debug/plugin-debug-service.js.map +1 -1
  73. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +2 -2
  74. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
  75. package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
  76. package/lib/main/browser/dialogs/modal-notification.d.ts +4 -4
  77. package/lib/main/browser/dialogs/modal-notification.d.ts.map +1 -1
  78. package/lib/main/browser/dialogs/modal-notification.js +21 -10
  79. package/lib/main/browser/dialogs/modal-notification.js.map +1 -1
  80. package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
  81. package/lib/main/browser/editors-and-documents-main.js +3 -4
  82. package/lib/main/browser/editors-and-documents-main.js.map +1 -1
  83. package/lib/main/browser/languages-main.js +1 -1
  84. package/lib/main/browser/languages-main.js.map +1 -1
  85. package/lib/main/browser/message-registry-main.js +1 -1
  86. package/lib/main/browser/message-registry-main.js.map +1 -1
  87. package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
  88. package/lib/main/browser/plugin-ext-frontend-module.js +5 -3
  89. package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
  90. package/lib/main/browser/plugin-ext-widget.d.ts.map +1 -1
  91. package/lib/main/browser/plugin-ext-widget.js +3 -2
  92. package/lib/main/browser/plugin-ext-widget.js.map +1 -1
  93. package/lib/main/browser/plugin-shared-style.js +1 -1
  94. package/lib/main/browser/plugin-shared-style.js.map +1 -1
  95. package/lib/main/browser/quick-open-main.d.ts +3 -6
  96. package/lib/main/browser/quick-open-main.d.ts.map +1 -1
  97. package/lib/main/browser/quick-open-main.js +48 -100
  98. package/lib/main/browser/quick-open-main.js.map +1 -1
  99. package/lib/main/browser/timeline-main.d.ts.map +1 -1
  100. package/lib/main/browser/timeline-main.js +1 -1
  101. package/lib/main/browser/timeline-main.js.map +1 -1
  102. package/lib/main/browser/view/plugin-view-registry.d.ts +3 -2
  103. package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
  104. package/lib/main/browser/view/plugin-view-registry.js +64 -24
  105. package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
  106. package/lib/main/browser/view/plugin-view-widget.d.ts +2 -0
  107. package/lib/main/browser/view/plugin-view-widget.d.ts.map +1 -1
  108. package/lib/main/browser/view/plugin-view-widget.js +3 -1
  109. package/lib/main/browser/view/plugin-view-widget.js.map +1 -1
  110. package/lib/main/browser/view/tree-view-widget.d.ts +3 -4
  111. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  112. package/lib/main/browser/view/tree-view-widget.js +25 -28
  113. package/lib/main/browser/view/tree-view-widget.js.map +1 -1
  114. package/lib/main/browser/webview/webview-frontend-security-warnings.d.ts.map +1 -1
  115. package/lib/main/browser/webview/webview-frontend-security-warnings.js +8 -5
  116. package/lib/main/browser/webview/webview-frontend-security-warnings.js.map +1 -1
  117. package/lib/main/browser/webview/webview-preferences.d.ts.map +1 -1
  118. package/lib/main/browser/webview/webview-preferences.js +3 -2
  119. package/lib/main/browser/webview/webview-preferences.js.map +1 -1
  120. package/lib/main/browser/webview/webview.d.ts +1 -1
  121. package/lib/main/browser/webview/webview.d.ts.map +1 -1
  122. package/lib/main/browser/webview/webview.js +2 -2
  123. package/lib/main/browser/webview/webview.js.map +1 -1
  124. package/lib/plugin/comments.d.ts.map +1 -1
  125. package/lib/plugin/comments.js +2 -3
  126. package/lib/plugin/comments.js.map +1 -1
  127. package/lib/plugin/custom-editors.d.ts +1 -2
  128. package/lib/plugin/custom-editors.d.ts.map +1 -1
  129. package/lib/plugin/custom-editors.js +2 -3
  130. package/lib/plugin/custom-editors.js.map +1 -1
  131. package/lib/plugin/decorations.d.ts.map +1 -1
  132. package/lib/plugin/decorations.js +2 -3
  133. package/lib/plugin/decorations.js.map +1 -1
  134. package/lib/plugin/document-data.d.ts.map +1 -1
  135. package/lib/plugin/document-data.js +1 -1
  136. package/lib/plugin/document-data.js.map +1 -1
  137. package/lib/plugin/documents.d.ts.map +1 -1
  138. package/lib/plugin/documents.js +1 -2
  139. package/lib/plugin/documents.js.map +1 -1
  140. package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
  141. package/lib/plugin/file-system-event-service-ext-impl.js +2 -3
  142. package/lib/plugin/file-system-event-service-ext-impl.js.map +1 -1
  143. package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
  144. package/lib/plugin/file-system-ext-impl.js +12 -13
  145. package/lib/plugin/file-system-ext-impl.js.map +1 -1
  146. package/lib/plugin/known-commands.spec.js +1 -2
  147. package/lib/plugin/known-commands.spec.js.map +1 -1
  148. package/lib/plugin/languages/call-hierarchy.d.ts +1 -1
  149. package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
  150. package/lib/plugin/languages/call-hierarchy.js +8 -3
  151. package/lib/plugin/languages/call-hierarchy.js.map +1 -1
  152. package/lib/plugin/languages/rename.d.ts +1 -2
  153. package/lib/plugin/languages/rename.d.ts.map +1 -1
  154. package/lib/plugin/languages/rename.js.map +1 -1
  155. package/lib/plugin/languages.d.ts +1 -1
  156. package/lib/plugin/languages.d.ts.map +1 -1
  157. package/lib/plugin/languages.js +2 -1
  158. package/lib/plugin/languages.js.map +1 -1
  159. package/lib/plugin/message-registry.d.ts.map +1 -1
  160. package/lib/plugin/message-registry.js +8 -5
  161. package/lib/plugin/message-registry.js.map +1 -1
  162. package/lib/plugin/node/debug/debug.d.ts +4 -3
  163. package/lib/plugin/node/debug/debug.d.ts.map +1 -1
  164. package/lib/plugin/node/debug/debug.js +34 -15
  165. package/lib/plugin/node/debug/debug.js.map +1 -1
  166. package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts +3 -3
  167. package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts.map +1 -1
  168. package/lib/plugin/node/debug/plugin-debug-adapter-session.js.map +1 -1
  169. package/lib/plugin/node/debug/plugin-debug-adapter-starter.d.ts +6 -4
  170. package/lib/plugin/node/debug/plugin-debug-adapter-starter.d.ts.map +1 -1
  171. package/lib/plugin/node/debug/plugin-debug-adapter-starter.js +23 -13
  172. package/lib/plugin/node/debug/plugin-debug-adapter-starter.js.map +1 -1
  173. package/lib/plugin/plugin-context.d.ts.map +1 -1
  174. package/lib/plugin/plugin-context.js +8 -3
  175. package/lib/plugin/plugin-context.js.map +1 -1
  176. package/lib/plugin/plugin-manager.d.ts +2 -0
  177. package/lib/plugin/plugin-manager.d.ts.map +1 -1
  178. package/lib/plugin/plugin-manager.js +24 -3
  179. package/lib/plugin/plugin-manager.js.map +1 -1
  180. package/lib/plugin/plugin-storage.d.ts +4 -0
  181. package/lib/plugin/plugin-storage.d.ts.map +1 -1
  182. package/lib/plugin/plugin-storage.js +6 -1
  183. package/lib/plugin/plugin-storage.js.map +1 -1
  184. package/lib/plugin/preference-registry.spec.js.map +1 -1
  185. package/lib/plugin/quick-open.d.ts +1 -3
  186. package/lib/plugin/quick-open.d.ts.map +1 -1
  187. package/lib/plugin/quick-open.js +10 -25
  188. package/lib/plugin/quick-open.js.map +1 -1
  189. package/lib/plugin/tasks/tasks.d.ts +1 -1
  190. package/lib/plugin/tasks/tasks.d.ts.map +1 -1
  191. package/lib/plugin/tasks/tasks.js +3 -2
  192. package/lib/plugin/tasks/tasks.js.map +1 -1
  193. package/lib/plugin/timeline.d.ts.map +1 -1
  194. package/lib/plugin/timeline.js +1 -2
  195. package/lib/plugin/timeline.js.map +1 -1
  196. package/lib/plugin/type-converters.d.ts.map +1 -1
  197. package/lib/plugin/type-converters.js +18 -11
  198. package/lib/plugin/type-converters.js.map +1 -1
  199. package/lib/plugin/types-impl.d.ts +55 -1
  200. package/lib/plugin/types-impl.d.ts.map +1 -1
  201. package/lib/plugin/types-impl.js +81 -1
  202. package/lib/plugin/types-impl.js.map +1 -1
  203. package/lib/plugin/webviews.d.ts +1 -2
  204. package/lib/plugin/webviews.d.ts.map +1 -1
  205. package/lib/plugin/webviews.js.map +1 -1
  206. package/package.json +31 -27
  207. package/src/common/arrays.ts +8 -0
  208. package/src/common/connection.ts +1 -2
  209. package/src/common/plugin-api-rpc-model.ts +4 -0
  210. package/src/common/plugin-api-rpc.ts +31 -10
  211. package/src/common/plugin-protocol.ts +2 -0
  212. package/src/hosted/browser/hosted-plugin.ts +19 -12
  213. package/src/hosted/browser/worker/debug-stub.ts +1 -0
  214. package/src/hosted/node/hosted-plugin-deployer-handler.ts +13 -40
  215. package/src/hosted/node/hosted-plugin-localization-service.ts +201 -0
  216. package/src/hosted/node/hosted-plugin-process.ts +4 -6
  217. package/src/hosted/node/plugin-ext-hosted-backend-module.ts +2 -0
  218. package/src/hosted/node/plugin-manifest-loader.ts +4 -56
  219. package/src/hosted/node/plugin-service.ts +7 -40
  220. package/src/hosted/node/scanners/scanner-theia.ts +4 -2
  221. package/src/main/browser/callhierarchy/callhierarchy-type-converters.ts +6 -2
  222. package/src/main/browser/custom-editors/custom-editor-opener.tsx +8 -4
  223. package/src/main/browser/custom-editors/custom-editors-main.ts +1 -2
  224. package/src/main/browser/debug/debug-main.ts +1 -1
  225. package/src/main/browser/debug/plugin-debug-adapter-contribution.ts +3 -3
  226. package/src/main/browser/debug/plugin-debug-service.ts +23 -0
  227. package/src/main/browser/debug/plugin-debug-session-factory.ts +3 -3
  228. package/src/main/browser/dialogs/modal-notification.ts +24 -13
  229. package/src/main/browser/dialogs/style/modal-notification.css +17 -2
  230. package/src/main/browser/editors-and-documents-main.ts +1 -2
  231. package/src/main/browser/languages-main.ts +1 -1
  232. package/src/main/browser/message-registry-main.ts +1 -1
  233. package/src/main/browser/plugin-ext-frontend-module.ts +6 -4
  234. package/src/main/browser/plugin-ext-widget.tsx +3 -2
  235. package/src/main/browser/plugin-shared-style.ts +1 -1
  236. package/src/main/browser/quick-open-main.ts +54 -109
  237. package/src/main/browser/style/index.css +1 -5
  238. package/src/main/browser/style/plugin-sidebar.css +1 -1
  239. package/src/main/browser/timeline-main.ts +1 -2
  240. package/src/main/browser/view/plugin-view-registry.ts +68 -26
  241. package/src/main/browser/view/plugin-view-widget.ts +7 -2
  242. package/src/main/browser/view/tree-view-widget.tsx +41 -46
  243. package/src/main/browser/webview/pre/host.js +20 -12
  244. package/src/main/browser/webview/pre/main.js +1 -2
  245. package/src/main/browser/webview/pre/service-worker.js +1 -1
  246. package/src/main/browser/webview/webview-frontend-security-warnings.ts +8 -7
  247. package/src/main/browser/webview/webview-preferences.ts +3 -2
  248. package/src/main/browser/webview/webview.ts +2 -2
  249. package/src/plugin/comments.ts +1 -2
  250. package/src/plugin/custom-editors.ts +2 -4
  251. package/src/plugin/decorations.ts +1 -2
  252. package/src/plugin/document-data.ts +1 -2
  253. package/src/plugin/documents.ts +1 -2
  254. package/src/plugin/file-system-event-service-ext-impl.ts +1 -2
  255. package/src/plugin/file-system-ext-impl.ts +1 -2
  256. package/src/plugin/known-commands.spec.ts +1 -2
  257. package/src/plugin/languages/call-hierarchy.ts +14 -5
  258. package/src/plugin/languages/rename.ts +1 -2
  259. package/src/plugin/languages.ts +5 -2
  260. package/src/plugin/message-registry.ts +9 -6
  261. package/src/plugin/node/debug/debug.ts +40 -19
  262. package/src/plugin/node/debug/plugin-debug-adapter-session.ts +3 -3
  263. package/src/plugin/node/debug/plugin-debug-adapter-starter.ts +24 -14
  264. package/src/plugin/plugin-context.ts +21 -10
  265. package/src/plugin/plugin-manager.ts +26 -4
  266. package/src/plugin/plugin-storage.ts +7 -2
  267. package/src/plugin/preference-registry.spec.ts +1 -2
  268. package/src/plugin/quick-open.ts +12 -29
  269. package/src/plugin/tasks/tasks.ts +3 -2
  270. package/src/plugin/timeline.ts +1 -2
  271. package/src/plugin/type-converters.ts +20 -13
  272. package/src/plugin/types-impl.ts +77 -1
  273. package/src/plugin/webviews.ts +1 -2
@@ -17,17 +17,18 @@
17
17
  /* eslint-disable @typescript-eslint/no-explicit-any */
18
18
  /* tslint:disable:typedef */
19
19
 
20
- import * as theia from '@theia/plugin';
20
+ import type * as theia from '@theia/plugin';
21
21
  import { CommandRegistryImpl } from './command-registry';
22
22
  import { Emitter } from '@theia/core/lib/common/event';
23
- import { CancellationTokenSource } from '@theia/core/lib/common/cancellation';
23
+ import { CancellationError, CancellationToken, CancellationTokenSource } from '@theia/core/lib/common/cancellation';
24
24
  import { QuickOpenExtImpl } from './quick-open';
25
25
  import {
26
26
  MAIN_RPC_CONTEXT,
27
27
  Plugin as InternalPlugin,
28
28
  PluginManager,
29
29
  PluginAPIFactory,
30
- MainMessageType
30
+ MainMessageType,
31
+ DebugConfigurationProviderTriggerKind
31
32
  } from '../common/plugin-api-rpc';
32
33
  import { RPCProtocol } from '../common/rpc-protocol';
33
34
  import { MessageRegistryExt } from './message-registry';
@@ -105,6 +106,8 @@ import {
105
106
  Task2,
106
107
  DebugAdapterExecutable,
107
108
  DebugAdapterServer,
109
+ DebugAdapterNamedPipeServer,
110
+ DebugAdapterInlineImplementation,
108
111
  Breakpoint,
109
112
  SourceBreakpoint,
110
113
  FunctionBreakpoint,
@@ -134,7 +137,8 @@ import {
134
137
  ColorThemeKind,
135
138
  SourceControlInputBoxValidationType,
136
139
  URI,
137
- FileDecoration
140
+ FileDecoration,
141
+ ExtensionMode
138
142
  } from './types-impl';
139
143
  import { AuthenticationExtImpl } from './authentication-ext';
140
144
  import { SymbolKind } from '../common/plugin-api-rpc-model';
@@ -149,7 +153,6 @@ import { LanguagesExtImpl } from './languages';
149
153
  import { fromDocumentSelector, pluginToPluginInfo, fromGlobPattern } from './type-converters';
150
154
  import { DialogsExtImpl } from './dialogs';
151
155
  import { NotificationExtImpl } from './notification';
152
- import { CancellationToken } from '@theia/core/lib/common/cancellation';
153
156
  import { score } from '@theia/callhierarchy/lib/common/language-selector';
154
157
  import { MarkdownString } from './markdown-string';
155
158
  import { TreeViewsExtImpl } from './tree/tree-views';
@@ -157,9 +160,8 @@ import { ConnectionExtImpl } from './connection-ext';
157
160
  import { TasksExtImpl } from './tasks/tasks';
158
161
  import { DebugExtImpl } from './node/debug/debug';
159
162
  import { FileSystemExtImpl } from './file-system-ext-impl';
160
- import { QuickPick, QuickPickItem, ResourceLabelFormatter } from '@theia/plugin';
163
+ import { QuickPick, QuickPickItem, ResourceLabelFormatter, LineChange } from '@theia/plugin';
161
164
  import { ScmExtImpl } from './scm';
162
- import { LineChange } from '@theia/plugin';
163
165
  import { DecorationsExtImpl } from './decorations';
164
166
  import { TextEditorExt } from './text-editor';
165
167
  import { ClipboardExt } from './clipboard-ext';
@@ -767,8 +769,12 @@ export function createAPIFactory(
767
769
  registerDebugAdapterDescriptorFactory(debugType: string, factory: theia.DebugAdapterDescriptorFactory): Disposable {
768
770
  return debugExt.registerDebugAdapterDescriptorFactory(debugType, factory);
769
771
  },
770
- registerDebugConfigurationProvider(debugType: string, provider: theia.DebugConfigurationProvider): Disposable {
771
- return debugExt.registerDebugConfigurationProvider(debugType, provider);
772
+ registerDebugConfigurationProvider(
773
+ debugType: string,
774
+ provider: theia.DebugConfigurationProvider,
775
+ triggerKind?: theia.DebugConfigurationProviderTriggerKind
776
+ ): Disposable {
777
+ return debugExt.registerDebugConfigurationProvider(debugType, provider, triggerKind || DebugConfigurationProviderTriggerKind.Initial);
772
778
  },
773
779
  registerDebugAdapterTrackerFactory(debugType: string, factory: theia.DebugAdapterTrackerFactory): Disposable {
774
780
  return debugExt.registerDebugAdapterTrackerFactory(debugType, factory);
@@ -924,6 +930,9 @@ export function createAPIFactory(
924
930
  Task2,
925
931
  DebugAdapterExecutable,
926
932
  DebugAdapterServer,
933
+ DebugAdapterNamedPipeServer,
934
+ DebugAdapterInlineImplementation,
935
+ DebugConfigurationProviderTriggerKind,
927
936
  Breakpoint,
928
937
  SourceBreakpoint,
929
938
  FunctionBreakpoint,
@@ -952,7 +961,9 @@ export function createAPIFactory(
952
961
  SemanticTokensEdit,
953
962
  ColorThemeKind,
954
963
  SourceControlInputBoxValidationType,
955
- FileDecoration
964
+ FileDecoration,
965
+ CancellationError,
966
+ ExtensionMode
956
967
  };
957
968
  };
958
969
  }
@@ -33,7 +33,7 @@ import * as theia from '@theia/plugin';
33
33
  import { join } from './path';
34
34
  import { EnvExtImpl } from './env';
35
35
  import { PreferenceRegistryExtImpl } from './preference-registry';
36
- import { Memento, KeyValueStorageProxy } from './plugin-storage';
36
+ import { Memento, KeyValueStorageProxy, GlobalState } from './plugin-storage';
37
37
  import { ExtPluginApi } from '../common/plugin-ext-api-contribution';
38
38
  import { RPCProtocol } from '../common/rpc-protocol';
39
39
  import { Emitter } from '@theia/core/lib/common/event';
@@ -79,7 +79,11 @@ export class PluginManagerExtImpl implements PluginManagerExt, PluginManager {
79
79
  '*',
80
80
  'onLanguage',
81
81
  'onCommand',
82
- 'onDebug', 'onDebugInitialConfigurations', 'onDebugResolve', 'onDebugAdapterProtocolTracker',
82
+ 'onDebug',
83
+ 'onDebugInitialConfigurations',
84
+ 'onDebugResolve',
85
+ 'onDebugAdapterProtocolTracker',
86
+ 'onDebugDynamicConfigurations',
83
87
  'workspaceContains',
84
88
  'onView',
85
89
  'onUri',
@@ -321,6 +325,23 @@ export class PluginManagerExtImpl implements PluginManagerExt, PluginManager {
321
325
  }
322
326
 
323
327
  async $activateByEvent(activationEvent: string): Promise<void> {
328
+ if (activationEvent.endsWith(':*')) {
329
+ const baseEvent = activationEvent.substring(0, activationEvent.length - 2);
330
+ await this.activateByBaseEvent(baseEvent);
331
+ } else {
332
+ await this.activateBySingleEvent(activationEvent);
333
+ }
334
+ }
335
+
336
+ protected async activateByBaseEvent(baseEvent: string): Promise<void> {
337
+ await Promise.all(Array.from(this.activations.keys(), activation => {
338
+ if (activation.startsWith(baseEvent)) {
339
+ return this.activateBySingleEvent(activation);
340
+ }
341
+ }));
342
+ }
343
+
344
+ protected async activateBySingleEvent(activationEvent: string): Promise<void> {
324
345
  const activations = this.activations.get(activationEvent);
325
346
  if (!activations) {
326
347
  return;
@@ -351,7 +372,7 @@ export class PluginManagerExtImpl implements PluginManagerExt, PluginManager {
351
372
  const pluginContext: theia.PluginContext = {
352
373
  extensionPath: plugin.pluginFolder,
353
374
  extensionUri: Uri.file(plugin.pluginFolder),
354
- globalState: new Memento(plugin.model.id, true, this.storageProxy),
375
+ globalState: new GlobalState(plugin.model.id, true, this.storageProxy),
355
376
  workspaceState: new Memento(plugin.model.id, false, this.storageProxy),
356
377
  subscriptions: subscriptions,
357
378
  asAbsolutePath: asAbsolutePath,
@@ -361,7 +382,8 @@ export class PluginManagerExtImpl implements PluginManagerExt, PluginManager {
361
382
  secrets,
362
383
  globalStoragePath: globalStoragePath,
363
384
  globalStorageUri: Uri.file(globalStoragePath),
364
- environmentVariableCollection: this.terminalService.getEnvironmentVariableCollection(plugin.model.id)
385
+ environmentVariableCollection: this.terminalService.getEnvironmentVariableCollection(plugin.model.id),
386
+ extensionMode: 1 // @todo: implement proper `extensionMode`.
365
387
  };
366
388
  this.pluginContextsMap.set(plugin.model.id, pluginContext);
367
389
 
@@ -16,10 +16,9 @@
16
16
 
17
17
  import * as theia from '@theia/plugin';
18
18
  import { Event, Emitter } from '@theia/core/lib/common/event';
19
- import { StorageMain, StorageExt } from '../common/plugin-api-rpc';
19
+ import { PLUGIN_RPC_CONTEXT, StorageMain, StorageExt } from '../common/plugin-api-rpc';
20
20
  import { KeysToAnyValues, KeysToKeysToAnyValue } from '../common/types';
21
21
  import { RPCProtocol } from '../common/rpc-protocol';
22
- import { PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
23
22
 
24
23
  export class Memento implements theia.Memento {
25
24
 
@@ -60,6 +59,12 @@ export class Memento implements theia.Memento {
60
59
  }
61
60
  }
62
61
 
62
+ export class GlobalState extends Memento {
63
+
64
+ /** @todo: API is not yet implemented. */
65
+ setKeysForSync(keys: readonly string[]): void { }
66
+ }
67
+
63
68
  /**
64
69
  * Singleton.
65
70
  * Is used to proxy storage requests to main side.
@@ -17,8 +17,7 @@
17
17
  import { PreferenceRegistryExtImpl } from './preference-registry';
18
18
  import * as chai from 'chai';
19
19
  import { WorkspaceExtImpl } from '../plugin/workspace';
20
- import { RPCProtocol } from '../common/rpc-protocol';
21
- import { ProxyIdentifier } from '../common/rpc-protocol';
20
+ import { ProxyIdentifier, RPCProtocol } from '../common/rpc-protocol';
22
21
 
23
22
  const expect = chai.expect;
24
23
 
@@ -16,7 +16,7 @@
16
16
  /* eslint-disable @typescript-eslint/no-explicit-any */
17
17
  import {
18
18
  QuickOpenExt, PLUGIN_RPC_CONTEXT as Ext, QuickOpenMain, TransferInputBox, Plugin,
19
- Item, TransferQuickInputButton, TransferQuickPickItems, TransferQuickInput, TransferQuickPick
19
+ Item, TransferQuickInputButton, TransferQuickPickItems, TransferQuickInput
20
20
  } from '../common/plugin-api-rpc';
21
21
  import * as theia from '@theia/plugin';
22
22
  import { QuickPickItem, InputBoxOptions, InputBox, QuickPick, QuickInput } from '@theia/plugin';
@@ -178,10 +178,6 @@ export class QuickOpenExtImpl implements QuickOpenExt {
178
178
  return session;
179
179
  }
180
180
 
181
- showCustomQuickPick<T extends QuickPickItem>(options: TransferQuickPick<T>): void {
182
- this.proxy.$showCustomQuickPick(options);
183
- }
184
-
185
181
  hide(): void {
186
182
  this.proxy.$hide();
187
183
  }
@@ -263,7 +259,7 @@ export class QuickInputExt implements QuickInput {
263
259
  private onDidHideEmitter: Emitter<void>;
264
260
  private onDidTriggerButtonEmitter: Emitter<theia.QuickInputButton>;
265
261
  private _updateTimeout: any;
266
- private _pendingUpdate: TransferQuickInput<any> = { id: this._id };
262
+ private _pendingUpdate: TransferQuickInput = { id: this._id };
267
263
 
268
264
  constructor(readonly quickOpen: QuickOpenExtImpl, readonly quickOpenMain: QuickOpenMain, readonly plugin: Plugin, private _onDidDispose: () => void) {
269
265
  this.title = undefined;
@@ -389,6 +385,7 @@ export class QuickInputExt implements QuickInput {
389
385
  this._fireHide();
390
386
  this.disposableCollection.dispose();
391
387
  this._onDidDispose();
388
+ this.quickOpenMain.$dispose(this._id);
392
389
  }
393
390
 
394
391
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -617,7 +614,15 @@ export class QuickPickExt<T extends theia.QuickPickItem> extends QuickInputExt i
617
614
  this._itemsToHandles.set(item, i);
618
615
  });
619
616
  this.update({
620
- items
617
+ items: items.map((item, i) => ({
618
+ type: item.type,
619
+ label: item.label,
620
+ description: item.description,
621
+ handle: i,
622
+ detail: item.detail,
623
+ picked: item.picked,
624
+ alwaysShow: item.alwaysShow
625
+ }))
621
626
  });
622
627
  }
623
628
 
@@ -690,26 +695,4 @@ export class QuickPickExt<T extends theia.QuickPickItem> extends QuickInputExt i
690
695
  this._selectedItems = items;
691
696
  this._onDidChangeSelectionEmitter.fire(items);
692
697
  }
693
-
694
- show(): void {
695
- super.show();
696
- this.quickOpen.showCustomQuickPick({
697
- id: this._id,
698
- title: this.title,
699
- step: this.step,
700
- totalSteps: this.totalSteps,
701
- enabled: this.enabled,
702
- busy: this.busy,
703
- ignoreFocusOut: this.ignoreFocusOut,
704
- value: this.value,
705
- placeholder: this.placeholder,
706
- buttons: this.buttons,
707
- items: convertToTransferQuickPickItems(this.items),
708
- canSelectMany: this.canSelectMany,
709
- matchOnDescription: this.matchOnDescription,
710
- matchOnDetail: this.matchOnDetail,
711
- activeItems: this.activeItems,
712
- selectedItems: this.selectedItems
713
- });
714
- }
715
698
  }
@@ -29,6 +29,7 @@ import { TaskProviderAdapter } from './task-provider';
29
29
  import { Emitter, Event } from '@theia/core/lib/common/event';
30
30
  import { TerminalServiceExtImpl } from '../terminal-ext';
31
31
  import { UUID } from '@theia/core/shared/@phosphor/coreutils';
32
+ import { CancellationToken } from '@theia/core/lib/common/cancellation';
32
33
 
33
34
  type ExecutionCallback = (resolvedDefinition: theia.TaskDefinition) => Thenable<theia.Pseudoterminal>;
34
35
  export class TasksExtImpl implements TasksExt {
@@ -164,10 +165,10 @@ export class TasksExtImpl implements TasksExt {
164
165
  throw new Error('Task was not successfully transformed into a task config');
165
166
  }
166
167
 
167
- $provideTasks(handle: number, token: theia.CancellationToken): Promise<TaskDto[] | undefined> {
168
+ $provideTasks(handle: number): Promise<TaskDto[] | undefined> {
168
169
  const adapter = this.adaptersMap.get(handle);
169
170
  if (adapter) {
170
- return adapter.provideTasks(token).then(tasks => {
171
+ return adapter.provideTasks(CancellationToken.None).then(tasks => {
171
172
  if (tasks) {
172
173
  for (const task of tasks) {
173
174
  if (task.taskType === 'customExecution') {
@@ -13,10 +13,9 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { Plugin, TimelineCommandArg, TimelineExt, TimelineMain } from '../common';
16
+ import { Plugin, PLUGIN_RPC_CONTEXT, TimelineCommandArg, TimelineExt, TimelineMain } from '../common';
17
17
  import { RPCProtocol } from '../common/rpc-protocol';
18
18
  import { Disposable, URI } from './types-impl';
19
- import { PLUGIN_RPC_CONTEXT } from '../common';
20
19
  import { DisposableCollection } from '@theia/core/lib/common/disposable';
21
20
  import { CommandRegistryImpl } from './command-registry';
22
21
  import type {
@@ -26,7 +26,7 @@ import { LanguageFilter, LanguageSelector, RelativePattern } from '@theia/callhi
26
26
  import { isMarkdownString, MarkdownString } from './markdown-string';
27
27
  import * as types from './types-impl';
28
28
  import { UriComponents } from '../common/uri-components';
29
- import { TaskGroup } from './types-impl';
29
+ import { isReadonlyArray } from '../common/arrays';
30
30
 
31
31
  const SIDE_GROUP = -2;
32
32
  const ACTIVE_GROUP = -1;
@@ -168,10 +168,7 @@ export function fromRangeOrRangeWithMessage(ranges: theia.Range[] | theia.Decora
168
168
  };
169
169
  });
170
170
  } else {
171
- return ranges.map((r): DecorationOptions =>
172
- ({
173
- range: fromRange(r)!
174
- }));
171
+ return ranges.map(r => ({ range: fromRange(r) }));
175
172
  }
176
173
  }
177
174
 
@@ -213,7 +210,7 @@ export function toMarkdown(value: model.MarkdownString): MarkdownString {
213
210
  export function fromDocumentSelector(selector: theia.DocumentSelector | undefined): LanguageSelector | undefined {
214
211
  if (!selector) {
215
212
  return undefined;
216
- } else if (Array.isArray(selector)) {
213
+ } else if (isReadonlyArray(selector)) {
217
214
  return <LanguageSelector>selector.map(fromDocumentSelector);
218
215
  } else if (typeof selector === 'string') {
219
216
  return selector;
@@ -271,6 +268,8 @@ export function fromCompletionItemKind(kind?: types.CompletionItemKind): model.C
271
268
  case types.CompletionItemKind.Event: return model.CompletionItemKind.Event;
272
269
  case types.CompletionItemKind.Operator: return model.CompletionItemKind.Operator;
273
270
  case types.CompletionItemKind.TypeParameter: return model.CompletionItemKind.TypeParameter;
271
+ case types.CompletionItemKind.User: return model.CompletionItemKind.User;
272
+ case types.CompletionItemKind.Issue: return model.CompletionItemKind.Issue;
274
273
  }
275
274
  return model.CompletionItemKind.Property;
276
275
  }
@@ -302,6 +301,8 @@ export function toCompletionItemKind(kind?: model.CompletionItemKind): types.Com
302
301
  case model.CompletionItemKind.Event: return types.CompletionItemKind.Event;
303
302
  case model.CompletionItemKind.Operator: return types.CompletionItemKind.Operator;
304
303
  case model.CompletionItemKind.TypeParameter: return types.CompletionItemKind.TypeParameter;
304
+ case model.CompletionItemKind.User: return types.CompletionItemKind.User;
305
+ case model.CompletionItemKind.Issue: return types.CompletionItemKind.Issue;
305
306
  }
306
307
  return types.CompletionItemKind.Property;
307
308
  }
@@ -681,18 +682,24 @@ export function fromCallHierarchyItem(item: theia.CallHierarchyItem): model.Call
681
682
  detail: item.detail,
682
683
  uri: item.uri,
683
684
  range: fromRange(item.range),
684
- selectionRange: fromRange(item.selectionRange)
685
+ selectionRange: fromRange(item.selectionRange),
686
+ tags: item.tags,
687
+ data: item.data,
685
688
  };
686
689
  }
687
690
 
688
691
  export function toCallHierarchyItem(value: model.CallHierarchyItem): types.CallHierarchyItem {
689
- return new types.CallHierarchyItem(
692
+ const item = new types.CallHierarchyItem(
690
693
  SymbolKind.toSymbolKind(value.kind),
691
694
  value.name,
692
695
  value.detail ? value.detail : '',
693
696
  URI.revive(value.uri),
694
697
  toRange(value.range),
695
- toRange(value.selectionRange));
698
+ toRange(value.selectionRange),
699
+ );
700
+ item.tags = value.tags;
701
+ item.data = value.data;
702
+ return item;
696
703
  }
697
704
 
698
705
  export function toCallHierarchyIncomingCall(value: model.CallHierarchyIncomingCall): types.CallHierarchyIncomingCall {
@@ -741,9 +748,9 @@ export function fromTask(task: theia.Task): TaskDto | undefined {
741
748
  }
742
749
 
743
750
  const group = task.group;
744
- if (group === TaskGroup.Build) {
751
+ if (group === types.TaskGroup.Build) {
745
752
  taskDto.group = BUILD_GROUP;
746
- } else if (group === TaskGroup.Test) {
753
+ } else if (group === types.TaskGroup.Test) {
747
754
  taskDto.group = TEST_GROUP;
748
755
  }
749
756
 
@@ -830,9 +837,9 @@ export function toTask(taskDto: TaskDto): theia.Task {
830
837
 
831
838
  if (group) {
832
839
  if (group === BUILD_GROUP) {
833
- result.group = TaskGroup.Build;
840
+ result.group = types.TaskGroup.Build;
834
841
  } else if (group === TEST_GROUP) {
835
- result.group = TaskGroup.Test;
842
+ result.group = types.TaskGroup.Test;
836
843
  }
837
844
  }
838
845
 
@@ -189,6 +189,26 @@ export enum ColorThemeKind {
189
189
  HighContrast = 3
190
190
  }
191
191
 
192
+ export enum ExtensionMode {
193
+ /**
194
+ * The extension is installed normally (for example, from the marketplace
195
+ * or VSIX) in the editor.
196
+ */
197
+ Production = 1,
198
+
199
+ /**
200
+ * The extension is running from an `--extensionDevelopmentPath` provided
201
+ * when launching the editor.
202
+ */
203
+ Development = 2,
204
+
205
+ /**
206
+ * The extension is running from an `--extensionTestsPath` and
207
+ * the extension host is running unit tests.
208
+ */
209
+ Test = 3,
210
+ }
211
+
192
212
  /**
193
213
  * Represents the validation type of the Source Control input.
194
214
  */
@@ -892,7 +912,9 @@ export enum CompletionItemKind {
892
912
  Struct = 21,
893
913
  Event = 22,
894
914
  Operator = 23,
895
- TypeParameter = 24
915
+ TypeParameter = 24,
916
+ User = 25,
917
+ Issue = 26
896
918
  }
897
919
 
898
920
  @es5ClassCompat
@@ -2098,6 +2120,12 @@ export class DebugAdapterExecutable {
2098
2120
  }
2099
2121
  }
2100
2122
 
2123
+ export namespace DebugAdapterExecutable {
2124
+ export function is(adapter: theia.DebugAdapterDescriptor | undefined): adapter is theia.DebugAdapterExecutable {
2125
+ return !!adapter && 'command' in adapter;
2126
+ }
2127
+ }
2128
+
2101
2129
  /**
2102
2130
  * Represents a debug adapter running as a socket based server.
2103
2131
  */
@@ -2123,6 +2151,52 @@ export class DebugAdapterServer {
2123
2151
  }
2124
2152
  }
2125
2153
 
2154
+ export namespace DebugAdapterServer {
2155
+ export function is(adapter: theia.DebugAdapterDescriptor | undefined): adapter is DebugAdapterServer {
2156
+ return !!adapter && 'port' in adapter;
2157
+ }
2158
+ }
2159
+
2160
+ /**
2161
+ * Represents a debug adapter running as a Named Pipe (on Windows)/UNIX Domain Socket (on non-Windows) based server.
2162
+ */
2163
+ @es5ClassCompat
2164
+ export class DebugAdapterNamedPipeServer {
2165
+ /**
2166
+ * Create a description for a debug adapter running as a Named Pipe (on Windows)/UNIX Domain Socket (on non-Windows) based server.
2167
+ */
2168
+ constructor(readonly path: string) { }
2169
+ }
2170
+
2171
+ export namespace DebugAdapterNamedPipeServer {
2172
+ export function is(adapter: theia.DebugAdapterDescriptor | undefined): adapter is DebugAdapterNamedPipeServer {
2173
+ return !!adapter && 'path' in adapter;
2174
+ }
2175
+ }
2176
+
2177
+ /**
2178
+ * A debug adapter descriptor for an inline implementation.
2179
+ */
2180
+ @es5ClassCompat
2181
+ export class DebugAdapterInlineImplementation {
2182
+ implementation: theia.DebugAdapter;
2183
+
2184
+ /**
2185
+ * Create a descriptor for an inline implementation of a debug adapter.
2186
+ */
2187
+ constructor(impl: theia.DebugAdapter) {
2188
+ this.implementation = impl;
2189
+ }
2190
+ }
2191
+
2192
+ export namespace DebugAdapterInlineImplementation {
2193
+ export function is(adapter: theia.DebugAdapterDescriptor | undefined): adapter is DebugAdapterInlineImplementation {
2194
+ return !!adapter && 'implementation' in adapter;
2195
+ }
2196
+ }
2197
+
2198
+ export type DebugAdapterDescriptor = DebugAdapterExecutable | DebugAdapterServer | DebugAdapterNamedPipeServer | DebugAdapterInlineImplementation;
2199
+
2126
2200
  export enum LogLevel {
2127
2201
  Trace = 1,
2128
2202
  Debug = 2,
@@ -2344,6 +2418,8 @@ export class CallHierarchyItem {
2344
2418
  uri: URI;
2345
2419
  range: Range;
2346
2420
  selectionRange: Range;
2421
+ tags?: readonly SymbolTag[];
2422
+ data?: unknown;
2347
2423
 
2348
2424
  constructor(kind: SymbolKind, name: string, detail: string, uri: URI, range: Range, selectionRange: Range) {
2349
2425
  this.kind = kind;
@@ -15,10 +15,9 @@
15
15
  ********************************************************************************/
16
16
 
17
17
  import { v4 } from 'uuid';
18
- import { WebviewsExt, WebviewPanelViewState, WebviewsMain, PLUGIN_RPC_CONTEXT, WebviewInitData, /* WebviewsMain, PLUGIN_RPC_CONTEXT */ } from '../common/plugin-api-rpc';
18
+ import { Plugin, WebviewsExt, WebviewPanelViewState, WebviewsMain, PLUGIN_RPC_CONTEXT, WebviewInitData, /* WebviewsMain, PLUGIN_RPC_CONTEXT */ } from '../common/plugin-api-rpc';
19
19
  import * as theia from '@theia/plugin';
20
20
  import { RPCProtocol } from '../common/rpc-protocol';
21
- import { Plugin } from '../common/plugin-api-rpc';
22
21
  import { Emitter, Event } from '@theia/core/lib/common/event';
23
22
  import { fromViewColumn, toViewColumn, toWebviewPanelShowOptions } from './type-converters';
24
23
  import { Disposable, WebviewPanelTargetArea, URI } from './types-impl';