@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,9 +16,9 @@
16
16
 
17
17
  import { injectable, inject, postConstruct, optional } from '@theia/core/shared/inversify';
18
18
  import {
19
- ApplicationShell, ViewContainer as ViewContainerWidget, WidgetManager,
19
+ ApplicationShell, ViewContainer as ViewContainerWidget, WidgetManager, QuickViewService,
20
20
  ViewContainerIdentifier, ViewContainerTitleOptions, Widget, FrontendApplicationContribution,
21
- StatefulWidget, CommonMenus, BaseWidget, TreeViewWelcomeWidget, codicon
21
+ StatefulWidget, CommonMenus, BaseWidget, TreeViewWelcomeWidget, codicon, ViewContainerPart
22
22
  } from '@theia/core/lib/browser';
23
23
  import { ViewContainer, View, ViewWelcome } from '../../../common';
24
24
  import { PluginSharedStyle } from '../plugin-shared-style';
@@ -31,16 +31,15 @@ import { DebugFrontendApplicationContribution } from '@theia/debug/lib/browser/d
31
31
  import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
32
32
  import { CommandRegistry } from '@theia/core/lib/common/command';
33
33
  import { MenuModelRegistry } from '@theia/core/lib/common/menu';
34
- import { QuickViewService } from '@theia/core/lib/browser';
35
34
  import { Emitter } from '@theia/core/lib/common/event';
36
35
  import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
37
- import { SearchInWorkspaceWidget } from '@theia/search-in-workspace/lib/browser/search-in-workspace-widget';
38
36
  import { ViewContextKeyService } from './view-context-key-service';
39
37
  import { PROBLEMS_WIDGET_ID } from '@theia/markers/lib/browser/problem/problem-widget';
40
38
  import { OUTPUT_WIDGET_KIND } from '@theia/output/lib/browser/output-widget';
41
39
  import { DebugConsoleContribution } from '@theia/debug/lib/browser/console/debug-console-contribution';
42
40
  import { TERMINAL_WIDGET_FACTORY_ID } from '@theia/terminal/lib/browser/terminal-widget-impl';
43
41
  import { TreeViewWidget } from './tree-view-widget';
42
+ import { SEARCH_VIEW_CONTAINER_ID } from '@theia/search-in-workspace/lib/browser/search-in-workspace-factory';
44
43
 
45
44
  export const PLUGIN_VIEW_FACTORY_ID = 'plugin-view';
46
45
  export const PLUGIN_VIEW_CONTAINER_FACTORY_ID = 'plugin-view-container';
@@ -100,8 +99,8 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
100
99
  protected init(): void {
101
100
  // VS Code Viewlets
102
101
  this.trackVisibleWidget(EXPLORER_VIEW_CONTAINER_ID, { viewletId: 'workbench.view.explorer' });
103
- this.trackVisibleWidget(SearchInWorkspaceWidget.ID, { viewletId: 'workbench.view.search', sideArea: true });
104
102
  this.trackVisibleWidget(SCM_VIEW_CONTAINER_ID, { viewletId: 'workbench.view.scm' });
103
+ this.trackVisibleWidget(SEARCH_VIEW_CONTAINER_ID, { viewletId: 'workbench.view.search' });
105
104
  this.trackVisibleWidget(DebugWidget.ID, { viewletId: 'workbench.view.debug' });
106
105
  // TODO workbench.view.extensions - Theia does not have a proper extension view yet
107
106
 
@@ -111,7 +110,6 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
111
110
  this.trackVisibleWidget(DebugConsoleContribution.options.id, { panelId: 'workbench.panel.repl' });
112
111
  this.trackVisibleWidget(TERMINAL_WIDGET_FACTORY_ID, { panelId: 'workbench.panel.terminal' });
113
112
  // TODO workbench.panel.comments - Theia does not have a proper comments view yet
114
- this.trackVisibleWidget(SearchInWorkspaceWidget.ID, { panelId: 'workbench.view.search', sideArea: false });
115
113
 
116
114
  this.updateFocusedView();
117
115
  this.shell.onDidChangeActiveWidget(() => this.updateFocusedView());
@@ -123,6 +121,9 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
123
121
  if (factoryId === SCM_VIEW_CONTAINER_ID && widget instanceof ViewContainerWidget) {
124
122
  waitUntil(this.prepareViewContainer('scm', widget));
125
123
  }
124
+ if (factoryId === SEARCH_VIEW_CONTAINER_ID && widget instanceof ViewContainerWidget) {
125
+ waitUntil(this.prepareViewContainer('search', widget));
126
+ }
126
127
  if (factoryId === DebugWidget.ID && widget instanceof DebugWidget) {
127
128
  const viewContainer = widget['sessionWidget']['viewContainer'];
128
129
  waitUntil(this.prepareViewContainer('debug', viewContainer));
@@ -217,15 +218,28 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
217
218
  }
218
219
  const toDispose = new DisposableCollection();
219
220
  const containerClass = 'theia-plugin-view-container';
221
+ let themeIconClass = '';
220
222
  const iconClass = 'plugin-view-container-icon-' + viewContainer.id;
221
- const iconUrl = PluginSharedStyle.toExternalIconUrl(viewContainer.iconUrl);
222
- toDispose.push(this.style.insertRule('.' + containerClass + '.' + iconClass, () => `
223
+
224
+ if (viewContainer.themeIcon) {
225
+ const icon = monaco.theme.ThemeIcon.fromString(viewContainer.themeIcon);
226
+ if (icon) {
227
+ themeIconClass = monaco.theme.ThemeIcon.asClassName(icon) ?? '';
228
+ }
229
+ }
230
+
231
+ if (!themeIconClass) {
232
+ const iconUrl = PluginSharedStyle.toExternalIconUrl(viewContainer.iconUrl);
233
+ toDispose.push(this.style.insertRule('.' + containerClass + '.' + iconClass, () => `
223
234
  mask: url('${iconUrl}') no-repeat 50% 50%;
224
235
  -webkit-mask: url('${iconUrl}') no-repeat 50% 50%;
225
236
  `));
237
+ }
238
+
226
239
  toDispose.push(this.doRegisterViewContainer(viewContainer.id, location, {
227
240
  label: viewContainer.title,
228
- iconClass: containerClass + ' ' + iconClass,
241
+ // The container class automatically sets a mask; if we're using a theme icon, we don't want one.
242
+ iconClass: (themeIconClass || containerClass) + ' ' + iconClass,
229
243
  closeable: true
230
244
  }));
231
245
  return toDispose;
@@ -401,7 +415,9 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
401
415
  return;
402
416
  }
403
417
  const [, view] = data;
404
- widget.title.label = view.name;
418
+ if (!widget.title.label) {
419
+ widget.title.label = view.name;
420
+ }
405
421
  const currentDataWidget = widget.widgets[0];
406
422
  const viewDataWidget = await this.createViewDataWidget(view.id);
407
423
  if (widget.isDisposed) {
@@ -466,6 +482,14 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
466
482
  }
467
483
  for (const viewId of this.getContainerViews(viewContainerId)) {
468
484
  const identifier = this.toPluginViewWidgetIdentifier(viewId);
485
+ // Keep existing widget in its current container and reregister its part to the plugin view widget events.
486
+ const existingWidget = this.widgetManager.tryGetWidget<PluginViewWidget>(PLUGIN_VIEW_FACTORY_ID, identifier);
487
+ if (existingWidget && existingWidget.currentViewContainerId) {
488
+ const currentContainer = await this.getPluginViewContainer(existingWidget.currentViewContainerId);
489
+ if (currentContainer && this.registerWidgetPartEvents(existingWidget, currentContainer)) {
490
+ continue;
491
+ }
492
+ }
469
493
  const widget = await this.widgetManager.getOrCreateWidget<PluginViewWidget>(PLUGIN_VIEW_FACTORY_ID, identifier);
470
494
  if (containerWidget.getTrackableWidgets().indexOf(widget) === -1) {
471
495
  containerWidget.addWidget(widget, {
@@ -473,27 +497,49 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
473
497
  initiallyHidden: !this.isViewVisible(viewId)
474
498
  });
475
499
  }
476
- const part = containerWidget.getPartFor(widget);
477
- if (part) {
478
- // if a view is explicitly hidden then suppress updating visibility based on `when` closure
479
- part.onDidChangeVisibility(() => widget.suppressUpdateViewVisibility = part.isHidden);
500
+ this.registerWidgetPartEvents(widget, containerWidget);
501
+ }
502
+ }
480
503
 
481
- const tryFireOnDidExpandView = () => {
482
- if (widget.widgets.length === 0) {
483
- if (!part.collapsed && part.isVisible) {
484
- this.onDidExpandViewEmitter.fire(viewId);
485
- }
486
- } else {
487
- toFire.dispose();
504
+ protected registerWidgetPartEvents(widget: PluginViewWidget, containerWidget: ViewContainerWidget): ViewContainerPart | undefined {
505
+ const part = containerWidget.getPartFor(widget);
506
+ if (part) {
507
+
508
+ widget.currentViewContainerId = this.getViewContainerId(containerWidget);
509
+ part.onDidMove(event => { widget.currentViewContainerId = this.getViewContainerId(event); });
510
+
511
+ // if a view is explicitly hidden then suppress updating visibility based on `when` closure
512
+ part.onDidChangeVisibility(() => widget.suppressUpdateViewVisibility = part.isHidden);
513
+
514
+ const tryFireOnDidExpandView = () => {
515
+ if (widget.widgets.length === 0) {
516
+ if (!part.collapsed && part.isVisible) {
517
+ const viewId = this.toViewId(widget.options);
518
+ this.onDidExpandViewEmitter.fire(viewId);
488
519
  }
489
- };
490
- const toFire = new DisposableCollection(
491
- part.onCollapsed(tryFireOnDidExpandView),
492
- part.onDidChangeVisibility(tryFireOnDidExpandView)
493
- );
520
+ } else {
521
+ toFire.dispose();
522
+ }
523
+ };
524
+ const toFire = new DisposableCollection(
525
+ part.onCollapsed(tryFireOnDidExpandView),
526
+ part.onDidChangeVisibility(tryFireOnDidExpandView)
527
+ );
494
528
 
495
- tryFireOnDidExpandView();
496
- }
529
+ tryFireOnDidExpandView();
530
+ return part;
531
+ }
532
+ };
533
+
534
+ protected getViewContainerId(container: ViewContainerWidget): string | undefined {
535
+ const description = this.widgetManager.getDescription(container);
536
+ switch (description?.factoryId) {
537
+ case EXPLORER_VIEW_CONTAINER_ID: return 'explorer';
538
+ case SCM_VIEW_CONTAINER_ID: return 'scm';
539
+ case SEARCH_VIEW_CONTAINER_ID: return 'search';
540
+ case undefined: return container.parent?.parent instanceof DebugWidget ? 'debug' : container.id;
541
+ case PLUGIN_VIEW_CONTAINER_FACTORY_ID: return this.toViewContainerId(description.options);
542
+ default: return container.id;
497
543
  }
498
544
  }
499
545
 
@@ -504,6 +550,9 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
504
550
  if (viewContainerId === 'scm') {
505
551
  return this.widgetManager.getWidget<ViewContainerWidget>(SCM_VIEW_CONTAINER_ID);
506
552
  }
553
+ if (viewContainerId === 'search') {
554
+ return this.widgetManager.getWidget<ViewContainerWidget>(SEARCH_VIEW_CONTAINER_ID);
555
+ }
507
556
  if (viewContainerId === 'debug') {
508
557
  const debug = await this.widgetManager.getWidget(DebugWidget.ID);
509
558
  if (debug instanceof DebugWidget) {
@@ -546,6 +595,12 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
546
595
  await this.prepareViewContainer('scm', scm);
547
596
  }
548
597
  })().catch(console.error));
598
+ promises.push((async () => {
599
+ const search = await this.widgetManager.getWidget(SEARCH_VIEW_CONTAINER_ID);
600
+ if (search instanceof ViewContainerWidget) {
601
+ await this.prepareViewContainer('search', search);
602
+ }
603
+ })().catch(console.error));
549
604
  promises.push((async () => {
550
605
  const debug = await this.widgetManager.getWidget(DebugWidget.ID);
551
606
  if (debug instanceof DebugWidget) {
@@ -46,6 +46,8 @@ export class PluginViewWidget extends Panel implements StatefulWidget, Descripti
46
46
  @inject(PluginViewWidgetIdentifier)
47
47
  readonly options: PluginViewWidgetIdentifier;
48
48
 
49
+ currentViewContainerId: string | undefined;
50
+
49
51
  constructor() {
50
52
  super();
51
53
  this.node.tabIndex = -1;
@@ -75,7 +77,8 @@ export class PluginViewWidget extends Panel implements StatefulWidget, Descripti
75
77
  label: this.title.label,
76
78
  message: this.message,
77
79
  widgets: this.widgets,
78
- suppressUpdateViewVisibility: this._suppressUpdateViewVisibility
80
+ suppressUpdateViewVisibility: this._suppressUpdateViewVisibility,
81
+ currentViewContainerId: this.currentViewContainerId
79
82
  };
80
83
  }
81
84
 
@@ -83,6 +86,7 @@ export class PluginViewWidget extends Panel implements StatefulWidget, Descripti
83
86
  this.title.label = state.label;
84
87
  this.message = state.message;
85
88
  this.suppressUpdateViewVisibility = state.suppressUpdateViewVisibility;
89
+ this.currentViewContainerId = state.currentViewContainerId;
86
90
  for (const widget of state.widgets) {
87
91
  this.addWidget(widget);
88
92
  }
@@ -150,6 +154,7 @@ export namespace PluginViewWidget {
150
154
  label: string,
151
155
  message?: string,
152
156
  widgets: ReadonlyArray<Widget>,
153
- suppressUpdateViewVisibility: boolean
157
+ suppressUpdateViewVisibility: boolean;
158
+ currentViewContainerId: string | undefined;
154
159
  }
155
160
  }
@@ -16,7 +16,7 @@
16
16
 
17
17
  import { URI } from '@theia/core/shared/vscode-uri';
18
18
  import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
19
- import { TreeViewsExt, TreeViewSelection } from '../../../common/plugin-api-rpc';
19
+ import { TreeViewsExt, TreeViewItemCollapsibleState, TreeViewItem, TreeViewSelection } from '../../../common/plugin-api-rpc';
20
20
  import { Command } from '../../../common/plugin-api-rpc-model';
21
21
  import {
22
22
  TreeNode,
@@ -29,19 +29,22 @@ import {
29
29
  TREE_NODE_SEGMENT_GROW_CLASS,
30
30
  TREE_NODE_TAIL_CLASS,
31
31
  TreeModelImpl,
32
- TreeViewWelcomeWidget
32
+ TreeViewWelcomeWidget,
33
+ TooltipService,
34
+ TooltipAttributes
33
35
  } from '@theia/core/lib/browser';
34
- import { TreeViewItem, TreeViewItemCollapsibleState } from '../../../common/plugin-api-rpc';
35
36
  import { MenuPath, MenuModelRegistry, ActionMenuNode } from '@theia/core/lib/common/menu';
36
37
  import * as React from '@theia/core/shared/react';
37
38
  import { PluginSharedStyle } from '../plugin-shared-style';
38
39
  import { ViewContextKeyService } from './view-context-key-service';
39
- import { Widget } from '@theia/core/lib/browser/widgets/widget';
40
+ import { ACTION_ITEM, Widget } from '@theia/core/lib/browser/widgets/widget';
40
41
  import { Emitter, Event } from '@theia/core/lib/common/event';
41
42
  import { MessageService } from '@theia/core/lib/common/message-service';
42
43
  import { View } from '../../../common/plugin-protocol';
43
44
  import CoreURI from '@theia/core/lib/common/uri';
44
45
  import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
46
+ import * as markdownit from 'markdown-it';
47
+ import { isMarkdownString } from '../../../plugin/markdown-string';
45
48
 
46
49
  export const TREE_NODE_HYPERLINK = 'theia-TreeNodeHyperlink';
47
50
  export const VIEW_ITEM_CONTEXT_MENU: MenuPath = ['view-item-context-menu'];
@@ -245,6 +248,9 @@ export class TreeViewWidget extends TreeViewWelcomeWidget {
245
248
  @inject(ContextKeyService)
246
249
  protected readonly contextKeyService: ContextKeyService;
247
250
 
251
+ @inject(TooltipService)
252
+ protected readonly tooltipService: TooltipService;
253
+
248
254
  protected readonly onDidChangeVisibilityEmitter = new Emitter<boolean>();
249
255
  readonly onDidChangeVisibility = this.onDidChangeVisibilityEmitter.event;
250
256
 
@@ -274,13 +280,32 @@ export class TreeViewWidget extends TreeViewWelcomeWidget {
274
280
  classes.push(TREE_NODE_SEGMENT_GROW_CLASS);
275
281
  }
276
282
  const className = classes.join(' ');
277
- const title = node.tooltip ||
278
- (node.resourceUri && this.labelProvider.getLongName(new CoreURI(node.resourceUri)))
279
- || this.toNodeName(node);
280
- const attrs = this.decorateCaption(node, {
281
- className, id: node.id,
282
- title
283
- });
283
+
284
+ let attrs: React.HTMLAttributes<HTMLElement> & Partial<TooltipAttributes> = {
285
+ ...this.decorateCaption(node, {}),
286
+ className,
287
+ id: node.id
288
+ };
289
+
290
+ if (node.tooltip && isMarkdownString(node.tooltip)) {
291
+ // Render markdown in custom tooltip
292
+ const tooltip = markdownit().render(node.tooltip.value);
293
+
294
+ attrs = {
295
+ ...attrs,
296
+ 'data-tip': tooltip,
297
+ 'data-for': this.tooltipService.tooltipId
298
+ };
299
+ } else {
300
+ const title = node.tooltip ||
301
+ (node.resourceUri && this.labelProvider.getLongName(new CoreURI(node.resourceUri)))
302
+ || this.toNodeName(node);
303
+
304
+ attrs = {
305
+ ...attrs,
306
+ title
307
+ };
308
+ }
284
309
 
285
310
  const children: React.ReactNode[] = [];
286
311
  const caption = this.toNodeName(node);
@@ -294,49 +319,14 @@ export class TreeViewWidget extends TreeViewWelcomeWidget {
294
319
  } else if (!highlight) {
295
320
  children.push(caption);
296
321
  }
297
- return React.createElement('div', attrs, ...children);
298
- }
299
-
300
- protected getCaption(node: TreeNode): React.ReactNode {
301
- const nodes: React.ReactNode[] = [];
302
-
303
- const name = this.toNodeName(node) || '';
304
322
  const description = this.toNodeDescription(node);
305
-
306
- let work = name;
307
-
308
- const regex = /\[([^\[]+)\]\(([^\)]+)\)/g;
309
- const matchResult = work.match(regex);
310
-
311
- if (matchResult) {
312
- matchResult.forEach((match, index) => {
313
- nodes.push(<span key={`m${index}`}>{work.substring(0, work.indexOf(match))}</span>);
314
-
315
- const execResult = regex.exec(name);
316
- nodes.push(<a key={`l${index}`}
317
- href={execResult![2]}
318
- target='_blank'
319
- className={TREE_NODE_HYPERLINK}
320
- onClick={e => e.stopPropagation()}>{execResult![1]}</a>
321
- );
322
-
323
- work = work.substring(work.indexOf(match) + match.length);
324
- });
323
+ if (description) {
324
+ children.push(<span className='theia-tree-view-description'>{description}</span>);
325
325
  }
326
-
327
- return <div className='noWrapInfoTree'>
328
- {...nodes}
329
- {work && <span>{work}</span>}
330
- {description && <span className='theia-tree-view-description'>
331
- {description}
332
- </span>}
333
- </div>;
326
+ return React.createElement('div', attrs, ...children);
334
327
  }
335
328
 
336
329
  protected renderTailDecorations(node: TreeViewNode, props: NodeProps): React.ReactNode {
337
- if (this.model.selectedNodes.every(selected => selected.id !== node.id) && node.id !== this.hoverNodeId) {
338
- return false;
339
- }
340
330
  return this.contextKeys.with({ view: this.id, viewItem: node.contextValue }, () => {
341
331
  const menu = this.menus.getMenu(VIEW_ITEM_INLINE_MENU);
342
332
  const arg = this.toTreeViewSelection(node);
@@ -356,27 +346,13 @@ export class TreeViewWidget extends TreeViewWelcomeWidget {
356
346
  if (!icon || !this.commands.isVisible(node.action.commandId, arg) || !this.contextKeys.match(node.action.when)) {
357
347
  return false;
358
348
  }
359
- const className = [TREE_NODE_SEGMENT_CLASS, TREE_NODE_TAIL_CLASS, icon, 'theia-tree-view-inline-action'].join(' ');
349
+ const className = [TREE_NODE_SEGMENT_CLASS, TREE_NODE_TAIL_CLASS, icon, ACTION_ITEM, 'theia-tree-view-inline-action'].join(' ');
360
350
  return <div key={index} className={className} title={node.label} onClick={e => {
361
351
  e.stopPropagation();
362
352
  this.commands.executeCommand(node.action.commandId, arg);
363
353
  }} />;
364
354
  }
365
355
 
366
- protected hoverNodeId: string | undefined;
367
- protected setHoverNodeId(hoverNodeId: string | undefined): void {
368
- this.hoverNodeId = hoverNodeId;
369
- this.update();
370
- }
371
-
372
- protected createNodeAttributes(node: TreeNode, props: NodeProps): React.Attributes & React.HTMLAttributes<HTMLElement> {
373
- return {
374
- ...super.createNodeAttributes(node, props),
375
- onMouseOver: () => this.setHoverNodeId(node.id),
376
- onMouseOut: () => this.setHoverNodeId(undefined)
377
- };
378
- }
379
-
380
356
  protected toContextMenuArgs(node: SelectableTreeNode): [TreeViewSelection] {
381
357
  return [this.toTreeViewSelection(node)];
382
358
  }
@@ -444,7 +420,9 @@ export class TreeViewWidget extends TreeViewWelcomeWidget {
444
420
  }
445
421
 
446
422
  protected render(): React.ReactNode {
447
- return React.createElement('div', this.createContainerAttributes(), this.renderSearchInfo(), this.renderTree(this.model));
423
+ const node = React.createElement('div', this.createContainerAttributes(), this.renderSearchInfo(), this.renderTree(this.model));
424
+ this.tooltipService.update();
425
+ return node;
448
426
  }
449
427
 
450
428
  protected renderSearchInfo(): React.ReactNode {
@@ -26,6 +26,8 @@
26
26
  constructor() {
27
27
  this.handlers = new Map();
28
28
  window.addEventListener('message', e => {
29
+ // Note: `window.parent === window` when there is no parent...
30
+ const sourceIsSelfOrParentFrame = e.source === window.parent;
29
31
  let sourceIsChildFrame = false;
30
32
  for (let i = 0; i < window.frames.length; i++) {
31
33
  const frame = window.frames[i];
@@ -35,11 +37,8 @@
35
37
  }
36
38
  }
37
39
  if (sourceIsChildFrame && e.data && (e.data.command === 'onmessage' || e.data.command === 'do-update-state')) {
38
- // Came from inner iframe
39
40
  this.postMessage(e.data.command, e.data.data);
40
- }
41
- // Note: `window.parent === window` when there is no parent...
42
- if (sourceIsChildFrame || e.source === window.parent) {
41
+ } else if (sourceIsChildFrame || sourceIsSelfOrParentFrame) {
43
42
  const channel = e.data.channel;
44
43
  const handler = this.handlers.get(channel);
45
44
  if (handler) {
@@ -15,8 +15,9 @@
15
15
  ********************************************************************************/
16
16
 
17
17
  import { MessageService } from '@theia/core';
18
- import { FrontendApplicationContribution } from '@theia/core/lib/browser';
18
+ import { Dialog, FrontendApplicationContribution } from '@theia/core/lib/browser';
19
19
  import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
20
+ import { nls } from '@theia/core/lib/common/nls';
20
21
  import { WindowService } from '@theia/core/lib/browser/window/window-service';
21
22
  import { inject, injectable } from '@theia/core/shared/inversify';
22
23
  import { WebviewExternalEndpoint } from '../../common/webview-protocol';
@@ -44,12 +45,12 @@ export class WebviewFrontendSecurityWarnings implements FrontendApplicationContr
44
45
  }
45
46
  const hostPattern = await this.webviewEnvironment.hostPatternPromise;
46
47
  if (hostPattern !== WebviewExternalEndpoint.defaultPattern) {
47
- this.messageService.warn(`\
48
- The webview endpoint's host pattern has been changed to \`${hostPattern}\`; changing the pattern can lead to security vulnerabilities. \
49
- See \`@theia/plugin-ext/README.md\` for more information.`,
50
- /* actions: */ 'Ok', 'Go To README',
51
- ).then(action => {
52
- if (action === 'Go To README') {
48
+ const goToReadme = nls.localize('theia/webview/goToReadme', 'Go To README');
49
+ const message = nls.localize('theia/webview/messageWarning', '\
50
+ The {0} endpoint\'s host pattern has been changed to `{1}`; changing the pattern can lead to security vulnerabilities. \
51
+ See `{2}` for more information.', 'webview', hostPattern, '@theia/plugin-ext/README.md');
52
+ this.messageService.warn(message, Dialog.OK, goToReadme).then(action => {
53
+ if (action === goToReadme) {
53
54
  this.windowService.openNewWindow('https://www.npmjs.com/package/@theia/plugin-ext', { external: true });
54
55
  }
55
56
  });
@@ -23,6 +23,7 @@ import {
23
23
  PreferenceContribution,
24
24
  PreferenceSchema
25
25
  } from '@theia/core/lib/browser/preferences';
26
+ import { nls } from '@theia/core/lib/common/nls';
26
27
 
27
28
  const frontendConfig = FrontendApplicationConfigProvider.get();
28
29
 
@@ -32,7 +33,7 @@ export const WebviewConfigSchema: PreferenceSchema = {
32
33
  'webview.trace': {
33
34
  type: 'string',
34
35
  enum: ['off', 'on', 'verbose'],
35
- description: 'Controls communication tracing with webviews.',
36
+ description: nls.localize('theia/plugin-ext/webviewTrace', 'Controls communication tracing with webviews.'),
36
37
  default: 'off'
37
38
  }
38
39
  }
@@ -42,7 +43,7 @@ if (frontendConfig.securityWarnings) {
42
43
  WebviewConfigSchema.properties['webview.warnIfUnsecure'] = {
43
44
  scope: 'application',
44
45
  type: 'boolean',
45
- description: 'Warns users that webviews are currently deployed unsecurely.',
46
+ description: nls.localize('theia/plugin-ext/webviewWarnIfUnsecure', 'Warns users that webviews are currently deployed unsecurely.'),
46
47
  default: true,
47
48
  };
48
49
  }
@@ -40,7 +40,7 @@ import { Schemes } from '../../../common/uri-components';
40
40
  import { PluginSharedStyle } from '../plugin-shared-style';
41
41
  import { WebviewThemeDataProvider } from './webview-theme-data-provider';
42
42
  import { ExternalUriService } from '@theia/core/lib/browser/external-uri-service';
43
- import { OutputChannelManager } from '@theia/output/lib/common/output-channel';
43
+ import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
44
44
  import { WebviewPreferences } from './webview-preferences';
45
45
  import { WebviewResourceCache } from './webview-resource-cache';
46
46
  import { Endpoint } from '@theia/core/lib/browser/endpoint';
@@ -18,7 +18,7 @@ import * as theia from '@theia/plugin';
18
18
  import { RPCProtocol } from '../common/rpc-protocol';
19
19
  import { CommandRegistryImpl } from './command-registry';
20
20
  import { UriComponents } from '../common/uri-components';
21
- import { URI } from './types-impl';
21
+ import { CommentThreadCollapsibleState, URI } from './types-impl';
22
22
  import {
23
23
  Range,
24
24
  Comment,
@@ -29,7 +29,6 @@ import { DocumentsExtImpl } from './documents';
29
29
  import { Emitter } from '@theia/core/lib/common/event';
30
30
  import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
31
31
  import { fromMarkdown, fromRange, toRange } from './type-converters';
32
- import { CommentThreadCollapsibleState } from './types-impl';
33
32
  import {
34
33
  CommentsCommandArg, CommentsContextCommandArg, CommentsEditCommandArg,
35
34
  CommentsExt,
@@ -19,17 +19,15 @@
19
19
  *--------------------------------------------------------------------------------------------*/
20
20
  // copied and modified from https://github.com/microsoft/vscode/blob/53eac52308c4611000a171cc7bf1214293473c78/src/vs/workbench/api/common/extHostCustomEditors.ts
21
21
 
22
- import { CustomEditorsExt, CustomEditorsMain, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
22
+ import { CustomEditorsExt, CustomEditorsMain, Plugin, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
23
23
  import * as theia from '@theia/plugin';
24
24
  import { RPCProtocol } from '../common/rpc-protocol';
25
- import { Plugin } from '../common/plugin-api-rpc';
26
- import { URI } from './types-impl';
25
+ import { Disposable, URI } from './types-impl';
27
26
  import { UriComponents } from '../common/uri-components';
28
27
  import { DocumentsExtImpl } from './documents';
29
28
  import { WebviewImpl, WebviewsExtImpl } from './webviews';
30
29
  import { CancellationToken, CancellationTokenSource } from '@theia/core/lib/common/cancellation';
31
30
  import { DisposableCollection } from '@theia/core/lib/common/disposable';
32
- import { Disposable } from './types-impl';
33
31
  import { WorkspaceExtImpl } from './workspace';
34
32
  import * as Converters from './type-converters';
35
33
 
@@ -24,8 +24,7 @@ import {
24
24
  PLUGIN_RPC_CONTEXT, PluginInfo
25
25
  } from '../common/plugin-api-rpc';
26
26
  import { RPCProtocol } from '../common/rpc-protocol';
27
- import { URI } from './types-impl';
28
- import { Disposable, FileDecoration } from './types-impl';
27
+ import { Disposable, FileDecoration, URI } from './types-impl';
29
28
  import { CancellationToken } from '@theia/core/lib/common';
30
29
  import { dirname } from 'path';
31
30
 
@@ -17,9 +17,8 @@
17
17
  import * as theia from '@theia/plugin';
18
18
  import { ModelChangedEvent, DocumentsMain } from '../common/plugin-api-rpc';
19
19
  import { Range as ARange } from '../common/plugin-api-rpc-model';
20
- import { URI } from './types-impl';
20
+ import { EndOfLine, Position, Range, URI } from './types-impl';
21
21
  import { ok } from '../common/assert';
22
- import { Range, Position, EndOfLine } from './types-impl';
23
22
  import { PrefixSumComputer } from './prefix-sum-computer';
24
23
  import { getWordAtText, ensureValidWordDefinition } from './word-helper';
25
24
 
@@ -21,7 +21,7 @@
21
21
  * based on https://github.com/Microsoft/vscode/blob/bf9a27ec01f2ef82fc45f69e0c946c7d74a57d3e/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts
22
22
  */
23
23
  import { DocumentsExt, ModelChangedEvent, PLUGIN_RPC_CONTEXT, DocumentsMain, SingleEditOperation } from '../common/plugin-api-rpc';
24
- import { URI } from './types-impl';
24
+ import { TextEdit, URI } from './types-impl';
25
25
  import { UriComponents } from '../common/uri-components';
26
26
  import { RPCProtocol } from '../common/rpc-protocol';
27
27
  import { Emitter, Event } from '@theia/core/lib/common/event';
@@ -31,7 +31,6 @@ import { EditorsAndDocumentsExtImpl } from './editors-and-documents';
31
31
  import * as Converter from './type-converters';
32
32
  import { DisposableCollection } from '@theia/core/lib/common/disposable';
33
33
  import { Range, TextDocumentShowOptions } from '../common/plugin-api-rpc-model';
34
- import { TextEdit } from './types-impl';
35
34
 
36
35
  export class DocumentsExtImpl implements DocumentsExt {
37
36
  private toDispose = new DisposableCollection();
@@ -31,11 +31,10 @@
31
31
  import { Emitter, WaitUntilEvent, AsyncEmitter } from '@theia/core/lib/common/event';
32
32
  import { IRelativePattern, parse } from '@theia/callhierarchy/lib/common/glob';
33
33
  import { UriComponents } from '@theia/core/shared/vscode-uri';
34
- import { URI } from './types-impl';
34
+ import { Disposable, URI, WorkspaceEdit } from './types-impl';
35
35
  import { EditorsAndDocumentsExtImpl as ExtHostDocumentsAndEditors } from './editors-and-documents';
36
36
  import type * as vscode from '@theia/plugin';
37
37
  import * as typeConverter from './type-converters';
38
- import { Disposable, WorkspaceEdit } from './types-impl';
39
38
  import { FileOperation } from '@theia/filesystem/lib/common/files';
40
39
  import { flatten } from '../common/arrays';
41
40
  import { CancellationToken } from '@theia/core/lib/common/cancellation';
@@ -29,12 +29,11 @@
29
29
  /* eslint-disable @typescript-eslint/no-explicit-any */
30
30
 
31
31
  import { UriComponents } from '@theia/core/shared/vscode-uri';
32
- import { URI } from './types-impl';
32
+ import { FileChangeType, FileSystemError, URI } from './types-impl';
33
33
  import { RPCProtocol } from '../common/rpc-protocol';
34
34
  import { PLUGIN_RPC_CONTEXT, FileSystemExt, FileSystemMain, IFileChangeDto } from '../common/plugin-api-rpc';
35
35
  import * as vscode from '@theia/plugin';
36
36
  import * as files from '@theia/filesystem/lib/common/files';
37
- import { FileChangeType, FileSystemError } from './types-impl';
38
37
  import * as typeConverter from './type-converters';
39
38
  import { LanguagesExtImpl } from './languages';
40
39
  import { Schemes as Schemas } from '../common/uri-components';
@@ -16,8 +16,7 @@
16
16
 
17
17
  import * as assert from 'assert';
18
18
  import { KnownCommands } from './known-commands';
19
- import { URI } from './types-impl';
20
- import { Position } from './types-impl';
19
+ import { Position, URI } from './types-impl';
21
20
  import { fromPosition } from './type-converters';
22
21
 
23
22
  describe('Known Command Conversions', () => {