@theia/plugin-ext 1.18.0 → 1.21.0-next.12

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 (264) hide show
  1. package/README.md +5 -0
  2. package/lib/common/connection.d.ts +47 -34
  3. package/lib/common/connection.d.ts.map +1 -1
  4. package/lib/common/connection.js +90 -28
  5. package/lib/common/connection.js.map +1 -1
  6. package/lib/common/plugin-api-rpc-model.d.ts +2 -0
  7. package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
  8. package/lib/common/plugin-api-rpc-model.js.map +1 -1
  9. package/lib/common/plugin-api-rpc.d.ts +10 -11
  10. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  11. package/lib/common/plugin-api-rpc.js.map +1 -1
  12. package/lib/common/plugin-protocol.d.ts +3 -1
  13. package/lib/common/plugin-protocol.d.ts.map +1 -1
  14. package/lib/common/plugin-protocol.js.map +1 -1
  15. package/lib/hosted/browser/hosted-plugin.d.ts +4 -5
  16. package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
  17. package/lib/hosted/browser/hosted-plugin.js +18 -14
  18. package/lib/hosted/browser/hosted-plugin.js.map +1 -1
  19. package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts +1 -1
  20. package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts.map +1 -1
  21. package/lib/hosted/node/hosted-plugin-deployer-handler.js +14 -38
  22. package/lib/hosted/node/hosted-plugin-deployer-handler.js.map +1 -1
  23. package/lib/hosted/node/hosted-plugin-localization-service.d.ts +37 -0
  24. package/lib/hosted/node/hosted-plugin-localization-service.d.ts.map +1 -0
  25. package/lib/hosted/node/hosted-plugin-localization-service.js +197 -0
  26. package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -0
  27. package/lib/hosted/node/hosted-plugin-process.d.ts +2 -2
  28. package/lib/hosted/node/hosted-plugin-process.d.ts.map +1 -1
  29. package/lib/hosted/node/hosted-plugin-process.js +5 -7
  30. package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
  31. package/lib/hosted/node/plugin-ext-hosted-backend-module.d.ts.map +1 -1
  32. package/lib/hosted/node/plugin-ext-hosted-backend-module.js +2 -0
  33. package/lib/hosted/node/plugin-ext-hosted-backend-module.js.map +1 -1
  34. package/lib/hosted/node/plugin-manifest-loader.d.ts +1 -1
  35. package/lib/hosted/node/plugin-manifest-loader.d.ts.map +1 -1
  36. package/lib/hosted/node/plugin-manifest-loader.js +4 -52
  37. package/lib/hosted/node/plugin-manifest-loader.js.map +1 -1
  38. package/lib/hosted/node/plugin-service.d.ts +3 -6
  39. package/lib/hosted/node/plugin-service.d.ts.map +1 -1
  40. package/lib/hosted/node/plugin-service.js +7 -40
  41. package/lib/hosted/node/plugin-service.js.map +1 -1
  42. package/lib/hosted/node/scanners/scanner-theia.d.ts +1 -1
  43. package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
  44. package/lib/hosted/node/scanners/scanner-theia.js +5 -1
  45. package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
  46. package/lib/main/browser/callhierarchy/callhierarchy-type-converters.d.ts.map +1 -1
  47. package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js +5 -2
  48. package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js.map +1 -1
  49. package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +1 -2
  50. package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
  51. package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
  52. package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
  53. package/lib/main/browser/custom-editors/custom-editors-main.js +1 -2
  54. package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
  55. package/lib/main/browser/debug/debug-main.d.ts +3 -3
  56. package/lib/main/browser/debug/debug-main.d.ts.map +1 -1
  57. package/lib/main/browser/debug/debug-main.js +2 -3
  58. package/lib/main/browser/debug/debug-main.js.map +1 -1
  59. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +6 -6
  60. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
  61. package/lib/main/browser/debug/plugin-debug-session-factory.js +1 -1
  62. package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
  63. package/lib/main/browser/dialogs/modal-notification.d.ts +3 -3
  64. package/lib/main/browser/dialogs/modal-notification.d.ts.map +1 -1
  65. package/lib/main/browser/dialogs/modal-notification.js +17 -6
  66. package/lib/main/browser/dialogs/modal-notification.js.map +1 -1
  67. package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
  68. package/lib/main/browser/editors-and-documents-main.js +3 -4
  69. package/lib/main/browser/editors-and-documents-main.js.map +1 -1
  70. package/lib/main/browser/file-system-main-impl.js +1 -1
  71. package/lib/main/browser/file-system-main-impl.js.map +1 -1
  72. package/lib/main/browser/languages-main.js +1 -1
  73. package/lib/main/browser/languages-main.js.map +1 -1
  74. package/lib/main/browser/main-context.js +2 -2
  75. package/lib/main/browser/main-context.js.map +1 -1
  76. package/lib/main/browser/message-registry-main.js +1 -1
  77. package/lib/main/browser/message-registry-main.js.map +1 -1
  78. package/lib/main/browser/quick-open-main.d.ts +1 -1
  79. package/lib/main/browser/quick-open-main.d.ts.map +1 -1
  80. package/lib/main/browser/quick-open-main.js.map +1 -1
  81. package/lib/main/browser/tasks-main.d.ts.map +1 -1
  82. package/lib/main/browser/tasks-main.js +6 -0
  83. package/lib/main/browser/tasks-main.js.map +1 -1
  84. package/lib/main/browser/timeline-main.d.ts.map +1 -1
  85. package/lib/main/browser/timeline-main.js +1 -1
  86. package/lib/main/browser/timeline-main.js.map +1 -1
  87. package/lib/main/browser/view/plugin-view-registry.d.ts +3 -2
  88. package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
  89. package/lib/main/browser/view/plugin-view-registry.js +77 -26
  90. package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
  91. package/lib/main/browser/view/plugin-view-widget.d.ts +2 -0
  92. package/lib/main/browser/view/plugin-view-widget.d.ts.map +1 -1
  93. package/lib/main/browser/view/plugin-view-widget.js +3 -1
  94. package/lib/main/browser/view/plugin-view-widget.js.map +1 -1
  95. package/lib/main/browser/view/tree-view-widget.d.ts +3 -7
  96. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  97. package/lib/main/browser/view/tree-view-widget.js +26 -39
  98. package/lib/main/browser/view/tree-view-widget.js.map +1 -1
  99. package/lib/main/browser/webview/webview-frontend-security-warnings.d.ts.map +1 -1
  100. package/lib/main/browser/webview/webview-frontend-security-warnings.js +8 -5
  101. package/lib/main/browser/webview/webview-frontend-security-warnings.js.map +1 -1
  102. package/lib/main/browser/webview/webview-preferences.d.ts.map +1 -1
  103. package/lib/main/browser/webview/webview-preferences.js +3 -2
  104. package/lib/main/browser/webview/webview-preferences.js.map +1 -1
  105. package/lib/main/browser/webview/webview.d.ts +1 -1
  106. package/lib/main/browser/webview/webview.d.ts.map +1 -1
  107. package/lib/main/browser/webview/webview.js +1 -1
  108. package/lib/main/browser/webview/webview.js.map +1 -1
  109. package/lib/plugin/comments.d.ts.map +1 -1
  110. package/lib/plugin/comments.js +2 -3
  111. package/lib/plugin/comments.js.map +1 -1
  112. package/lib/plugin/custom-editors.d.ts +1 -2
  113. package/lib/plugin/custom-editors.d.ts.map +1 -1
  114. package/lib/plugin/custom-editors.js +2 -3
  115. package/lib/plugin/custom-editors.js.map +1 -1
  116. package/lib/plugin/decorations.d.ts.map +1 -1
  117. package/lib/plugin/decorations.js +2 -3
  118. package/lib/plugin/decorations.js.map +1 -1
  119. package/lib/plugin/document-data.d.ts.map +1 -1
  120. package/lib/plugin/document-data.js +1 -1
  121. package/lib/plugin/document-data.js.map +1 -1
  122. package/lib/plugin/documents.d.ts.map +1 -1
  123. package/lib/plugin/documents.js +1 -2
  124. package/lib/plugin/documents.js.map +1 -1
  125. package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
  126. package/lib/plugin/file-system-event-service-ext-impl.js +2 -3
  127. package/lib/plugin/file-system-event-service-ext-impl.js.map +1 -1
  128. package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
  129. package/lib/plugin/file-system-ext-impl.js +12 -13
  130. package/lib/plugin/file-system-ext-impl.js.map +1 -1
  131. package/lib/plugin/known-commands.spec.js +1 -2
  132. package/lib/plugin/known-commands.spec.js.map +1 -1
  133. package/lib/plugin/languages/call-hierarchy.d.ts +1 -1
  134. package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
  135. package/lib/plugin/languages/call-hierarchy.js +7 -3
  136. package/lib/plugin/languages/call-hierarchy.js.map +1 -1
  137. package/lib/plugin/languages/rename.d.ts +1 -2
  138. package/lib/plugin/languages/rename.d.ts.map +1 -1
  139. package/lib/plugin/languages/rename.js.map +1 -1
  140. package/lib/plugin/languages.d.ts +1 -1
  141. package/lib/plugin/languages.d.ts.map +1 -1
  142. package/lib/plugin/languages.js.map +1 -1
  143. package/lib/plugin/message-registry.d.ts.map +1 -1
  144. package/lib/plugin/message-registry.js +3 -0
  145. package/lib/plugin/message-registry.js.map +1 -1
  146. package/lib/plugin/node/debug/debug.d.ts +4 -4
  147. package/lib/plugin/node/debug/debug.d.ts.map +1 -1
  148. package/lib/plugin/node/debug/debug.js +13 -8
  149. package/lib/plugin/node/debug/debug.js.map +1 -1
  150. package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts +7 -7
  151. package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts.map +1 -1
  152. package/lib/plugin/node/debug/plugin-debug-adapter-session.js +6 -6
  153. package/lib/plugin/node/debug/plugin-debug-adapter-session.js.map +1 -1
  154. package/lib/plugin/node/debug/plugin-debug-adapter-starter.d.ts +8 -4
  155. package/lib/plugin/node/debug/plugin-debug-adapter-starter.d.ts.map +1 -1
  156. package/lib/plugin/node/debug/plugin-debug-adapter-starter.js +16 -13
  157. package/lib/plugin/node/debug/plugin-debug-adapter-starter.js.map +1 -1
  158. package/lib/plugin/plugin-context.d.ts.map +1 -1
  159. package/lib/plugin/plugin-context.js +5 -4
  160. package/lib/plugin/plugin-context.js.map +1 -1
  161. package/lib/plugin/plugin-storage.d.ts.map +1 -1
  162. package/lib/plugin/plugin-storage.js.map +1 -1
  163. package/lib/plugin/preference-registry.spec.js.map +1 -1
  164. package/lib/plugin/quick-open.d.ts +1 -1
  165. package/lib/plugin/quick-open.d.ts.map +1 -1
  166. package/lib/plugin/quick-open.js +11 -6
  167. package/lib/plugin/quick-open.js.map +1 -1
  168. package/lib/plugin/tasks/tasks.d.ts +1 -3
  169. package/lib/plugin/tasks/tasks.d.ts.map +1 -1
  170. package/lib/plugin/tasks/tasks.js +3 -17
  171. package/lib/plugin/tasks/tasks.js.map +1 -1
  172. package/lib/plugin/timeline.d.ts.map +1 -1
  173. package/lib/plugin/timeline.js +1 -2
  174. package/lib/plugin/timeline.js.map +1 -1
  175. package/lib/plugin/type-converters.d.ts.map +1 -1
  176. package/lib/plugin/type-converters.js +10 -7
  177. package/lib/plugin/type-converters.js.map +1 -1
  178. package/lib/plugin/types-impl.d.ts +34 -0
  179. package/lib/plugin/types-impl.d.ts.map +1 -1
  180. package/lib/plugin/types-impl.js +61 -1
  181. package/lib/plugin/types-impl.js.map +1 -1
  182. package/lib/plugin/webviews.d.ts +1 -2
  183. package/lib/plugin/webviews.d.ts.map +1 -1
  184. package/lib/plugin/webviews.js.map +1 -1
  185. package/package.json +26 -24
  186. package/src/common/connection.ts +98 -42
  187. package/src/common/plugin-api-rpc-model.ts +2 -0
  188. package/src/common/plugin-api-rpc.ts +10 -11
  189. package/src/common/plugin-protocol.ts +3 -2
  190. package/src/hosted/browser/hosted-plugin.ts +17 -12
  191. package/src/hosted/node/hosted-plugin-deployer-handler.ts +13 -40
  192. package/src/hosted/node/hosted-plugin-localization-service.ts +201 -0
  193. package/src/hosted/node/hosted-plugin-process.ts +4 -6
  194. package/src/hosted/node/plugin-ext-hosted-backend-module.ts +2 -0
  195. package/src/hosted/node/plugin-manifest-loader.ts +4 -56
  196. package/src/hosted/node/plugin-service.ts +7 -40
  197. package/src/hosted/node/scanners/scanner-theia.ts +6 -3
  198. package/src/main/browser/callhierarchy/callhierarchy-type-converters.ts +5 -2
  199. package/src/main/browser/custom-editors/custom-editor-opener.tsx +1 -2
  200. package/src/main/browser/custom-editors/custom-editors-main.ts +1 -2
  201. package/src/main/browser/debug/debug-main.ts +4 -5
  202. package/src/main/browser/debug/plugin-debug-session-factory.ts +6 -6
  203. package/src/main/browser/dialogs/modal-notification.ts +18 -7
  204. package/src/main/browser/dialogs/style/modal-notification.css +17 -2
  205. package/src/main/browser/editors-and-documents-main.ts +1 -2
  206. package/src/main/browser/file-system-main-impl.ts +1 -1
  207. package/src/main/browser/languages-main.ts +1 -1
  208. package/src/main/browser/main-context.ts +3 -3
  209. package/src/main/browser/message-registry-main.ts +1 -1
  210. package/src/main/browser/quick-open-main.ts +1 -1
  211. package/src/main/browser/style/tree.css +4 -0
  212. package/src/main/browser/tasks-main.ts +7 -0
  213. package/src/main/browser/timeline-main.ts +1 -2
  214. package/src/main/browser/view/plugin-view-registry.ts +83 -28
  215. package/src/main/browser/view/plugin-view-widget.ts +7 -2
  216. package/src/main/browser/view/tree-view-widget.tsx +43 -65
  217. package/src/main/browser/webview/pre/host.js +3 -4
  218. package/src/main/browser/webview/webview-frontend-security-warnings.ts +8 -7
  219. package/src/main/browser/webview/webview-preferences.ts +3 -2
  220. package/src/main/browser/webview/webview.ts +1 -1
  221. package/src/plugin/comments.ts +1 -2
  222. package/src/plugin/custom-editors.ts +2 -4
  223. package/src/plugin/decorations.ts +1 -2
  224. package/src/plugin/document-data.ts +1 -2
  225. package/src/plugin/documents.ts +1 -2
  226. package/src/plugin/file-system-event-service-ext-impl.ts +1 -2
  227. package/src/plugin/file-system-ext-impl.ts +1 -2
  228. package/src/plugin/known-commands.spec.ts +1 -2
  229. package/src/plugin/languages/call-hierarchy.ts +13 -5
  230. package/src/plugin/languages/rename.ts +1 -2
  231. package/src/plugin/languages.ts +3 -1
  232. package/src/plugin/message-registry.ts +3 -1
  233. package/src/plugin/node/debug/debug.ts +20 -14
  234. package/src/plugin/node/debug/plugin-debug-adapter-session.ts +9 -9
  235. package/src/plugin/node/debug/plugin-debug-adapter-starter.ts +17 -14
  236. package/src/plugin/plugin-context.ts +10 -7
  237. package/src/plugin/plugin-storage.ts +1 -2
  238. package/src/plugin/preference-registry.spec.ts +1 -2
  239. package/src/plugin/quick-open.ts +14 -10
  240. package/src/plugin/tasks/tasks.ts +4 -18
  241. package/src/plugin/timeline.ts +1 -2
  242. package/src/plugin/type-converters.ts +12 -8
  243. package/src/plugin/types-impl.ts +53 -0
  244. package/src/plugin/webviews.ts +1 -2
  245. package/lib/common/plugin-message-reader.d.ts +0 -46
  246. package/lib/common/plugin-message-reader.d.ts.map +0 -1
  247. package/lib/common/plugin-message-reader.js +0 -116
  248. package/lib/common/plugin-message-reader.js.map +0 -1
  249. package/lib/common/plugin-message-writer.d.ts +0 -38
  250. package/lib/common/plugin-message-writer.d.ts.map +0 -1
  251. package/lib/common/plugin-message-writer.js +0 -67
  252. package/lib/common/plugin-message-writer.js.map +0 -1
  253. package/lib/main/browser/connection-main.d.ts +0 -59
  254. package/lib/main/browser/connection-main.d.ts.map +0 -1
  255. package/lib/main/browser/connection-main.js +0 -98
  256. package/lib/main/browser/connection-main.js.map +0 -1
  257. package/lib/plugin/connection-ext.d.ts +0 -56
  258. package/lib/plugin/connection-ext.d.ts.map +0 -1
  259. package/lib/plugin/connection-ext.js +0 -88
  260. package/lib/plugin/connection-ext.js.map +0 -1
  261. package/src/common/plugin-message-reader.ts +0 -111
  262. package/src/common/plugin-message-writer.ts +0 -65
  263. package/src/main/browser/connection-main.ts +0 -107
  264. package/src/plugin/connection-ext.ts +0 -95
@@ -16,13 +16,11 @@
16
16
  import { injectable, inject, named, postConstruct } from '@theia/core/shared/inversify';
17
17
  import { HostedPluginServer, HostedPluginClient, PluginDeployer, GetDeployedPluginsParams, DeployedPlugin } from '../../common/plugin-protocol';
18
18
  import { HostedPluginSupport } from './hosted-plugin';
19
- import { ILogger, Disposable } from '@theia/core';
20
- import { ContributionProvider } from '@theia/core';
19
+ import { ILogger, Disposable, ContributionProvider } from '@theia/core';
21
20
  import { ExtPluginApiProvider, ExtPluginApi } from '../../common/plugin-ext-api-contribution';
22
21
  import { HostedPluginDeployerHandler } from './hosted-plugin-deployer-handler';
23
22
  import { PluginDeployerImpl } from '../../main/node/plugin-deployer-impl';
24
- import { LocalizationProvider } from '@theia/core/lib/node/i18n/localization-provider';
25
- import { loadManifest } from './plugin-manifest-loader';
23
+ import { HostedPluginLocalizationService } from './hosted-plugin-localization-service';
26
24
 
27
25
  @injectable()
28
26
  export class HostedPluginServerImpl implements HostedPluginServer {
@@ -35,8 +33,8 @@ export class HostedPluginServerImpl implements HostedPluginServer {
35
33
  @inject(PluginDeployer)
36
34
  protected readonly pluginDeployer: PluginDeployerImpl;
37
35
 
38
- @inject(LocalizationProvider)
39
- protected readonly localizationProvider: LocalizationProvider;
36
+ @inject(HostedPluginLocalizationService)
37
+ protected readonly localizationService: HostedPluginLocalizationService;
40
38
 
41
39
  @inject(ContributionProvider)
42
40
  @named(Symbol.for(ExtPluginApiProvider))
@@ -90,8 +88,7 @@ export class HostedPluginServerImpl implements HostedPluginServer {
90
88
  if (!pluginIds.length) {
91
89
  return [];
92
90
  }
93
- const locale = this.localizationProvider.getCurrentLanguage();
94
- const plugins = [];
91
+ const plugins: DeployedPlugin[] = [];
95
92
  let extraDeployedPlugins: Map<string, DeployedPlugin> | undefined;
96
93
  for (const pluginId of pluginIds) {
97
94
  let plugin = this.deployerHandler.getDeployedPlugin(pluginId);
@@ -105,10 +102,10 @@ export class HostedPluginServerImpl implements HostedPluginServer {
105
102
  plugin = extraDeployedPlugins.get(pluginId);
106
103
  }
107
104
  if (plugin) {
108
- plugins.push(await this.localizePlugin(plugin, locale));
105
+ plugins.push(plugin);
109
106
  }
110
107
  }
111
- return plugins;
108
+ return Promise.all(plugins.map(plugin => this.localizationService.localizePlugin(plugin)));
112
109
  }
113
110
 
114
111
  onMessage(pluginHostId: string, message: string): Promise<void> {
@@ -119,34 +116,4 @@ export class HostedPluginServerImpl implements HostedPluginServer {
119
116
  getExtPluginAPI(): Promise<ExtPluginApi[]> {
120
117
  return Promise.resolve(this.extPluginAPIContributions.getContributions().map(p => p.provideApi()));
121
118
  }
122
-
123
- protected async localizePlugin(plugin: DeployedPlugin, locale: string): Promise<DeployedPlugin> {
124
- const packagePath = plugin.metadata.model.packagePath;
125
- const translatedManifest = await loadManifest(packagePath, locale);
126
- this.mergeContributes(plugin.contributes, translatedManifest.contributes);
127
- return plugin;
128
- }
129
-
130
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
131
- protected mergeContributes(main: any, other: any): void {
132
- if (main && other) {
133
- if (Array.isArray(main) && Array.isArray(other)) {
134
- for (let i = 0; i < main.length && i < other.length; i++) {
135
- if (typeof main[i] === 'object' && typeof other[i] === 'object') {
136
- this.mergeContributes(main[i], other[i]);
137
- }
138
- }
139
- } else {
140
- for (const [key, value] of Object.entries(main)) {
141
- if (key in other) {
142
- if (typeof value === 'string') {
143
- main[key] = other[key];
144
- } else if (typeof value === 'object' && typeof other[key] === 'object') {
145
- this.mergeContributes(main[key], other[key]);
146
- }
147
- }
148
- }
149
- }
150
- }
151
- }
152
119
  }
@@ -73,8 +73,7 @@ import {
73
73
  ProblemPatternContribution,
74
74
  TaskDefinition
75
75
  } from '@theia/task/lib/common/task-protocol';
76
- // eslint-disable-next-line @theia/runtime-import-check
77
- import { ColorDefinition } from '@theia/core/lib/browser/color-registry';
76
+ import { ColorDefinition } from '@theia/core/lib/common/color';
78
77
  import { ResourceLabelFormatter } from '@theia/core/lib/common/label-protocol';
79
78
  import { PluginUriFactory } from './plugin-uri-factory';
80
79
 
@@ -382,6 +381,7 @@ export class TheiaPluginScanner implements PluginScanner {
382
381
  throw new Error(`Could not read json file '${packageTranslation.path}'.`);
383
382
  }
384
383
  translation.id = packageTranslation.id;
384
+ translation.path = packageTranslation.path;
385
385
  return translation;
386
386
  }
387
387
 
@@ -554,10 +554,13 @@ export class TheiaPluginScanner implements PluginScanner {
554
554
  }
555
555
 
556
556
  private readViewContainer(rawViewContainer: PluginPackageViewContainer, pck: PluginPackage): ViewContainer {
557
+ const themeIcon = rawViewContainer.icon.startsWith('$(') ? rawViewContainer.icon : undefined;
558
+ const iconUrl = this.toPluginUrl(pck, rawViewContainer.icon);
557
559
  return {
558
560
  id: rawViewContainer.id,
559
561
  title: rawViewContainer.title,
560
- iconUrl: this.toPluginUrl(pck, rawViewContainer.icon)
562
+ iconUrl,
563
+ themeIcon,
561
564
  };
562
565
  }
563
566
 
@@ -152,7 +152,8 @@ export function toDefinition(definition: model.CallHierarchyDefinition | undefin
152
152
  symbolName: definition.name,
153
153
  symbolKind: SymbolKindConverter.toSymbolKind(definition.kind),
154
154
  containerName: undefined,
155
- tags: definition.tags
155
+ tags: definition.tags,
156
+ data: definition.data,
156
157
  };
157
158
  }
158
159
 
@@ -162,7 +163,9 @@ export function fromDefinition(definition: CallHierarchyDefinition): model.CallH
162
163
  range: fromRange(definition.location.range),
163
164
  selectionRange: fromRange(definition.selectionRange),
164
165
  name: definition.symbolName,
165
- kind: SymbolKindConverter.fromSymbolKind(definition.symbolKind)
166
+ kind: SymbolKindConverter.fromSymbolKind(definition.symbolKind),
167
+ tags: definition.tags,
168
+ data: definition.data,
166
169
  };
167
170
  }
168
171
 
@@ -17,9 +17,8 @@
17
17
  import { inject } from '@theia/core/shared/inversify';
18
18
  import URI from '@theia/core/lib/common/uri';
19
19
  import { ApplicationShell, OpenerOptions, OpenHandler, Widget, WidgetManager } from '@theia/core/lib/browser';
20
- import { CustomEditorPriority, CustomEditorSelector } from '../../../common';
20
+ import { CustomEditor, CustomEditorPriority, CustomEditorSelector } from '../../../common';
21
21
  import * as glob from './glob';
22
- import { CustomEditor } from '../../../common';
23
22
  import { CustomEditorWidget } from './custom-editor-widget';
24
23
  import { v4 } from 'uuid';
25
24
  import { Emitter } from '@theia/core';
@@ -20,7 +20,7 @@
20
20
  // some code copied and modified from https://github.com/microsoft/vscode/blob/53eac52308c4611000a171cc7bf1214293473c78/src/vs/workbench/api/browser/mainThreadCustomEditors.ts
21
21
 
22
22
  import { interfaces } from '@theia/core/shared/inversify';
23
- import { MAIN_RPC_CONTEXT, CustomEditorsMain, CustomEditorsExt, CustomTextEditorCapabilities } from '../../../common/plugin-api-rpc';
23
+ import { MAIN_RPC_CONTEXT, CustomEditorsMain, CustomEditorsExt, CustomTextEditorCapabilities, EditorPosition } from '../../../common/plugin-api-rpc';
24
24
  import { RPCProtocol } from '../../../common/rpc-protocol';
25
25
  import { HostedPluginSupport } from '../../../hosted/browser/hosted-plugin';
26
26
  import { PluginCustomEditorRegistry } from './plugin-custom-editor-registry';
@@ -43,7 +43,6 @@ import { ApplicationShell, DefaultUriLabelProviderContribution, Saveable, SaveOp
43
43
  import { WebviewOptions, WebviewPanelOptions, ViewColumn } from '@theia/plugin';
44
44
  import { WebviewWidgetIdentifier } from '../webview/webview';
45
45
  import { EditorPreferences } from '@theia/editor/lib/browser';
46
- import { EditorPosition } from '../../../common/plugin-api-rpc';
47
46
 
48
47
  const enum CustomEditorModelType {
49
48
  Custom,
@@ -32,19 +32,17 @@ import { DebugSourceBreakpoint } from '@theia/debug/lib/browser/model/debug-sour
32
32
  import { URI as Uri } from '@theia/core/shared/vscode-uri';
33
33
  import { SourceBreakpoint, FunctionBreakpoint } from '@theia/debug/lib/browser/breakpoint/breakpoint-marker';
34
34
  import { DebugConfiguration, DebugSessionOptions } from '@theia/debug/lib/common/debug-configuration';
35
- import { ConnectionMainImpl } from '../connection-main';
36
35
  import { DebuggerDescription } from '@theia/debug/lib/common/debug-service';
37
36
  import { DebugProtocol } from 'vscode-debugprotocol';
38
37
  import { DebugConfigurationManager } from '@theia/debug/lib/browser/debug-configuration-manager';
39
38
  import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
40
39
  import { MessageClient } from '@theia/core/lib/common/message-service-protocol';
41
- import { OutputChannelManager } from '@theia/output/lib/common/output-channel';
40
+ import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
42
41
  import { DebugPreferences } from '@theia/debug/lib/browser/debug-preferences';
43
42
  import { PluginDebugAdapterContribution } from './plugin-debug-adapter-contribution';
44
43
  import { PluginDebugSessionContributionRegistrator, PluginDebugSessionContributionRegistry } from './plugin-debug-session-contribution-registry';
45
44
  import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
46
45
  import { PluginDebugSessionFactory } from './plugin-debug-session-factory';
47
- import { PluginWebSocketChannel } from '../../../common/connection';
48
46
  import { PluginDebugAdapterContributionRegistrator, PluginDebugService } from './plugin-debug-service';
49
47
  import { HostedPluginSupport } from '../../../hosted/browser/hosted-plugin';
50
48
  import { DebugFunctionBreakpoint } from '@theia/debug/lib/browser/model/debug-function-breakpoint';
@@ -53,6 +51,7 @@ import { ConsoleSessionManager } from '@theia/console/lib/browser/console-sessio
53
51
  import { DebugConsoleSession } from '@theia/debug/lib/browser/console/debug-console-session';
54
52
  import { ContributionProvider } from '@theia/core/lib/common';
55
53
  import { DebugContribution } from '@theia/debug/lib/browser/debug-contribution';
54
+ import { ConnectionImpl } from '../../../common/connection';
56
55
 
57
56
  export class DebugMainImpl implements DebugMain, Disposable {
58
57
  private readonly debugExt: DebugExt;
@@ -76,7 +75,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
76
75
  private readonly debuggerContributions = new Map<string, DisposableCollection>();
77
76
  private readonly toDispose = new DisposableCollection();
78
77
 
79
- constructor(rpc: RPCProtocol, readonly connectionMain: ConnectionMainImpl, container: interfaces.Container) {
78
+ constructor(rpc: RPCProtocol, readonly connectionMain: ConnectionImpl, container: interfaces.Container) {
80
79
  this.debugExt = rpc.getProxy(MAIN_RPC_CONTEXT.DEBUG_EXT);
81
80
  this.sessionManager = container.get(DebugSessionManager);
82
81
  this.labelProvider = container.get(LabelProvider);
@@ -149,7 +148,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
149
148
  this.debugPreferences,
150
149
  async (sessionId: string) => {
151
150
  const connection = await this.connectionMain.ensureConnection(sessionId);
152
- return new PluginWebSocketChannel(connection);
151
+ return connection;
153
152
  },
154
153
  this.fileService,
155
154
  terminalOptionsExt,
@@ -14,23 +14,23 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
 
17
- import { DefaultDebugSessionFactory, } from '@theia/debug/lib/browser/debug-session-contribution';
17
+ import { DefaultDebugSessionFactory } from '@theia/debug/lib/browser/debug-session-contribution';
18
18
  import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
19
19
  import { EditorManager } from '@theia/editor/lib/browser/editor-manager';
20
20
  import { BreakpointManager } from '@theia/debug/lib/browser/breakpoint/breakpoint-manager';
21
21
  import { LabelProvider } from '@theia/core/lib/browser/label-provider';
22
22
  import { MessageClient } from '@theia/core/lib/common/message-service-protocol';
23
- import { OutputChannelManager } from '@theia/output/lib/common/output-channel';
23
+ import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
24
24
  import { DebugPreferences } from '@theia/debug/lib/browser/debug-preferences';
25
25
  import { DebugSessionOptions } from '@theia/debug/lib/browser/debug-session-options';
26
26
  import { DebugSession } from '@theia/debug/lib/browser/debug-session';
27
27
  import { DebugSessionConnection } from '@theia/debug/lib/browser/debug-session-connection';
28
- import { IWebSocket } from '@theia/core/shared/vscode-ws-jsonrpc';
29
28
  import { TerminalWidgetOptions, TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget';
30
29
  import { TerminalOptionsExt } from '../../../common/plugin-api-rpc';
31
30
  import { FileService } from '@theia/filesystem/lib/browser/file-service';
32
31
  import { DebugContribution } from '@theia/debug/lib/browser/debug-contribution';
33
- import { ContributionProvider } from '@theia/core';
32
+ import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
33
+ import { Channel } from '@theia/debug/lib/common/debug-service';
34
34
 
35
35
  export class PluginDebugSession extends DebugSession {
36
36
  constructor(
@@ -57,7 +57,7 @@ export class PluginDebugSession extends DebugSession {
57
57
 
58
58
  /**
59
59
  * Session factory for a client debug session that communicates with debug adapter contributed as plugin.
60
- * The main difference is to use a connection factory that creates [IWebSocket](#IWebSocket) over Rpc channel.
60
+ * The main difference is to use a connection factory that creates [Channel](#Channel) over Rpc channel.
61
61
  */
62
62
  export class PluginDebugSessionFactory extends DefaultDebugSessionFactory {
63
63
  constructor(
@@ -68,7 +68,7 @@ export class PluginDebugSessionFactory extends DefaultDebugSessionFactory {
68
68
  protected readonly messages: MessageClient,
69
69
  protected readonly outputChannelManager: OutputChannelManager,
70
70
  protected readonly debugPreferences: DebugPreferences,
71
- protected readonly connectionFactory: (sessionId: string) => Promise<IWebSocket>,
71
+ protected readonly connectionFactory: (sessionId: string) => Promise<Channel>,
72
72
  protected readonly fileService: FileService,
73
73
  protected readonly terminalOptionsExt: TerminalOptionsExt | undefined,
74
74
  protected readonly debugContributionProvider: ContributionProvider<DebugContribution>
@@ -18,7 +18,8 @@ import { Message } from '@theia/core/shared/@phosphor/messaging';
18
18
  import { codiconArray, Key } from '@theia/core/lib/browser';
19
19
  import { AbstractDialog } from '@theia/core/lib/browser/dialogs';
20
20
  import '../../../../src/main/browser/dialogs/style/modal-notification.css';
21
- import { MainMessageItem } from '../../../common/plugin-api-rpc';
21
+ import { MainMessageItem, MainMessageOptions } from '../../../common/plugin-api-rpc';
22
+ import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
22
23
 
23
24
  export enum MessageType {
24
25
  Error = 'error',
@@ -29,6 +30,7 @@ export enum MessageType {
29
30
  const NOTIFICATION = 'modal-Notification';
30
31
  const ICON = 'icon';
31
32
  const TEXT = 'text';
33
+ const DETAIL = 'detail';
32
34
 
33
35
  @injectable()
34
36
  export class ModalNotification extends AbstractDialog<string | undefined> {
@@ -36,7 +38,7 @@ export class ModalNotification extends AbstractDialog<string | undefined> {
36
38
  protected actionTitle: string | undefined;
37
39
 
38
40
  constructor() {
39
- super({ title: 'Theia' });
41
+ super({ title: FrontendApplicationConfigProvider.get().applicationName });
40
42
  }
41
43
 
42
44
  protected onCloseRequest(msg: Message): void {
@@ -48,12 +50,12 @@ export class ModalNotification extends AbstractDialog<string | undefined> {
48
50
  return this.actionTitle;
49
51
  }
50
52
 
51
- showDialog(messageType: MessageType, text: string, actions: MainMessageItem[]): Promise<string | undefined> {
52
- this.contentNode.appendChild(this.createMessageNode(messageType, text, actions));
53
+ showDialog(messageType: MessageType, text: string, options: MainMessageOptions, actions: MainMessageItem[]): Promise<string | undefined> {
54
+ this.contentNode.appendChild(this.createMessageNode(messageType, text, options, actions));
53
55
  return this.open();
54
56
  }
55
57
 
56
- protected createMessageNode(messageType: MessageType, text: string, actions: MainMessageItem[]): HTMLElement {
58
+ protected createMessageNode(messageType: MessageType, text: string, options: MainMessageOptions, actions: MainMessageItem[]): HTMLElement {
57
59
  const messageNode = document.createElement('div');
58
60
  messageNode.classList.add(NOTIFICATION);
59
61
 
@@ -67,6 +69,13 @@ export class ModalNotification extends AbstractDialog<string | undefined> {
67
69
  const textElement = textContainer.appendChild(document.createElement('p'));
68
70
  textElement.textContent = text;
69
71
 
72
+ if (options.detail) {
73
+ const detailContainer = textContainer.appendChild(document.createElement('div'));
74
+ detailContainer.classList.add(DETAIL);
75
+ const detailElement = detailContainer.appendChild(document.createElement('p'));
76
+ detailElement.textContent = options.detail;
77
+ }
78
+
70
79
  actions.forEach((action: MainMessageItem) => {
71
80
  const button = this.createButton(action.title);
72
81
  button.classList.add('main');
@@ -79,8 +88,10 @@ export class ModalNotification extends AbstractDialog<string | undefined> {
79
88
  },
80
89
  'click');
81
90
  });
82
- if (!actions.some(action => action.isCloseAffordance === true)) {
83
- this.appendCloseButton('close');
91
+ if (actions.length <= 0) {
92
+ this.appendAcceptButton();
93
+ } else if (!actions.some(action => action.isCloseAffordance === true)) {
94
+ this.appendCloseButton('Close');
84
95
  }
85
96
 
86
97
  return messageNode;
@@ -42,10 +42,10 @@
42
42
  order: 1;
43
43
  }
44
44
 
45
- .modal-Notification .icon .fa {
45
+ .modal-Notification .icon .codicon {
46
46
  line-height: inherit;
47
47
  vertical-align: middle;
48
- font-size: 120%;
48
+ font-size: calc(var(--theia-ui-padding)*5);
49
49
  color: var(--theia-editorInfo-foreground);
50
50
  }
51
51
 
@@ -106,3 +106,18 @@
106
106
  .modal-Notification .buttons > button:hover {
107
107
  background-color: var(--theia-button-hoverBackground);
108
108
  }
109
+
110
+ .modal-Notification .detail {
111
+ align-self: center;
112
+ order: 3;
113
+ flex: 1 100%;
114
+ color: var(--theia-descriptionForeground);
115
+ }
116
+
117
+ .modal-Notification .detail > p {
118
+ margin: calc(var(--theia-ui-padding) * 2) 0px 0px 0px;
119
+ }
120
+
121
+ .modal-Notification .text {
122
+ padding: calc(var(--theia-ui-padding)*1.5);
123
+ }
@@ -29,8 +29,7 @@ import { EditorModelService } from './text-editor-model-service';
29
29
  import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model';
30
30
  import { MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor';
31
31
  import { TextEditorMain } from './text-editor-main';
32
- import { Emitter } from '@theia/core';
33
- import { DisposableCollection } from '@theia/core';
32
+ import { DisposableCollection, Emitter } from '@theia/core';
34
33
  import { EditorManager, EditorWidget } from '@theia/editor/lib/browser';
35
34
 
36
35
  export class EditorsAndDocumentsMain implements Disposable {
@@ -123,7 +123,7 @@ export class FileSystemMainImpl implements FileSystemMain, Disposable {
123
123
  }
124
124
 
125
125
  $mkdir(uri: UriComponents): Promise<void> {
126
- return this._fileService.createFolder(new CoreURI(URI.revive(uri)))
126
+ return this._fileService.createFolder(new CoreURI(URI.revive(uri)), { fromUserGesture: false })
127
127
  .then(() => undefined).catch(FileSystemMainImpl._handleError);
128
128
  }
129
129
 
@@ -774,7 +774,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
774
774
  selector: language,
775
775
  getRootDefinition: (uri: DocumentUri, position: Position, cancellationToken: CancellationToken) =>
776
776
  this.proxy.$provideRootDefinition(handle, toUriComponents(uri), fromPosition(position), cancellationToken)
777
- .then(def => toDefinition(def)),
777
+ .then(def => Array.isArray(def) ? def.map(item => toDefinition(item)) : toDefinition(def)),
778
778
  getCallers: (definition: Definition, cancellationToken: CancellationToken) => this.proxy.$provideCallers(handle, fromDefinition(definition), cancellationToken)
779
779
  .then(result => {
780
780
  if (!result) {
@@ -18,7 +18,7 @@ import { CommandRegistryMainImpl } from './command-registry-main';
18
18
  import { PreferenceRegistryMainImpl } from './preference-registry-main';
19
19
  import { QuickOpenMainImpl } from './quick-open-main';
20
20
  import { RPCProtocol } from '../../common/rpc-protocol';
21
- import { PLUGIN_RPC_CONTEXT, LanguagesMainFactory, OutputChannelRegistryFactory } from '../../common/plugin-api-rpc';
21
+ import { PLUGIN_RPC_CONTEXT, LanguagesMainFactory, OutputChannelRegistryFactory, MAIN_RPC_CONTEXT } from '../../common/plugin-api-rpc';
22
22
  import { MessageRegistryMainImpl } from './message-registry-main';
23
23
  import { WindowStateMain } from './window-state-main';
24
24
  import { WorkspaceMainImpl } from './workspace-main';
@@ -29,7 +29,7 @@ import { TerminalServiceMainImpl } from './terminal-main';
29
29
  import { DialogsMainImpl } from './dialogs-main';
30
30
  import { TreeViewsMainImpl } from './view/tree-views-main';
31
31
  import { NotificationMainImpl } from './notification-main';
32
- import { ConnectionMainImpl } from './connection-main';
32
+ import { ConnectionImpl } from '../../common/connection';
33
33
  import { WebviewsMainImpl } from './webviews-main';
34
34
  import { TasksMainImpl } from './tasks-main';
35
35
  import { StorageMainImpl } from './plugin-storage';
@@ -130,7 +130,7 @@ export function setUpPluginApi(rpc: RPCProtocol, container: interfaces.Container
130
130
  const storageMain = new StorageMainImpl(container);
131
131
  rpc.set(PLUGIN_RPC_CONTEXT.STORAGE_MAIN, storageMain);
132
132
 
133
- const connectionMain = new ConnectionMainImpl(rpc);
133
+ const connectionMain = new ConnectionImpl(rpc.getProxy(MAIN_RPC_CONTEXT.CONNECTION_EXT));
134
134
  rpc.set(PLUGIN_RPC_CONTEXT.CONNECTION_MAIN, connectionMain);
135
135
 
136
136
  const tasksMain = new TasksMainImpl(rpc, container);
@@ -40,7 +40,7 @@ export class MessageRegistryMainImpl implements MessageRegistryMain {
40
40
  type === MainMessageType.Warning ? MessageType.Warning :
41
41
  MessageType.Info;
42
42
  const modalNotification = new ModalNotification();
43
- return modalNotification.showDialog(messageType, message, actions);
43
+ return modalNotification.showDialog(messageType, message, options, actions);
44
44
  }
45
45
  switch (type) {
46
46
  case MainMessageType.Info:
@@ -194,7 +194,7 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
194
194
 
195
195
  private sessions = new Map<number, QuickInputSession>();
196
196
 
197
- $createOrUpdate<T extends theia.QuickPickItem>(params: TransferQuickInput<T>): Promise<void> {
197
+ $createOrUpdate<T extends theia.QuickPickItem>(params: TransferQuickInput): Promise<void> {
198
198
  const sessionId = params.id;
199
199
  let session = this.sessions.get(sessionId);
200
200
  if (!session) {
@@ -40,3 +40,7 @@
40
40
  margin-bottom: 10px;
41
41
  margin-left: 17px;
42
42
  }
43
+
44
+ .theia-tree-view .theia-TreeNode:not(:hover):not(.theia-mod-selected) .theia-tree-view-inline-action {
45
+ display: none;
46
+ }
@@ -97,6 +97,13 @@ export class TasksMainImpl implements TasksMain, Disposable {
97
97
  this.proxy.$onDidEndTaskProcess(event.code, event.taskId);
98
98
  }
99
99
  }));
100
+
101
+ // Inform proxy about running tasks form previous session
102
+ this.$taskExecutions().then(executions => {
103
+ if (executions.length > 0) {
104
+ this.proxy.$initLoadedTasks(executions);
105
+ }
106
+ });
100
107
  }
101
108
 
102
109
  dispose(): void {
@@ -14,12 +14,11 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import { interfaces } from '@theia/core/shared/inversify';
17
- import { TimelineMain } from '../../common/plugin-api-rpc';
17
+ import { MAIN_RPC_CONTEXT, TimelineExt, TimelineMain } from '../../common/plugin-api-rpc';
18
18
  import { RPCProtocol } from '../../common/rpc-protocol';
19
19
  import { TimelineService } from '@theia/timeline/lib/browser/timeline-service';
20
20
  import { Emitter } from '@theia/core/lib/common';
21
21
  import { URI } from '@theia/core/shared/vscode-uri';
22
- import { MAIN_RPC_CONTEXT, TimelineExt } from '../../common/plugin-api-rpc';
23
22
  import {
24
23
  InternalTimelineOptions,
25
24
  Timeline,