@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
@@ -73,6 +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
76
77
  import { ColorDefinition } from '@theia/core/lib/browser/color-registry';
77
78
  import { ResourceLabelFormatter } from '@theia/core/lib/common/label-protocol';
78
79
  import { PluginUriFactory } from './plugin-uri-factory';
@@ -217,7 +218,7 @@ export class TheiaPluginScanner implements PluginScanner {
217
218
 
218
219
  for (const location of Object.keys(viewsContainers)) {
219
220
  const containers = this.readViewsContainers(viewsContainers[location], rawPlugin);
220
- const loc = location === 'activitybar' ? 'left' : location;
221
+ const loc = location === 'activitybar' ? 'left' : location === 'panel' ? 'bottom' : location;
221
222
  if (contributions.viewsContainers[loc]) {
222
223
  contributions.viewsContainers[loc] = contributions.viewsContainers[loc].concat(containers);
223
224
  } else {
@@ -381,6 +382,7 @@ export class TheiaPluginScanner implements PluginScanner {
381
382
  throw new Error(`Could not read json file '${packageTranslation.path}'.`);
382
383
  }
383
384
  translation.id = packageTranslation.id;
385
+ translation.path = packageTranslation.path;
384
386
  return translation;
385
387
  }
386
388
 
@@ -698,7 +700,7 @@ export class TheiaPluginScanner implements PluginScanner {
698
700
  taskType: definitionContribution.type,
699
701
  source: pluginName,
700
702
  properties: {
701
- required: definitionContribution.required,
703
+ required: definitionContribution.required || [],
702
704
  all: propertyKeys,
703
705
  schema: definitionContribution
704
706
  }
@@ -151,7 +151,9 @@ export function toDefinition(definition: model.CallHierarchyDefinition | undefin
151
151
  selectionRange: toRange(definition.selectionRange),
152
152
  symbolName: definition.name,
153
153
  symbolKind: SymbolKindConverter.toSymbolKind(definition.kind),
154
- containerName: undefined
154
+ containerName: undefined,
155
+ tags: definition.tags,
156
+ data: definition.data,
155
157
  };
156
158
  }
157
159
 
@@ -161,7 +163,9 @@ export function fromDefinition(definition: CallHierarchyDefinition): model.CallH
161
163
  range: fromRange(definition.location.range),
162
164
  selectionRange: fromRange(definition.selectionRange),
163
165
  name: definition.symbolName,
164
- kind: SymbolKindConverter.fromSymbolKind(definition.symbolKind)
166
+ kind: SymbolKindConverter.fromSymbolKind(definition.symbolKind),
167
+ tags: definition.tags,
168
+ data: definition.data,
165
169
  };
166
170
  }
167
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';
@@ -37,10 +36,14 @@ export class CustomEditorOpener implements OpenHandler {
37
36
  @inject(ApplicationShell) protected readonly shell: ApplicationShell,
38
37
  @inject(WidgetManager) protected readonly widgetManager: WidgetManager
39
38
  ) {
40
- this.id = `custom-editor-${this.editor.viewType}`;
39
+ this.id = CustomEditorOpener.toCustomEditorId(this.editor.viewType);
41
40
  this.label = this.editor.displayName;
42
41
  }
43
42
 
43
+ static toCustomEditorId(editorViewType: string): string {
44
+ return `custom-editor-${editorViewType}`;
45
+ }
46
+
44
47
  canHandle(uri: URI): number {
45
48
  if (this.matches(this.editor.selector, uri)) {
46
49
  return this.getPriority();
@@ -52,7 +55,8 @@ export class CustomEditorOpener implements OpenHandler {
52
55
  switch (this.editor.priority) {
53
56
  case CustomEditorPriority.default: return 500;
54
57
  case CustomEditorPriority.builtin: return 400;
55
- case CustomEditorPriority.option: return 300;
58
+ /** `option` should not open the custom-editor by default. */
59
+ case CustomEditorPriority.option: return 1;
56
60
  default: return 200;
57
61
  }
58
62
  }
@@ -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,
@@ -38,7 +38,7 @@ import { DebugProtocol } from 'vscode-debugprotocol';
38
38
  import { DebugConfigurationManager } from '@theia/debug/lib/browser/debug-configuration-manager';
39
39
  import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
40
40
  import { MessageClient } from '@theia/core/lib/common/message-service-protocol';
41
- import { OutputChannelManager } from '@theia/output/lib/common/output-channel';
41
+ import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
42
42
  import { DebugPreferences } from '@theia/debug/lib/browser/debug-preferences';
43
43
  import { PluginDebugAdapterContribution } from './plugin-debug-adapter-contribution';
44
44
  import { PluginDebugSessionContributionRegistrator, PluginDebugSessionContributionRegistry } from './plugin-debug-session-contribution-registry';
@@ -14,7 +14,7 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
 
17
- import { DebugExt, } from '../../../common/plugin-api-rpc';
17
+ import { DebugExt } from '../../../common/plugin-api-rpc';
18
18
  import { DebugConfiguration } from '@theia/debug/lib/common/debug-configuration';
19
19
  import { MaybePromise } from '@theia/core/lib/common/types';
20
20
  import { DebuggerDescription } from '@theia/debug/lib/common/debug-service';
@@ -37,8 +37,8 @@ export class PluginDebugAdapterContribution {
37
37
  return this.description.label;
38
38
  }
39
39
 
40
- async provideDebugConfigurations(workspaceFolderUri: string | undefined): Promise<DebugConfiguration[]> {
41
- return this.debugExt.$provideDebugConfigurations(this.type, workspaceFolderUri);
40
+ async provideDebugConfigurations(workspaceFolderUri: string | undefined, dynamic: boolean = false): Promise<DebugConfiguration[]> {
41
+ return this.debugExt.$provideDebugConfigurations(this.type, workspaceFolderUri, dynamic);
42
42
  }
43
43
 
44
44
  async resolveDebugConfiguration(config: DebugConfiguration, workspaceFolderUri: string | undefined): Promise<DebugConfiguration | undefined> {
@@ -25,6 +25,7 @@ import { WorkspaceService } from '@theia/workspace/lib/browser';
25
25
  import { DebuggerContribution } from '../../../common/plugin-protocol';
26
26
  import { DebugRequestTypes } from '@theia/debug/lib/browser/debug-session-connection';
27
27
  import * as theia from '@theia/plugin';
28
+
28
29
  /**
29
30
  * Debug adapter contribution registrator.
30
31
  */
@@ -111,6 +112,28 @@ export class PluginDebugService implements DebugService, PluginDebugAdapterContr
111
112
  }
112
113
  }
113
114
 
115
+ async provideDynamicDebugConfigurations(): Promise<{ type: string, configurations: DebugConfiguration[] }[]> {
116
+ const result: Promise<{ type: string, configurations: theia.DebugConfiguration[] }>[] = [];
117
+
118
+ for (const [type, contributor] of this.contributors.entries()) {
119
+ const typeConfigurations = this.resolveDynamicConfigurationsForType(type, contributor);
120
+ result.push(typeConfigurations);
121
+ }
122
+
123
+ return Promise.all(result);
124
+ }
125
+
126
+ protected async resolveDynamicConfigurationsForType(
127
+ type: string,
128
+ contributor: PluginDebugAdapterContribution): Promise<{ type: string, configurations: DebugConfiguration[] }> {
129
+
130
+ const configurations = await contributor.provideDebugConfigurations(undefined, true);
131
+ for (const configuration of configurations) {
132
+ configuration.dynamic = true;
133
+ }
134
+ return { type, configurations };
135
+ }
136
+
114
137
  async resolveDebugConfiguration(config: DebugConfiguration, workspaceFolderUri: string | undefined): Promise<DebugConfiguration> {
115
138
  let resolved = config;
116
139
 
@@ -14,13 +14,13 @@
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';
@@ -30,7 +30,7 @@ import { TerminalWidgetOptions, TerminalWidget } from '@theia/terminal/lib/brows
30
30
  import { TerminalOptionsExt } from '../../../common/plugin-api-rpc';
31
31
  import { FileService } from '@theia/filesystem/lib/browser/file-service';
32
32
  import { DebugContribution } from '@theia/debug/lib/browser/debug-contribution';
33
- import { ContributionProvider } from '@theia/core';
33
+ import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
34
34
 
35
35
  export class PluginDebugSession extends DebugSession {
36
36
  constructor(
@@ -15,10 +15,11 @@
15
15
  ********************************************************************************/
16
16
  import { injectable } from '@theia/core/shared/inversify';
17
17
  import { Message } from '@theia/core/shared/@phosphor/messaging';
18
- import { Key } from '@theia/core/lib/browser';
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,25 +50,32 @@ 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
 
60
62
  const iconContainer = messageNode.appendChild(document.createElement('div'));
61
63
  iconContainer.classList.add(ICON);
62
64
  const iconElement = iconContainer.appendChild(document.createElement('i'));
63
- iconElement.classList.add('fa', this.toIconClass(messageType), 'fa-fw', messageType.toString());
65
+ iconElement.classList.add(...this.toIconClass(messageType), messageType.toString());
64
66
 
65
67
  const textContainer = messageNode.appendChild(document.createElement('div'));
66
68
  textContainer.classList.add(TEXT);
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,20 +88,22 @@ 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;
87
98
  }
88
99
 
89
- protected toIconClass(icon: MessageType): string {
100
+ protected toIconClass(icon: MessageType): string[] {
90
101
  if (icon === MessageType.Error) {
91
- return 'fa-times-circle';
102
+ return codiconArray('error');
92
103
  }
93
104
  if (icon === MessageType.Warning) {
94
- return 'fa-warning';
105
+ return codiconArray('warning');
95
106
  }
96
- return 'fa-info-circle';
107
+ return codiconArray('info');
97
108
  }
98
109
  }
@@ -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 {
@@ -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) {
@@ -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:
@@ -21,7 +21,7 @@ import '../../../src/main/browser/style/comments.css';
21
21
  import { ContainerModule } from '@theia/core/shared/inversify';
22
22
  import {
23
23
  FrontendApplicationContribution, WidgetFactory, bindViewContribution,
24
- ViewContainerIdentifier, ViewContainer, createTreeContainer, TreeImpl, TreeWidget, TreeModelImpl, LabelProviderContribution, TreeProps
24
+ ViewContainerIdentifier, ViewContainer, createTreeContainer, TreeImpl, TreeWidget, TreeModelImpl, LabelProviderContribution
25
25
  } from '@theia/core/lib/browser';
26
26
  import { MaybePromise, CommandContribution, ResourceResolver, bindContributionProvider } from '@theia/core/lib/common';
27
27
  import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging';
@@ -147,10 +147,12 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
147
147
  createWidget: (identifier: TreeViewWidgetIdentifier) => {
148
148
  const child = createTreeContainer(container, {
149
149
  contextMenuPath: VIEW_ITEM_CONTEXT_MENU,
150
- search: true,
151
- globalSelection: true
150
+ expandOnlyOnExpansionToggleClick: true,
151
+ expansionTogglePadding: 22,
152
+ globalSelection: true,
153
+ leftPadding: 8,
154
+ search: true
152
155
  });
153
- child.rebind(TreeProps).toConstantValue({ leftPadding: 8, expansionTogglePadding: 22, expandOnlyOnExpansionToggleClick: true, });
154
156
  child.bind(TreeViewWidgetIdentifier).toConstantValue(identifier);
155
157
  child.bind(PluginTree).toSelf();
156
158
  child.rebind(TreeImpl).toService(PluginTree);
@@ -23,6 +23,7 @@ import { AlertMessage } from '@theia/core/lib/browser/widgets/alert-message';
23
23
  import { HostedPluginSupport, PluginProgressLocation } from '../../hosted/browser/hosted-plugin';
24
24
  import { ProgressBarFactory } from '@theia/core/lib/browser/progress-bar-factory';
25
25
  import { DisposableCollection } from '@theia/core/lib/common/disposable';
26
+ import { codicon } from '@theia/core/lib/browser';
26
27
 
27
28
  @injectable()
28
29
  export class PluginWidget extends ReactWidget {
@@ -38,7 +39,7 @@ export class PluginWidget extends ReactWidget {
38
39
  this.id = 'plugins';
39
40
  this.title.label = 'Plugins';
40
41
  this.title.caption = 'Plugins';
41
- this.title.iconClass = 'fa plugins-tab-icon';
42
+ this.title.iconClass = codicon('diff-added');
42
43
  this.title.closable = true;
43
44
  this.node.tabIndex = 0;
44
45
  this.addClass('theia-plugins');
@@ -86,7 +87,7 @@ export class PluginWidget extends ReactWidget {
86
87
  return <div key={plugin.model.name} className={this.createPluginClassName(plugin)}>
87
88
  <div className='column flexcontainer pluginInformationContainer'>
88
89
  <div className='row flexcontainer'>
89
- <div className='fa fa-puzzle-piece fa-2x fa-fw'></div>
90
+ <div className={codicon('list-selection')}></div>
90
91
  <div title={plugin.model.name} className='pluginName noWrapInfo'>{plugin.model.name}</div>
91
92
  </div>
92
93
  <div className='row flexcontainer'>
@@ -111,7 +111,7 @@ export class PluginSharedStyle {
111
111
  background-position: 2px;
112
112
  width: ${size}px;
113
113
  height: ${size}px;
114
- background: no-repeat url("${theme.type === 'light' ? lightIconUrl : darkIconUrl}");
114
+ background: center no-repeat url("${theme.type === 'light' ? lightIconUrl : darkIconUrl}");
115
115
  background-size: ${size}px;
116
116
  `));
117
117
  return {