@theia/core 1.17.2 → 1.18.0-next.05f289b3

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 (147) hide show
  1. package/README.md +2 -2
  2. package/lib/browser/breadcrumbs/breadcrumb-popup-container.d.ts +50 -0
  3. package/lib/browser/breadcrumbs/breadcrumb-popup-container.d.ts.map +1 -0
  4. package/lib/browser/breadcrumbs/breadcrumb-popup-container.js +115 -0
  5. package/lib/browser/breadcrumbs/breadcrumb-popup-container.js.map +1 -0
  6. package/lib/browser/breadcrumbs/breadcrumb-renderer.d.ts +28 -0
  7. package/lib/browser/breadcrumbs/breadcrumb-renderer.d.ts.map +1 -0
  8. package/lib/browser/breadcrumbs/breadcrumb-renderer.js +43 -0
  9. package/lib/browser/breadcrumbs/breadcrumb-renderer.js.map +1 -0
  10. package/lib/browser/breadcrumbs/breadcrumbs-constants.d.ts +65 -0
  11. package/lib/browser/breadcrumbs/breadcrumbs-constants.d.ts.map +1 -0
  12. package/lib/browser/breadcrumbs/breadcrumbs-constants.js +28 -0
  13. package/lib/browser/breadcrumbs/breadcrumbs-constants.js.map +1 -0
  14. package/lib/browser/breadcrumbs/breadcrumbs-renderer.d.ts +61 -0
  15. package/lib/browser/breadcrumbs/breadcrumbs-renderer.d.ts.map +1 -0
  16. package/lib/browser/breadcrumbs/breadcrumbs-renderer.js +190 -0
  17. package/lib/browser/breadcrumbs/breadcrumbs-renderer.js.map +1 -0
  18. package/lib/browser/breadcrumbs/breadcrumbs-service.d.ts +48 -0
  19. package/lib/browser/breadcrumbs/breadcrumbs-service.d.ts.map +1 -0
  20. package/lib/browser/breadcrumbs/breadcrumbs-service.js +120 -0
  21. package/lib/browser/breadcrumbs/breadcrumbs-service.js.map +1 -0
  22. package/lib/browser/breadcrumbs/index.d.ts +21 -0
  23. package/lib/browser/breadcrumbs/index.d.ts.map +1 -0
  24. package/lib/browser/breadcrumbs/index.js +33 -0
  25. package/lib/browser/breadcrumbs/index.js.map +1 -0
  26. package/lib/browser/common-frontend-contribution.d.ts.map +1 -1
  27. package/lib/browser/common-frontend-contribution.js +40 -0
  28. package/lib/browser/common-frontend-contribution.js.map +1 -1
  29. package/lib/browser/context-menu-renderer.d.ts +6 -6
  30. package/lib/browser/context-menu-renderer.d.ts.map +1 -1
  31. package/lib/browser/context-menu-renderer.js +7 -1
  32. package/lib/browser/context-menu-renderer.js.map +1 -1
  33. package/lib/browser/core-preferences.d.ts +3 -2
  34. package/lib/browser/core-preferences.d.ts.map +1 -1
  35. package/lib/browser/core-preferences.js +49 -43
  36. package/lib/browser/core-preferences.js.map +1 -1
  37. package/lib/browser/dialogs.d.ts.map +1 -1
  38. package/lib/browser/dialogs.js +1 -2
  39. package/lib/browser/dialogs.js.map +1 -1
  40. package/lib/browser/diff-uris.d.ts.map +1 -1
  41. package/lib/browser/diff-uris.js +2 -1
  42. package/lib/browser/diff-uris.js.map +1 -1
  43. package/lib/browser/frontend-application-module.d.ts.map +1 -1
  44. package/lib/browser/frontend-application-module.js +25 -16
  45. package/lib/browser/frontend-application-module.js.map +1 -1
  46. package/lib/browser/index.d.ts +1 -0
  47. package/lib/browser/index.d.ts.map +1 -1
  48. package/lib/browser/index.js +1 -0
  49. package/lib/browser/index.js.map +1 -1
  50. package/lib/browser/label-provider.d.ts +2 -2
  51. package/lib/browser/label-provider.d.ts.map +1 -1
  52. package/lib/browser/label-provider.js +3 -2
  53. package/lib/browser/label-provider.js.map +1 -1
  54. package/lib/browser/menu/browser-context-menu-renderer.d.ts.map +1 -1
  55. package/lib/browser/menu/browser-context-menu-renderer.js +1 -1
  56. package/lib/browser/menu/browser-context-menu-renderer.js.map +1 -1
  57. package/lib/browser/navigatable-types.d.ts +49 -0
  58. package/lib/browser/navigatable-types.d.ts.map +1 -0
  59. package/lib/browser/navigatable-types.js +58 -0
  60. package/lib/browser/navigatable-types.js.map +1 -0
  61. package/lib/browser/navigatable.d.ts +2 -32
  62. package/lib/browser/navigatable.d.ts.map +1 -1
  63. package/lib/browser/navigatable.js +12 -40
  64. package/lib/browser/navigatable.js.map +1 -1
  65. package/lib/browser/progress-status-bar-item.js +1 -1
  66. package/lib/browser/progress-status-bar-item.js.map +1 -1
  67. package/lib/browser/quick-input/quick-command-service.d.ts.map +1 -1
  68. package/lib/browser/quick-input/quick-command-service.js +2 -1
  69. package/lib/browser/quick-input/quick-command-service.js.map +1 -1
  70. package/lib/browser/quick-input/quick-input-service.d.ts +4 -0
  71. package/lib/browser/quick-input/quick-input-service.d.ts.map +1 -1
  72. package/lib/browser/quick-input/quick-input-service.js.map +1 -1
  73. package/lib/browser/shell/application-shell.d.ts +7 -3
  74. package/lib/browser/shell/application-shell.d.ts.map +1 -1
  75. package/lib/browser/shell/application-shell.js +11 -8
  76. package/lib/browser/shell/application-shell.js.map +1 -1
  77. package/lib/browser/shell/tab-bar-toolbar.d.ts.map +1 -1
  78. package/lib/browser/shell/tab-bar-toolbar.js +3 -2
  79. package/lib/browser/shell/tab-bar-toolbar.js.map +1 -1
  80. package/lib/browser/shell/tab-bars.d.ts +9 -3
  81. package/lib/browser/shell/tab-bars.d.ts.map +1 -1
  82. package/lib/browser/shell/tab-bars.js +38 -5
  83. package/lib/browser/shell/tab-bars.js.map +1 -1
  84. package/lib/browser/status-bar/status-bar.d.ts.map +1 -1
  85. package/lib/browser/status-bar/status-bar.js +4 -1
  86. package/lib/browser/status-bar/status-bar.js.map +1 -1
  87. package/lib/browser/tree/tree-widget.d.ts.map +1 -1
  88. package/lib/browser/tree/tree-widget.js +1 -1
  89. package/lib/browser/tree/tree-widget.js.map +1 -1
  90. package/lib/browser/view-container.d.ts +10 -0
  91. package/lib/browser/view-container.d.ts.map +1 -1
  92. package/lib/browser/view-container.js +26 -2
  93. package/lib/browser/view-container.js.map +1 -1
  94. package/lib/browser/widgets/alert-message.d.ts.map +1 -1
  95. package/lib/browser/widgets/alert-message.js +5 -4
  96. package/lib/browser/widgets/alert-message.js.map +1 -1
  97. package/lib/browser/widgets/react-renderer.d.ts +3 -1
  98. package/lib/browser/widgets/react-renderer.d.ts.map +1 -1
  99. package/lib/browser/widgets/react-renderer.js +7 -2
  100. package/lib/browser/widgets/react-renderer.js.map +1 -1
  101. package/lib/browser/widgets/widget.d.ts +4 -0
  102. package/lib/browser/widgets/widget.d.ts.map +1 -1
  103. package/lib/browser/widgets/widget.js +16 -2
  104. package/lib/browser/widgets/widget.js.map +1 -1
  105. package/lib/electron-browser/menu/electron-context-menu-renderer.d.ts.map +1 -1
  106. package/lib/electron-browser/menu/electron-context-menu-renderer.js +1 -1
  107. package/lib/electron-browser/menu/electron-context-menu-renderer.js.map +1 -1
  108. package/package.json +3 -3
  109. package/src/browser/breadcrumbs/breadcrumb-popup-container.ts +101 -0
  110. package/src/browser/breadcrumbs/breadcrumb-renderer.tsx +41 -0
  111. package/src/browser/breadcrumbs/breadcrumbs-constants.ts +79 -0
  112. package/src/browser/breadcrumbs/breadcrumbs-renderer.tsx +187 -0
  113. package/src/browser/breadcrumbs/breadcrumbs-service.ts +108 -0
  114. package/src/browser/breadcrumbs/index.ts +21 -0
  115. package/src/browser/common-frontend-contribution.ts +45 -0
  116. package/src/browser/context-menu-renderer.ts +10 -2
  117. package/src/browser/core-preferences.ts +52 -45
  118. package/src/browser/dialogs.ts +2 -3
  119. package/src/browser/diff-uris.ts +2 -1
  120. package/src/browser/frontend-application-module.ts +36 -12
  121. package/src/browser/index.ts +1 -0
  122. package/src/browser/label-provider.ts +3 -2
  123. package/src/browser/menu/browser-context-menu-renderer.ts +2 -2
  124. package/src/browser/navigatable-types.ts +78 -0
  125. package/src/browser/navigatable.ts +2 -61
  126. package/src/browser/progress-status-bar-item.ts +1 -1
  127. package/src/browser/quick-input/quick-command-service.ts +2 -1
  128. package/src/browser/quick-input/quick-input-service.ts +4 -0
  129. package/src/browser/shell/application-shell.ts +23 -15
  130. package/src/browser/shell/tab-bar-toolbar.tsx +4 -3
  131. package/src/browser/shell/tab-bars.ts +43 -9
  132. package/src/browser/status-bar/status-bar.tsx +3 -1
  133. package/src/browser/style/breadcrumbs.css +131 -0
  134. package/src/browser/style/index.css +11 -0
  135. package/src/browser/style/menus.css +14 -4
  136. package/src/browser/style/scrollbars.css +33 -14
  137. package/src/browser/style/sidepanel.css +11 -4
  138. package/src/browser/style/status-bar.css +6 -1
  139. package/src/browser/style/tabs.css +59 -34
  140. package/src/browser/style/tree.css +0 -1
  141. package/src/browser/style/view-container.css +9 -0
  142. package/src/browser/tree/tree-widget.tsx +4 -2
  143. package/src/browser/view-container.ts +35 -1
  144. package/src/browser/widgets/alert-message.tsx +5 -4
  145. package/src/browser/widgets/react-renderer.tsx +5 -2
  146. package/src/browser/widgets/widget.ts +16 -1
  147. package/src/electron-browser/menu/electron-context-menu-renderer.ts +2 -2
@@ -39,3 +39,4 @@ export * from './navigatable';
39
39
  export * from './diff-uris';
40
40
  export * from './core-preferences';
41
41
  export * from './view-container';
42
+ export * from './breadcrumbs';
@@ -23,15 +23,16 @@ import { Event, Emitter, Disposable, Path } from '../common';
23
23
  import { FrontendApplicationContribution } from './frontend-application';
24
24
  import { EnvVariablesServer } from '../common/env-variables/env-variables-protocol';
25
25
  import { ResourceLabelFormatter, ResourceLabelFormatting } from '../common/label-protocol';
26
+ import { codicon } from './widgets';
26
27
 
27
28
  /**
28
29
  * @internal don't export it, use `LabelProvider.folderIcon` instead.
29
30
  */
30
- const DEFAULT_FOLDER_ICON = 'fa fa-folder';
31
+ const DEFAULT_FOLDER_ICON = `${codicon('folder')} default-folder-icon`;
31
32
  /**
32
33
  * @internal don't export it, use `LabelProvider.fileIcon` instead.
33
34
  */
34
- const DEFAULT_FILE_ICON = 'fa fa-file';
35
+ const DEFAULT_FILE_ICON = `${codicon('file')} default-file-icon`;
35
36
 
36
37
  /**
37
38
  * Internal folder icon class for the default (File Icons) theme.
@@ -18,7 +18,7 @@
18
18
 
19
19
  import { inject, injectable } from 'inversify';
20
20
  import { Menu } from '../widgets';
21
- import { ContextMenuAccess, ContextMenuRenderer, RenderContextMenuOptions } from '../context-menu-renderer';
21
+ import { ContextMenuAccess, ContextMenuRenderer, coordinateFromAnchor, RenderContextMenuOptions } from '../context-menu-renderer';
22
22
  import { BrowserMainMenuFactory } from './browser-menu-plugin';
23
23
 
24
24
  export class BrowserContextMenuAccess extends ContextMenuAccess {
@@ -38,7 +38,7 @@ export class BrowserContextMenuRenderer extends ContextMenuRenderer {
38
38
 
39
39
  protected doRender({ menuPath, anchor, args, onHide }: RenderContextMenuOptions): BrowserContextMenuAccess {
40
40
  const contextMenu = this.menuFactory.createContextMenu(menuPath, args);
41
- const { x, y } = anchor instanceof MouseEvent ? { x: anchor.clientX, y: anchor.clientY } : anchor!;
41
+ const { x, y } = coordinateFromAnchor(anchor);
42
42
  if (onHide) {
43
43
  contextMenu.aboutToClose.connect(() => onHide!());
44
44
  }
@@ -0,0 +1,78 @@
1
+ /********************************************************************************
2
+ * Copyright (C) 2021 Ericsson and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+
17
+ import URI from '../common/uri';
18
+ import { MaybeArray } from '../common/types';
19
+ import { Widget, BaseWidget } from './widgets';
20
+
21
+ /**
22
+ * `Navigatable` provides an access to an URI of an underlying instance of `Resource`.
23
+ */
24
+ export interface Navigatable {
25
+ /**
26
+ * Return an underlying resource URI.
27
+ */
28
+ getResourceUri(): URI | undefined;
29
+ /**
30
+ * Creates a new URI to which this navigatable should moved based on the given target resource URI.
31
+ */
32
+ createMoveToUri(resourceUri: URI): URI | undefined;
33
+ }
34
+
35
+ export namespace Navigatable {
36
+ export function is(arg: Object | undefined): arg is Navigatable {
37
+ return !!arg && 'getResourceUri' in arg && 'createMoveToUri' in arg;
38
+ }
39
+ }
40
+
41
+ export type NavigatableWidget = BaseWidget & Navigatable;
42
+ export namespace NavigatableWidget {
43
+ export function is(arg: Object | undefined): arg is NavigatableWidget {
44
+ return arg instanceof BaseWidget && Navigatable.is(arg);
45
+ }
46
+ export function* getAffected<T extends Widget>(
47
+ widgets: Iterable<T>,
48
+ context: MaybeArray<URI>
49
+ ): IterableIterator<[URI, T & NavigatableWidget]> {
50
+ const uris = Array.isArray(context) ? context : [context];
51
+ return get(widgets, resourceUri => uris.some(uri => uri.isEqualOrParent(resourceUri)));
52
+ }
53
+ export function* get<T extends Widget>(
54
+ widgets: Iterable<T>,
55
+ filter: (resourceUri: URI) => boolean = () => true
56
+ ): IterableIterator<[URI, T & NavigatableWidget]> {
57
+ for (const widget of widgets) {
58
+ if (NavigatableWidget.is(widget)) {
59
+ const resourceUri = widget.getResourceUri();
60
+ if (resourceUri && filter(resourceUri)) {
61
+ yield [resourceUri, widget];
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+
68
+ export interface NavigatableWidgetOptions {
69
+ kind: 'navigatable',
70
+ uri: string,
71
+ counter?: number,
72
+ }
73
+ export namespace NavigatableWidgetOptions {
74
+ export function is(arg: Object | undefined): arg is NavigatableWidgetOptions {
75
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
76
+ return !!arg && 'kind' in arg && (arg as any).kind === 'navigatable';
77
+ }
78
+ }
@@ -15,68 +15,9 @@
15
15
  ********************************************************************************/
16
16
 
17
17
  import URI from '../common/uri';
18
- import { MaybeArray } from '../common/types';
19
- import { Widget, BaseWidget } from './widgets';
20
18
  import { WidgetOpenHandler, WidgetOpenerOptions } from './widget-open-handler';
21
-
22
- /**
23
- * `Navigatable` provides an access to an URI of an underlying instance of `Resource`.
24
- */
25
- export interface Navigatable {
26
- /**
27
- * Return an underlying resource URI.
28
- */
29
- getResourceUri(): URI | undefined;
30
- /**
31
- * Creates a new URI to which this navigatable should moved based on the given target resource URI.
32
- */
33
- createMoveToUri(resourceUri: URI): URI | undefined;
34
- }
35
-
36
- export namespace Navigatable {
37
- export function is(arg: Object | undefined): arg is Navigatable {
38
- return !!arg && 'getResourceUri' in arg && 'createMoveToUri' in arg;
39
- }
40
- }
41
-
42
- export type NavigatableWidget = BaseWidget & Navigatable;
43
- export namespace NavigatableWidget {
44
- export function is(arg: Object | undefined): arg is NavigatableWidget {
45
- return arg instanceof BaseWidget && Navigatable.is(arg);
46
- }
47
- export function* getAffected<T extends Widget>(
48
- widgets: Iterable<T>,
49
- context: MaybeArray<URI>
50
- ): IterableIterator<[URI, T & NavigatableWidget]> {
51
- const uris = Array.isArray(context) ? context : [context];
52
- return get(widgets, resourceUri => uris.some(uri => uri.isEqualOrParent(resourceUri)));
53
- }
54
- export function* get<T extends Widget>(
55
- widgets: Iterable<T>,
56
- filter: (resourceUri: URI) => boolean = () => true
57
- ): IterableIterator<[URI, T & NavigatableWidget]> {
58
- for (const widget of widgets) {
59
- if (NavigatableWidget.is(widget)) {
60
- const resourceUri = widget.getResourceUri();
61
- if (resourceUri && filter(resourceUri)) {
62
- yield [resourceUri, widget];
63
- }
64
- }
65
- }
66
- }
67
- }
68
-
69
- export interface NavigatableWidgetOptions {
70
- kind: 'navigatable',
71
- uri: string,
72
- counter?: number,
73
- }
74
- export namespace NavigatableWidgetOptions {
75
- export function is(arg: Object | undefined): arg is NavigatableWidgetOptions {
76
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
77
- return !!arg && 'kind' in arg && (arg as any).kind === 'navigatable';
78
- }
79
- }
19
+ import { NavigatableWidget, NavigatableWidgetOptions } from './navigatable-types';
20
+ export * from './navigatable-types';
80
21
 
81
22
  export abstract class NavigatableWidgetOpenHandler<W extends NavigatableWidget> extends WidgetOpenHandler<W> {
82
23
 
@@ -73,7 +73,7 @@ export class ProgressStatusBarItem implements ProgressClient {
73
73
  this.statusBar.removeElement(this.id);
74
74
  return;
75
75
  }
76
- const text = `$(refresh~spin) ${message}`;
76
+ const text = `$(codicon-sync~spin) ${message}`;
77
77
  this.statusBar.setElement(this.id, {
78
78
  text,
79
79
  alignment: StatusBarAlignment.LEFT,
@@ -22,6 +22,7 @@ import { CorePreferences } from '../core-preferences';
22
22
  import { QuickAccessContribution, QuickAccessProvider, QuickAccessRegistry } from './quick-access';
23
23
  import { filterItems, QuickPickItem, QuickPicks } from './quick-input-service';
24
24
  import { KeySequence } from '../keys';
25
+ import { codiconArray } from '../widgets';
25
26
 
26
27
  export const quickCommand: Command = {
27
28
  id: 'workbench.action.showCommands'
@@ -139,7 +140,7 @@ export class QuickCommandService implements QuickAccessContribution, QuickAccess
139
140
  private getItemIconClasses(command: Command): string[] | undefined {
140
141
  const toggledHandler = this.commandRegistry.getToggledHandler(command.id);
141
142
  if (toggledHandler) {
142
- return ['fa fa-check'];
143
+ return codiconArray('check');
143
144
  }
144
145
  return undefined;
145
146
  }
@@ -206,6 +206,10 @@ export interface QuickInputService {
206
206
  Promise<(O extends { canPickMany: true } ? T[] : T) | undefined>;
207
207
  showQuickPick<T extends QuickPickItem>(items: Array<T>, options?: QuickPickOptions<T>): Promise<T>;
208
208
  hide(): void;
209
+ /**
210
+ * Provides raw access to the quick pick controller.
211
+ */
212
+ createQuickPick<T extends QuickPickItem>(): QuickPick<T>;
209
213
  }
210
214
 
211
215
  /**
@@ -38,6 +38,7 @@ import { Emitter } from '../../common/event';
38
38
  import { waitForRevealed, waitForClosed } from '../widgets';
39
39
  import { CorePreferences } from '../core-preferences';
40
40
  import { environment } from '../../common';
41
+ import { BreadcrumbsRendererFactory } from '../breadcrumbs/breadcrumbs-renderer';
41
42
 
42
43
  /** The class name added to ApplicationShell instances. */
43
44
  const APPLICATION_SHELL_CLASS = 'theia-ApplicationShell';
@@ -56,12 +57,14 @@ export type ApplicationShellLayoutVersion =
56
57
  /** view containers are introduced, backward compatible to 2.0 */
57
58
  3.0 |
58
59
  /** git history view is replaced by a more generic scm history view, backward compatible to 3.0 */
59
- 4.0;
60
+ 4.0 |
61
+ /** Replace custom/font-awesome icons with codicons */
62
+ 5.0;
60
63
 
61
64
  /**
62
65
  * When a version is increased, make sure to introduce a migration (ApplicationShellLayoutMigration) to this version.
63
66
  */
64
- export const applicationShellLayoutVersion: ApplicationShellLayoutVersion = 4.0;
67
+ export const applicationShellLayoutVersion: ApplicationShellLayoutVersion = 5.0;
65
68
 
66
69
  export const ApplicationShellOptions = Symbol('ApplicationShellOptions');
67
70
  export const DockPanelRendererFactory = Symbol('DockPanelRendererFactory');
@@ -80,19 +83,24 @@ export class DockPanelRenderer implements DockLayout.IRenderer {
80
83
  constructor(
81
84
  @inject(TabBarRendererFactory) protected readonly tabBarRendererFactory: () => TabBarRenderer,
82
85
  @inject(TabBarToolbarRegistry) protected readonly tabBarToolbarRegistry: TabBarToolbarRegistry,
83
- @inject(TabBarToolbarFactory) protected readonly tabBarToolbarFactory: () => TabBarToolbar
86
+ @inject(TabBarToolbarFactory) protected readonly tabBarToolbarFactory: () => TabBarToolbar,
87
+ @inject(BreadcrumbsRendererFactory) protected readonly breadcrumbsRendererFactory: BreadcrumbsRendererFactory,
84
88
  ) { }
85
89
 
86
90
  createTabBar(): TabBar<Widget> {
87
91
  const renderer = this.tabBarRendererFactory();
88
- const tabBar = new ToolbarAwareTabBar(this.tabBarToolbarRegistry, this.tabBarToolbarFactory, {
89
- renderer,
90
- // Scroll bar options
91
- handlers: ['drag-thumb', 'keyboard', 'wheel', 'touch'],
92
- useBothWheelAxes: true,
93
- scrollXMarginOffset: 4,
94
- suppressScrollY: true
95
- });
92
+ const tabBar = new ToolbarAwareTabBar(
93
+ this.tabBarToolbarRegistry,
94
+ this.tabBarToolbarFactory,
95
+ this.breadcrumbsRendererFactory,
96
+ {
97
+ renderer,
98
+ // Scroll bar options
99
+ handlers: ['drag-thumb', 'keyboard', 'wheel', 'touch'],
100
+ useBothWheelAxes: true,
101
+ scrollXMarginOffset: 4,
102
+ suppressScrollY: true
103
+ });
96
104
  this.tabBarClasses.forEach(c => tabBar.addClass(c));
97
105
  renderer.tabBar = tabBar;
98
106
  tabBar.disposed.connect(() => renderer.dispose());
@@ -256,11 +264,11 @@ export class ApplicationShell extends Widget {
256
264
 
257
265
  if (!environment.electron.is()) {
258
266
  this.corePreferences.ready.then(() => {
259
- this.setTopPanelVisibily(this.corePreferences['window.menuBarVisibility']);
267
+ this.setTopPanelVisibility(this.corePreferences['window.menuBarVisibility']);
260
268
  });
261
269
  this.corePreferences.onPreferenceChanged(preference => {
262
270
  if (preference.preferenceName === 'window.menuBarVisibility') {
263
- this.setTopPanelVisibily(preference.newValue);
271
+ this.setTopPanelVisibility(preference.newValue);
264
272
  }
265
273
  });
266
274
  }
@@ -293,7 +301,7 @@ export class ApplicationShell extends Widget {
293
301
  this.activeChanged.connect(updateFocusContextKeys);
294
302
  }
295
303
 
296
- protected setTopPanelVisibily(preference: string): void {
304
+ protected setTopPanelVisibility(preference: string): void {
297
305
  const hiddenPreferences = ['compact', 'hidden'];
298
306
  this.topPanel.setHidden(hiddenPreferences.includes(preference));
299
307
  }
@@ -1365,7 +1373,7 @@ export class ApplicationShell extends Widget {
1365
1373
  this.statusBar.removeElement(BOTTOM_PANEL_TOGGLE_ID);
1366
1374
  } else {
1367
1375
  const element: StatusBarEntry = {
1368
- text: '$(window-maximize)',
1376
+ text: '$(codicon-window)',
1369
1377
  alignment: StatusBarAlignment.RIGHT,
1370
1378
  tooltip: 'Toggle Bottom Panel',
1371
1379
  command: 'core.toggle.bottom.panel',
@@ -17,7 +17,7 @@
17
17
  import debounce = require('lodash.debounce');
18
18
  import * as React from 'react';
19
19
  import { inject, injectable, named } from 'inversify';
20
- import { Widget, ReactWidget } from '../widgets';
20
+ import { Widget, ReactWidget, codicon, ACTION_ITEM } from '../widgets';
21
21
  import { LabelParser, LabelIcon } from '../label-parser';
22
22
  import { ContributionProvider } from '../../common/contribution-provider';
23
23
  import { FrontendApplicationContribution } from '../frontend-application';
@@ -369,8 +369,9 @@ export class TabBarToolbar extends ReactWidget {
369
369
  }
370
370
  }
371
371
  const command = this.commands.getCommand(item.command);
372
- const iconClass = (typeof item.icon === 'function' && item.icon()) || item.icon || (command && command.iconClass);
372
+ let iconClass = (typeof item.icon === 'function' && item.icon()) || item.icon as string || (command && command.iconClass);
373
373
  if (iconClass) {
374
+ iconClass += ` ${ACTION_ITEM}`;
374
375
  classNames.push(iconClass);
375
376
  }
376
377
  const tooltip = item.tooltip || (command && command.label);
@@ -402,7 +403,7 @@ export class TabBarToolbar extends ReactWidget {
402
403
 
403
404
  protected renderMore(): React.ReactNode {
404
405
  return !!this.more.size && <div key='__more__' className={TabBarToolbar.Styles.TAB_BAR_TOOLBAR_ITEM + ' enabled'}>
405
- <div id='__more__' className='fa fa-ellipsis-h' onClick={this.showMoreContextMenu} title='More Actions...' />
406
+ <div id='__more__' className={codicon('ellipsis', true)} onClick={this.showMoreContextMenu} title='More Actions...' />
406
407
  </div>;
407
408
  }
408
409
 
@@ -20,7 +20,7 @@ import { VirtualElement, h, VirtualDOM, ElementInlineStyle } from '@phosphor/vir
20
20
  import { Disposable, DisposableCollection, MenuPath, notEmpty } from '../../common';
21
21
  import { ContextMenuRenderer } from '../context-menu-renderer';
22
22
  import { Signal, Slot } from '@phosphor/signaling';
23
- import { Message } from '@phosphor/messaging';
23
+ import { Message, MessageLoop } from '@phosphor/messaging';
24
24
  import { ArrayExt } from '@phosphor/algorithm';
25
25
  import { ElementExt } from '@phosphor/domutils';
26
26
  import { TabBarToolbarRegistry, TabBarToolbar } from './tab-bar-toolbar';
@@ -28,6 +28,8 @@ import { TheiaDockPanel, MAIN_AREA_ID, BOTTOM_AREA_ID } from './theia-dock-panel
28
28
  import { WidgetDecoration } from '../widget-decoration';
29
29
  import { TabBarDecoratorService } from './tab-bar-decorator';
30
30
  import { IconThemeService } from '../icon-theme-service';
31
+ import { BreadcrumbsRenderer, BreadcrumbsRendererFactory } from '../breadcrumbs/breadcrumbs-renderer';
32
+ import { NavigatableWidget } from '../navigatable-types';
31
33
 
32
34
  /** The class name added to hidden content nodes, which are required to render vertical side bars. */
33
35
  const HIDDEN_CONTENT_CLASS = 'theia-TabBar-hidden-content';
@@ -576,22 +578,38 @@ export class ScrollableTabBar extends TabBar<Widget> {
576
578
  *
577
579
  * +-------------------------+-----------------+
578
580
  * |[TAB_0][TAB_1][TAB_2][TAB| Toolbar |
579
- * +-------------Scrollable--+-None-Scrollable-+
581
+ * +-------------Scrollable--+-Non-Scrollable-+
580
582
  *
581
583
  */
582
584
  export class ToolbarAwareTabBar extends ScrollableTabBar {
583
585
 
584
- protected contentContainer: HTMLElement | undefined;
586
+ protected contentContainer: HTMLElement;
585
587
  protected toolbar: TabBarToolbar | undefined;
588
+ protected breadcrumbsContainer: HTMLElement;
589
+ protected readonly breadcrumbsRenderer: BreadcrumbsRenderer;
590
+ protected topRow: HTMLElement;
586
591
 
587
592
  constructor(
588
593
  protected readonly tabBarToolbarRegistry: TabBarToolbarRegistry,
589
594
  protected readonly tabBarToolbarFactory: () => TabBarToolbar,
590
- protected readonly options?: TabBar.IOptions<Widget> & PerfectScrollbar.Options) {
591
-
595
+ protected readonly breadcrumbsRendererFactory: BreadcrumbsRendererFactory,
596
+ protected readonly options?: TabBar.IOptions<Widget> & PerfectScrollbar.Options,
597
+ ) {
592
598
  super(options);
599
+ this.breadcrumbsRenderer = this.breadcrumbsRendererFactory();
593
600
  this.rewireDOM();
594
601
  this.toDispose.push(this.tabBarToolbarRegistry.onDidChange(() => this.update()));
602
+ this.toDispose.push(this.breadcrumbsRenderer);
603
+ this.toDispose.push(this.breadcrumbsRenderer.onDidChangeActiveState(active => {
604
+ this.node.classList.toggle('theia-tabBar-multirow', active);
605
+ if (this.parent) {
606
+ MessageLoop.sendMessage(this.parent, new Message('fit-request'));
607
+ }
608
+ }));
609
+ this.node.classList.toggle('theia-tabBar-multirow', this.breadcrumbsRenderer.active);
610
+ const handler = () => this.updateBreadcrumbs();
611
+ this.currentChanged.connect(handler);
612
+ this.toDispose.push(Disposable.create(() => this.currentChanged.disconnect(handler)));
595
613
  }
596
614
 
597
615
  /**
@@ -612,12 +630,22 @@ export class ToolbarAwareTabBar extends ScrollableTabBar {
612
630
  return this.node.getElementsByClassName(ToolbarAwareTabBar.Styles.TAB_BAR_CONTENT_CONTAINER)[0] as HTMLElement;
613
631
  }
614
632
 
633
+ protected async updateBreadcrumbs(): Promise<void> {
634
+ const current = this.currentTitle?.owner;
635
+ const uri = NavigatableWidget.is(current) ? current.getResourceUri() : undefined;
636
+ await this.breadcrumbsRenderer.refresh(uri);
637
+ }
638
+
615
639
  protected onAfterAttach(msg: Message): void {
616
640
  if (this.toolbar) {
617
641
  if (this.toolbar.isAttached) {
618
642
  Widget.detach(this.toolbar);
619
643
  }
620
- Widget.attach(this.toolbar, this.node);
644
+ Widget.attach(this.toolbar, this.topRow);
645
+ if (this.breadcrumbsContainer) {
646
+ this.node.appendChild(this.breadcrumbsContainer);
647
+ }
648
+ this.breadcrumbsRenderer?.refresh();
621
649
  }
622
650
  super.onAfterAttach(msg);
623
651
  }
@@ -660,16 +688,22 @@ export class ToolbarAwareTabBar extends ScrollableTabBar {
660
688
  protected rewireDOM(): void {
661
689
  const contentNode = this.node.getElementsByClassName(ToolbarAwareTabBar.Styles.TAB_BAR_CONTENT)[0];
662
690
  if (!contentNode) {
663
- throw new Error("'this.node' does not have the content as a direct children with class name 'p-TabBar-content'.");
691
+ throw new Error("'this.node' does not have the content as a direct child with class name 'p-TabBar-content'.");
664
692
  }
665
693
  this.node.removeChild(contentNode);
694
+ this.topRow = document.createElement('div');
695
+ this.topRow.classList.add('theia-tabBar-tab-row');
666
696
  this.contentContainer = document.createElement('div');
667
697
  this.contentContainer.classList.add(ToolbarAwareTabBar.Styles.TAB_BAR_CONTENT_CONTAINER);
668
698
  this.contentContainer.appendChild(contentNode);
669
- this.node.appendChild(this.contentContainer);
699
+ this.topRow.appendChild(this.contentContainer);
700
+ this.node.appendChild(this.topRow);
670
701
  this.toolbar = this.tabBarToolbarFactory();
702
+ this.breadcrumbsContainer = document.createElement('div');
703
+ this.breadcrumbsContainer.classList.add('theia-tabBar-breadcrumb-row');
704
+ this.breadcrumbsContainer.appendChild(this.breadcrumbsRenderer.host);
705
+ this.node.appendChild(this.breadcrumbsContainer);
671
706
  }
672
-
673
707
  }
674
708
 
675
709
  export namespace ToolbarAwareTabBar {