import { ApplicationShell, ViewContainer as ViewContainerWidget, WidgetManager, QuickViewService, ViewContainerIdentifier, ViewContainerTitleOptions, Widget, FrontendApplicationContribution, StatefulWidget, TreeViewWelcomeWidget, ViewContainerPart } from '@theia/core/lib/browser'; import { ViewContainer, View, ViewWelcome } from '../../../common'; import { PluginSharedStyle } from '../plugin-shared-style'; import { PluginViewWidget, PluginViewWidgetIdentifier } from './plugin-view-widget'; import { ScmContribution } from '@theia/scm/lib/browser/scm-contribution'; import { FileNavigatorContribution } from '@theia/navigator/lib/browser/navigator-contribution'; import { DebugFrontendApplicationContribution } from '@theia/debug/lib/browser/debug-frontend-application-contribution'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { CommandRegistry } from '@theia/core/lib/common/command'; import { MenuModelRegistry } from '@theia/core/lib/common/menu'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { ContextKeyService } from '@theia/core/lib/browser/context-key-service'; import { ViewContextKeyService } from './view-context-key-service'; import { TreeViewWidget } from './tree-view-widget'; import { WebviewView, WebviewViewResolver } from '../webview-views/webview-views'; import { CancellationToken } from '@theia/core/lib/common/cancellation'; export declare const PLUGIN_VIEW_FACTORY_ID = "plugin-view"; export declare const PLUGIN_VIEW_CONTAINER_FACTORY_ID = "plugin-view-container"; export declare const PLUGIN_VIEW_DATA_FACTORY_ID = "plugin-view-data"; export type ViewDataProvider = (params: { state?: object; viewInfo: View; }) => Promise; export interface ViewContainerInfo { id: string; location: string; options: ViewContainerTitleOptions; onViewAdded: () => void; } export declare class PluginViewRegistry implements FrontendApplicationContribution { protected readonly shell: ApplicationShell; protected readonly style: PluginSharedStyle; protected readonly widgetManager: WidgetManager; protected readonly scm: ScmContribution; protected readonly explorer: FileNavigatorContribution; protected readonly debug: DebugFrontendApplicationContribution; protected readonly commands: CommandRegistry; protected readonly menus: MenuModelRegistry; protected readonly quickView: QuickViewService; protected readonly contextKeyService: ContextKeyService; protected readonly viewContextKeys: ViewContextKeyService; protected readonly onDidExpandViewEmitter: Emitter; readonly onDidExpandView: Event; private readonly views; private readonly viewsWelcome; private readonly viewContainers; private readonly containerViews; private readonly viewClauseContexts; private readonly viewDataProviders; private readonly viewDataState; private readonly webviewViewResolvers; protected readonly onNewResolverRegisteredEmitter: Emitter<{ readonly viewType: string; }>; readonly onNewResolverRegistered: Event<{ readonly viewType: string; }>; private readonly webviewViewRevivals; private nextViewContainerId; private static readonly BUILTIN_VIEW_CONTAINERS; private static readonly ID_MAPPINGS; protected init(): void; protected updateViewWelcomeVisibility(viewId: string): Promise; protected updateViewVisibility(viewId: string): Promise; protected isViewVisible(viewId: string): boolean; registerViewContainer(location: string, viewContainer: ViewContainer): Disposable; protected toggleViewContainer(id: string): Promise; protected doRegisterViewContainer(id: string, location: string, options: ViewContainerTitleOptions): Disposable; getContainerViews(viewContainerId: string): string[]; registerView(viewContainerId: string, view: View): Disposable; resolveWebviewView(viewId: string, webview: WebviewView, cancellation: CancellationToken): Promise; registerWebviewView(viewId: string, resolver: WebviewViewResolver): Promise; protected createNewWebviewView(viewId: string): Promise; registerViewWelcome(viewWelcome: ViewWelcome): Disposable; handleViewWelcomeChange(viewId: string): Promise; protected getTreeViewWelcomeWidget(viewId: string): Promise; getViewWelcomes(viewId: string): ViewWelcome[]; getView(viewId: string): Promise; openView(viewId: string, options?: { activate?: boolean; reveal?: boolean; }): Promise; protected doOpenView(viewId: string): Promise; protected prepareView(widget: PluginViewWidget): Promise; protected getOrCreateViewContainerWidget(containerId: string): Promise; openViewContainer(containerId: string): Promise; protected prepareViewContainer(viewContainerId: string, containerWidget: ViewContainerWidget): Promise; protected registerWidgetPartEvents(widget: PluginViewWidget, containerWidget: ViewContainerWidget): ViewContainerPart | undefined; protected getViewContainerId(container: ViewContainerWidget): string | undefined; protected getPluginViewContainer(viewContainerId: string): Promise; protected initViewContainer(containerId: string): Promise; initWidgets(): Promise; removeStaleWidgets(): Promise; protected toViewContainerIdentifier(viewContainerId: string): ViewContainerIdentifier; protected toViewContainerId(identifier: ViewContainerIdentifier): string; protected toPluginViewWidgetIdentifier(viewId: string): PluginViewWidgetIdentifier; protected toViewId(identifier: PluginViewWidgetIdentifier): string; protected toViewWelcomeId(index: number, viewId: string): string; /** * retrieve restored layout state from previous user session but close widgets * widgets should be opened only when view data providers are registered */ onDidInitializeLayout(): void; registerViewDataProvider(viewId: string, provider: ViewDataProvider): Disposable; protected initView(viewId: string, toDispose: DisposableCollection): Promise; protected createViewDataWidget(viewId: string, webviewId?: string): Promise; protected createWebviewWidget(viewId: string, webviewId?: string): Promise; protected storeViewDataStateOnDispose(viewId: string, widget: Widget & StatefulWidget): void; protected isVisibleWidget(widget: Widget): boolean; protected updateFocusedView(): void; } //# sourceMappingURL=plugin-view-registry.d.ts.map