UNPKG

1.61 kBTypeScriptView Raw
1import { ContributionProvider, Emitter, Event } from '../../common';
2import URI from '../../common/uri';
3import { Coordinate } from '../context-menu-renderer';
4import { BreadcrumbPopupContainer, BreadcrumbPopupContainerFactory } from './breadcrumb-popup-container';
5import { BreadcrumbsContribution, Breadcrumb } from './breadcrumbs-constants';
6export declare class BreadcrumbsService {
7 protected readonly contributions: ContributionProvider<BreadcrumbsContribution>;
8 protected readonly breadcrumbPopupContainerFactory: BreadcrumbPopupContainerFactory;
9 protected hasSubscribed: boolean;
10 protected popupsOverlayContainer: HTMLDivElement;
11 protected readonly onDidChangeBreadcrumbsEmitter: Emitter<URI>;
12 init(): void;
13 protected createOverlayContainer(): void;
14 /**
15 * Subscribe to this event emitter to be notified when the breadcrumbs have changed.
16 * The URI is the URI of the editor the breadcrumbs have changed for.
17 */
18 get onDidChangeBreadcrumbs(): Event<URI>;
19 /**
20 * Subscribes to the onDidChangeBreadcrumbs events for all contributions.
21 */
22 protected subscribeToContributions(): void;
23 /**
24 * Returns the breadcrumbs for a given URI, possibly an empty list.
25 */
26 getBreadcrumbs(uri: URI): Promise<Breadcrumb[]>;
27 protected prioritizedContributions(): Promise<BreadcrumbsContribution[]>;
28 /**
29 * Opens a popup for the given breadcrumb at the given position.
30 */
31 openPopup(breadcrumb: Breadcrumb, position: Coordinate): Promise<BreadcrumbPopupContainer | undefined>;
32}
33//# sourceMappingURL=breadcrumbs-service.d.ts.map
\No newline at end of file