@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
@@ -0,0 +1,108 @@
1
+ /********************************************************************************
2
+ * Copyright (C) 2019 TypeFox 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 { inject, injectable, named, postConstruct } from 'inversify';
18
+ import { ContributionProvider, Prioritizeable, Emitter, Event } from '../../common';
19
+ import URI from '../../common/uri';
20
+ import { Coordinate } from '../context-menu-renderer';
21
+ import { BreadcrumbPopupContainer, BreadcrumbPopupContainerFactory } from './breadcrumb-popup-container';
22
+ import { BreadcrumbsContribution, Styles, Breadcrumb } from './breadcrumbs-constants';
23
+
24
+ @injectable()
25
+ export class BreadcrumbsService {
26
+
27
+ @inject(ContributionProvider) @named(BreadcrumbsContribution)
28
+ protected readonly contributions: ContributionProvider<BreadcrumbsContribution>;
29
+
30
+ @inject(BreadcrumbPopupContainerFactory) protected readonly breadcrumbPopupContainerFactory: BreadcrumbPopupContainerFactory;
31
+
32
+ protected hasSubscribed = false;
33
+
34
+ protected popupsOverlayContainer: HTMLDivElement;
35
+
36
+ protected readonly onDidChangeBreadcrumbsEmitter = new Emitter<URI>();
37
+
38
+ @postConstruct()
39
+ init(): void {
40
+ this.createOverlayContainer();
41
+ }
42
+
43
+ protected createOverlayContainer(): void {
44
+ this.popupsOverlayContainer = window.document.createElement('div');
45
+ this.popupsOverlayContainer.id = Styles.BREADCRUMB_POPUP_OVERLAY_CONTAINER;
46
+ if (window.document.body) {
47
+ window.document.body.appendChild(this.popupsOverlayContainer);
48
+ }
49
+ }
50
+
51
+ /**
52
+ * Subscribe to this event emitter to be notified when the breadcrumbs have changed.
53
+ * The URI is the URI of the editor the breadcrumbs have changed for.
54
+ */
55
+ get onDidChangeBreadcrumbs(): Event<URI> {
56
+ // This lazy subscription is to address problems in inversify's instantiation routine
57
+ // related to use of the IconThemeService by different components instantiated by the
58
+ // ContributionProvider.
59
+ if (!this.hasSubscribed) {
60
+ this.subscribeToContributions();
61
+ }
62
+ return this.onDidChangeBreadcrumbsEmitter.event;
63
+ }
64
+
65
+ /**
66
+ * Subscribes to the onDidChangeBreadcrumbs events for all contributions.
67
+ */
68
+ protected subscribeToContributions(): void {
69
+ this.hasSubscribed = true;
70
+ for (const contribution of this.contributions.getContributions()) {
71
+ contribution.onDidChangeBreadcrumbs(uri => this.onDidChangeBreadcrumbsEmitter.fire(uri));
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Returns the breadcrumbs for a given URI, possibly an empty list.
77
+ */
78
+ async getBreadcrumbs(uri: URI): Promise<Breadcrumb[]> {
79
+ const result: Breadcrumb[] = [];
80
+ for (const contribution of await this.prioritizedContributions()) {
81
+ result.push(...await contribution.computeBreadcrumbs(uri));
82
+ }
83
+ return result;
84
+ }
85
+
86
+ protected async prioritizedContributions(): Promise<BreadcrumbsContribution[]> {
87
+ const prioritized = await Prioritizeable.prioritizeAll(
88
+ this.contributions.getContributions(), contribution => contribution.priority);
89
+ return prioritized.map(p => p.value).reverse();
90
+ }
91
+
92
+ /**
93
+ * Opens a popup for the given breadcrumb at the given position.
94
+ */
95
+ async openPopup(breadcrumb: Breadcrumb, position: Coordinate): Promise<BreadcrumbPopupContainer | undefined> {
96
+ const contribution = this.contributions.getContributions().find(c => c.type === breadcrumb.type);
97
+ if (contribution) {
98
+ const popup = this.breadcrumbPopupContainerFactory(this.popupsOverlayContainer, breadcrumb.id, position);
99
+ const popupContent = await contribution.attachPopupContent(breadcrumb, popup.container);
100
+ if (popupContent && popup.isOpen) {
101
+ popup.onDidDispose(() => popupContent.dispose());
102
+ } else {
103
+ popupContent?.dispose();
104
+ }
105
+ return popup;
106
+ }
107
+ }
108
+ }
@@ -0,0 +1,21 @@
1
+ /********************************************************************************
2
+ * Copyright (C) 2019 TypeFox 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
+ export * from './breadcrumb-popup-container';
18
+ export * from './breadcrumb-renderer';
19
+ export * from './breadcrumbs-renderer';
20
+ export * from './breadcrumbs-service';
21
+ export * from './breadcrumbs-constants';
@@ -1921,6 +1921,51 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
1921
1921
  light: '#c5c5c5',
1922
1922
  hc: '#c5c5c5'
1923
1923
  }, description: 'Editor gutter decoration color for commenting ranges.'
1924
+ },
1925
+ {
1926
+ id: 'breadcrumb.foreground',
1927
+ defaults: {
1928
+ dark: Color.transparent('foreground', 0.8),
1929
+ light: Color.transparent('foreground', 0.8),
1930
+ hc: Color.transparent('foreground', 0.8),
1931
+ },
1932
+ description: 'Color of breadcrumb item text'
1933
+ },
1934
+ {
1935
+ id: 'breadcrumb.background',
1936
+ defaults: {
1937
+ dark: 'editor.background',
1938
+ light: 'editor.background',
1939
+ hc: 'editor.background',
1940
+ },
1941
+ description: 'Color of breadcrumb item background'
1942
+ },
1943
+ {
1944
+ id: 'breadcrumb.focusForeground',
1945
+ defaults: {
1946
+ dark: Color.lighten('foreground', 0.1),
1947
+ light: Color.darken('foreground', 0.2),
1948
+ hc: Color.lighten('foreground', 0.1),
1949
+ },
1950
+ description: 'Color of breadcrumb item text when focused'
1951
+ },
1952
+ {
1953
+ id: 'breadcrumb.activeSelectionForeground',
1954
+ defaults: {
1955
+ dark: Color.lighten('foreground', 0.1),
1956
+ light: Color.darken('foreground', 0.2),
1957
+ hc: Color.lighten('foreground', 0.1),
1958
+ },
1959
+ description: 'Color of selected breadcrumb item'
1960
+ },
1961
+ {
1962
+ id: 'breadcrumbPicker.background',
1963
+ defaults: {
1964
+ dark: 'editorWidget.background',
1965
+ light: 'editorWidget.background',
1966
+ hc: 'editorWidget.background',
1967
+ },
1968
+ description: 'Background color of breadcrumb item picker'
1924
1969
  }
1925
1970
  );
1926
1971
  }
@@ -20,12 +20,20 @@ import { injectable } from 'inversify';
20
20
  import { MenuPath } from '../common/menu';
21
21
  import { Disposable, DisposableCollection } from '../common/disposable';
22
22
 
23
- export type Anchor = MouseEvent | { x: number, y: number };
23
+ export interface Coordinate { x: number; y: number; }
24
+ export const Coordinate = Symbol('Coordinate');
24
25
 
25
- export function toAnchor(anchor: HTMLElement | { x: number, y: number }): Anchor {
26
+ export type Anchor = MouseEvent | Coordinate;
27
+
28
+ export function toAnchor(anchor: HTMLElement | Coordinate): Anchor {
26
29
  return anchor instanceof HTMLElement ? { x: anchor.offsetLeft, y: anchor.offsetTop } : anchor;
27
30
  }
28
31
 
32
+ export function coordinateFromAnchor(anchor: Anchor): Coordinate {
33
+ const { x, y } = anchor instanceof MouseEvent ? { x: anchor.clientX, y: anchor.clientY } : anchor;
34
+ return { x, y };
35
+ }
36
+
29
37
  export abstract class ContextMenuAccess implements Disposable {
30
38
 
31
39
  protected readonly toDispose = new DisposableCollection();
@@ -23,6 +23,55 @@ import { isOSX } from '../common/os';
23
23
  export const corePreferenceSchema: PreferenceSchema = {
24
24
  'type': 'object',
25
25
  properties: {
26
+ 'application.confirmExit': {
27
+ type: 'string',
28
+ enum: [
29
+ 'never',
30
+ 'ifRequired',
31
+ 'always',
32
+ ],
33
+ default: 'ifRequired',
34
+ description: 'When to confirm before closing the application window.',
35
+ },
36
+ 'breadcrumbs.enabled': {
37
+ 'type': 'boolean',
38
+ 'default': true,
39
+ 'description': 'Enable/disable navigation breadcrumbs.',
40
+ 'scope': 'application'
41
+ },
42
+ 'files.encoding': {
43
+ 'type': 'string',
44
+ 'enum': Object.keys(SUPPORTED_ENCODINGS),
45
+ 'default': 'utf8',
46
+ 'description': 'The default character set encoding to use when reading and writing files. This setting can also be configured per language.',
47
+ 'scope': 'language-overridable',
48
+ 'enumDescriptions': Object.keys(SUPPORTED_ENCODINGS).map(key => SUPPORTED_ENCODINGS[key].labelLong),
49
+ 'included': Object.keys(SUPPORTED_ENCODINGS).length > 1
50
+ },
51
+ 'keyboard.dispatch': {
52
+ type: 'string',
53
+ enum: [
54
+ 'code',
55
+ 'keyCode',
56
+ ],
57
+ default: 'code',
58
+ description: 'Whether to interpret keypresses by the `code` of the physical key, or by the `keyCode` provided by the OS.'
59
+ },
60
+ 'window.menuBarVisibility': {
61
+ type: 'string',
62
+ enum: ['classic', 'visible', 'hidden', 'compact'],
63
+ markdownEnumDescriptions: [
64
+ 'Menu is displayed at the top of the window and only hidden in full screen mode.',
65
+ 'Menu is always visible at the top of the window even in full screen mode.',
66
+ 'Menu is always hidden.',
67
+ 'Menu is displayed as a compact button in the sidebar.'
68
+ ],
69
+ default: 'classic',
70
+ scope: 'application',
71
+ markdownDescription: `Control the visibility of the menu bar.
72
+ A setting of 'compact' will move the menu into the sidebar.`,
73
+ included: !isOSX
74
+ },
26
75
  'workbench.list.openMode': {
27
76
  type: 'string',
28
77
  enum: [
@@ -43,16 +92,6 @@ export const corePreferenceSchema: PreferenceSchema = {
43
92
  'description': 'Controls whether editors showing a file that was opened during the session should close automatically when getting deleted or renamed by some other process. Disabling this will keep the editor open on such an event. Note that deleting from within the application will always close the editor and that dirty files will never close to preserve your data.',
44
93
  'default': false
45
94
  },
46
- 'application.confirmExit': {
47
- type: 'string',
48
- enum: [
49
- 'never',
50
- 'ifRequired',
51
- 'always',
52
- ],
53
- default: 'ifRequired',
54
- description: 'When to confirm before closing the application window.',
55
- },
56
95
  'workbench.commandPalette.history': {
57
96
  type: 'number',
58
97
  default: 50,
@@ -74,51 +113,21 @@ export const corePreferenceSchema: PreferenceSchema = {
74
113
  default: false,
75
114
  description: 'Controls whether to suppress notification popups.'
76
115
  },
77
- 'files.encoding': {
78
- 'type': 'string',
79
- 'enum': Object.keys(SUPPORTED_ENCODINGS),
80
- 'default': 'utf8',
81
- 'description': 'The default character set encoding to use when reading and writing files. This setting can also be configured per language.',
82
- 'scope': 'language-overridable',
83
- 'enumDescriptions': Object.keys(SUPPORTED_ENCODINGS).map(key => SUPPORTED_ENCODINGS[key].labelLong),
84
- 'included': Object.keys(SUPPORTED_ENCODINGS).length > 1
85
- },
86
116
  'workbench.tree.renderIndentGuides': {
87
117
  type: 'string',
88
118
  enum: ['onHover', 'none', 'always'],
89
119
  default: 'onHover',
90
120
  description: 'Controls whether the tree should render indent guides.'
91
121
  },
92
- 'keyboard.dispatch': {
93
- type: 'string',
94
- enum: [
95
- 'code',
96
- 'keyCode',
97
- ],
98
- default: 'code',
99
- description: 'Whether to interpret keypresses by the `code` of the physical key, or by the `keyCode` provided by the OS.'
100
- },
101
- 'window.menuBarVisibility': {
102
- type: 'string',
103
- enum: ['classic', 'visible', 'hidden', 'compact'],
104
- markdownEnumDescriptions: [
105
- 'Menu is displayed at the top of the window and only hidden in full screen mode.',
106
- 'Menu is always visible at the top of the window even in full screen mode.',
107
- 'Menu is always hidden.',
108
- 'Menu is displayed as a compact button in the sidebar.'
109
- ],
110
- default: 'classic',
111
- scope: 'application',
112
- markdownDescription: `Control the visibility of the menu bar.
113
- A setting of 'compact' will move the menu into the sidebar.`,
114
- included: !isOSX
115
- },
116
122
  }
117
123
  };
118
124
 
119
125
  export interface CoreConfiguration {
120
126
  'application.confirmExit': 'never' | 'ifRequired' | 'always';
127
+ 'breadcrumbs.enabled': boolean;
128
+ 'files.encoding': string
121
129
  'keyboard.dispatch': 'code' | 'keyCode';
130
+ 'window.menuBarVisibility': 'classic' | 'visible' | 'hidden' | 'compact';
122
131
  'workbench.list.openMode': 'singleClick' | 'doubleClick';
123
132
  'workbench.commandPalette.history': number;
124
133
  'workbench.editor.highlightModifiedTabs': boolean;
@@ -126,9 +135,7 @@ export interface CoreConfiguration {
126
135
  'workbench.colorTheme': string;
127
136
  'workbench.iconTheme': string | null;
128
137
  'workbench.silentNotifications': boolean;
129
- 'files.encoding': string
130
138
  'workbench.tree.renderIndentGuides': 'onHover' | 'none' | 'always';
131
- 'window.menuBarVisibility': 'classic' | 'visible' | 'hidden' | 'compact';
132
139
  }
133
140
 
134
141
  export const CorePreferenceContribution = Symbol('CorePreferenceContribution');
@@ -17,7 +17,7 @@
17
17
  import { injectable, inject } from 'inversify';
18
18
  import { Disposable, MaybePromise, CancellationTokenSource } from '../common';
19
19
  import { Key } from './keyboard/keys';
20
- import { Widget, BaseWidget, Message, addKeyListener } from './widgets';
20
+ import { Widget, BaseWidget, Message, addKeyListener, codiconArray } from './widgets';
21
21
  import { FrontendApplicationContribution } from './frontend-application';
22
22
 
23
23
  @injectable()
@@ -168,8 +168,7 @@ export abstract class AbstractDialog<T> extends BaseWidget {
168
168
  titleContentNode.appendChild(this.titleNode);
169
169
 
170
170
  this.closeCrossNode = document.createElement('i');
171
- this.closeCrossNode.classList.add('fa');
172
- this.closeCrossNode.classList.add('fa-times');
171
+ this.closeCrossNode.classList.add(...codiconArray('close'));
173
172
  this.closeCrossNode.classList.add('closeButton');
174
173
  titleContentNode.appendChild(this.closeCrossNode);
175
174
 
@@ -17,6 +17,7 @@
17
17
  import { injectable, inject } from 'inversify';
18
18
  import URI from '../common/uri';
19
19
  import { LabelProviderContribution, LabelProvider, DidChangeLabelEvent } from './label-provider';
20
+ import { codicon } from './widgets';
20
21
 
21
22
  export namespace DiffUris {
22
23
 
@@ -101,7 +102,7 @@ export class DiffUriLabelProviderContribution implements LabelProviderContributi
101
102
  }
102
103
 
103
104
  getIcon(uri: URI): string {
104
- return 'fa fa-columns';
105
+ return codicon('split-horizontal');
105
106
  }
106
107
 
107
108
  affects(diffUri: URI, event: DidChangeLabelEvent): boolean {
@@ -50,7 +50,7 @@ import { StatusBar, StatusBarImpl } from './status-bar/status-bar';
50
50
  import { LabelParser } from './label-parser';
51
51
  import { LabelProvider, LabelProviderContribution, DefaultUriLabelProviderContribution } from './label-provider';
52
52
  import { PreferenceService } from './preferences';
53
- import { ContextMenuRenderer } from './context-menu-renderer';
53
+ import { ContextMenuRenderer, Coordinate } from './context-menu-renderer';
54
54
  import { ThemeService } from './theming';
55
55
  import { ConnectionStatusService, FrontendConnectionStatusService, ApplicationConnectionStatusContribution, PingService } from './connection-status-service';
56
56
  import { DiffUriLabelProviderContribution } from './diff-uris';
@@ -96,16 +96,28 @@ import { keytarServicePath, KeytarService } from '../common/keytar-protocol';
96
96
  import { CredentialsService, CredentialsServiceImpl } from './credentials-service';
97
97
  import { ContributionFilterRegistry, ContributionFilterRegistryImpl } from '../common/contribution-filter';
98
98
  import { QuickCommandFrontendContribution } from './quick-input/quick-command-frontend-contribution';
99
- import { QuickHelpService } from './quick-input/quick-help-service';
100
99
  import { QuickPickService, quickPickServicePath } from '../common/quick-pick-service';
101
100
  import {
102
101
  QuickPickServiceImpl,
103
- QuickInputFrontendContribution
102
+ QuickInputFrontendContribution,
103
+ QuickAccessContribution,
104
+ QuickCommandService,
105
+ QuickHelpService
104
106
  } from './quick-input';
105
- import { QuickAccessContribution } from './quick-input/quick-access';
106
- import { QuickCommandService } from './quick-input/quick-command-service';
107
107
  import { SidebarBottomMenuWidget } from './shell/sidebar-bottom-menu-widget';
108
108
  import { WindowContribution } from './window-contribution';
109
+ import {
110
+ BreadcrumbID,
111
+ BreadcrumbPopupContainer,
112
+ BreadcrumbPopupContainerFactory,
113
+ BreadcrumbRenderer,
114
+ BreadcrumbsContribution,
115
+ BreadcrumbsRenderer,
116
+ BreadcrumbsRendererFactory,
117
+ BreadcrumbsService,
118
+ DefaultBreadcrumbRenderer,
119
+ } from './breadcrumbs';
120
+ import { RendererHost } from './widgets';
109
121
 
110
122
  export { bindResourceProvider, bindMessageService, bindPreferenceService };
111
123
 
@@ -150,13 +162,7 @@ export const frontendApplicationModule = new ContainerModule((bind, unbind, isBo
150
162
  return container.get(TabBarToolbar);
151
163
  });
152
164
 
153
- bind(DockPanelRendererFactory).toFactory(context => () => {
154
- const { container } = context;
155
- const tabBarToolbarRegistry = container.get(TabBarToolbarRegistry);
156
- const tabBarRendererFactory: () => TabBarRenderer = container.get(TabBarRendererFactory);
157
- const tabBarToolbarFactory: () => TabBarToolbar = container.get(TabBarToolbarFactory);
158
- return new DockPanelRenderer(tabBarRendererFactory, tabBarToolbarRegistry, tabBarToolbarFactory);
159
- });
165
+ bind(DockPanelRendererFactory).toFactory(context => () => context.container.get(DockPanelRenderer));
160
166
  bind(DockPanelRenderer).toSelf();
161
167
  bind(TabBarRendererFactory).toFactory(context => () => {
162
168
  const contextMenuRenderer = context.container.get<ContextMenuRenderer>(ContextMenuRenderer);
@@ -361,4 +367,22 @@ export const frontendApplicationModule = new ContainerModule((bind, unbind, isBo
361
367
  for (const contribution of [CommandContribution, KeybindingContribution, MenuContribution]) {
362
368
  bind(contribution).toService(WindowContribution);
363
369
  }
370
+ bindContributionProvider(bind, BreadcrumbsContribution);
371
+ bind(BreadcrumbsService).toSelf().inSingletonScope();
372
+ bind(BreadcrumbsRenderer).toSelf();
373
+ bind(BreadcrumbsRendererFactory).toFactory(ctx =>
374
+ () => {
375
+ const childContainer = ctx.container.createChild();
376
+ childContainer.bind(BreadcrumbRenderer).to(DefaultBreadcrumbRenderer).inSingletonScope();
377
+ return childContainer.get(BreadcrumbsRenderer);
378
+ }
379
+ );
380
+ bind(BreadcrumbPopupContainer).toSelf();
381
+ bind(BreadcrumbPopupContainerFactory).toFactory(({ container }) => (parent: HTMLElement, breadcrumbId: string, position: Coordinate): BreadcrumbPopupContainer => {
382
+ const child = container.createChild();
383
+ child.bind(RendererHost).toConstantValue(parent);
384
+ child.bind(BreadcrumbID).toConstantValue(breadcrumbId);
385
+ child.bind(Coordinate).toConstantValue(position);
386
+ return child.get(BreadcrumbPopupContainer);
387
+ });
364
388
  });