import URI from '@theia/core/lib/common/uri'; import { Emitter, Event, WaitUntilEvent } from '@theia/core/lib/common/event'; import { EditorManager, EditorWidget } from '@theia/editor/lib/browser'; import { LabelProvider, StorageService } from '@theia/core/lib/browser'; import { QuickPickService } from '@theia/core/lib/common/quick-pick-service'; import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service'; import { DebugConfigurationModel } from './debug-configuration-model'; import { DebugSessionOptions, DynamicDebugConfigurationSessionOptions } from './debug-session-options'; import { DebugService, DynamicDebugConfigurationProvider } from '../common/debug-service'; import { ContextKey, ContextKeyService } from '@theia/core/lib/browser/context-key-service'; import { DebugConfiguration } from '../common/debug-common'; import { WorkspaceVariableContribution } from '@theia/workspace/lib/browser/workspace-variable-contribution'; import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service'; import { PreferenceConfigurations, PreferenceService } from '@theia/core'; import { DebugCompound } from '../common/debug-compound'; /** * Event fired before providing debug configurations. * When `debugType` is specified, only extensions providing that type should be activated. * When `debugType` is undefined, all configuration providers should be activated. */ export interface WillProvideDebugConfiguration extends WaitUntilEvent { /** * The debug type to provide configurations for. * If undefined, configurations for all types should be provided. */ readonly debugType?: string; } export declare class DebugConfigurationManager { protected readonly workspaceService: WorkspaceService; protected readonly editorManager: EditorManager; protected readonly debug: DebugService; protected readonly quickPickService: QuickPickService; protected readonly contextKeyService: ContextKeyService; protected readonly labelProvider: LabelProvider; protected readonly textModelService: MonacoTextModelService; protected readonly preferences: PreferenceService; protected readonly preferenceConfigurations: PreferenceConfigurations; protected readonly workspaceVariables: WorkspaceVariableContribution; protected readonly onDidChangeEmitter: Emitter; readonly onDidChange: Event; protected readonly onWillProvideDebugConfigurationEmitter: Emitter; readonly onWillProvideDebugConfiguration: Event; protected readonly onWillProvideDynamicDebugConfigurationEmitter: Emitter; get onWillProvideDynamicDebugConfiguration(): Event; get onDidChangeConfigurationProviders(): Event; protected readonly onDidChangeDynamicConfigurationsEmitter: Emitter; /** * Fires when the set of dynamic debug configuration providers changes * (i.e., when providers are registered or unregistered). */ readonly onDidChangeDynamicConfigurations: Event; protected debugConfigurationTypeKey: ContextKey; protected initialized: Promise; protected recentDynamicOptionsTracker: DynamicDebugConfigurationSessionOptions[]; protected init(): void; protected doInit(): Promise; protected readonly models: Map; protected updateModels: () => Promise; /** * All _non-dynamic_ debug configurations. */ get all(): IterableIterator; protected getAll(): IterableIterator; get supported(): Promise>; protected getSupported(): Promise>; protected doGetSupported(debugTypes: Set): IterableIterator; protected _currentOptions: DebugSessionOptions | undefined; get current(): DebugSessionOptions | undefined; getSelectedConfiguration(): Promise; set current(option: DebugSessionOptions | undefined); protected updateRecentlyUsedDynamicConfigurationOptions(option: DebugSessionOptions | undefined): void; protected dynamicOptionsMatch(one: DynamicDebugConfigurationSessionOptions, other: DynamicDebugConfigurationSessionOptions): boolean; get recentDynamicOptions(): readonly DynamicDebugConfigurationSessionOptions[]; protected updateCurrent(options?: DebugSessionOptions | undefined): void; /** * @deprecated since v1.27.0 */ find(name: string, workspaceFolderUri: string): DebugSessionOptions | undefined; /** * Find / Resolve DebugSessionOptions from a given target debug configuration */ find(compound: DebugCompound, workspaceFolderUri?: string): DebugSessionOptions | undefined; find(configuration: DebugConfiguration, workspaceFolderUri?: string, providerType?: string): DebugSessionOptions | undefined; find(name: string, workspaceFolderUri?: string, providerType?: string): DebugSessionOptions | undefined; findConfigurations(name: string, workspaceFolderUri?: string): DebugConfiguration[]; findConfiguration(name: string, workspaceFolderUri?: string): DebugConfiguration | undefined; findCompound(name: string, workspaceFolderUri?: string): DebugCompound | undefined; openConfiguration(): Promise; protected configurationToOptions(configuration: DebugConfiguration, workspaceFolderUri?: string, providerType?: string): DebugSessionOptions; protected compoundToOptions(compound: DebugCompound, workspaceFolderUri?: string): DebugSessionOptions; addConfiguration(): Promise; protected selectRootUri(): Promise; protected getModel(uri?: URI): DebugConfigurationModel | undefined; protected doOpen(model: DebugConfigurationModel): Promise; protected doCreate(model: DebugConfigurationModel): Promise; /** * Checks whether a `launch.json` file contains the minimum necessary content. * If content not found, provides content and populates the file using Monaco. */ protected ensureContent(uri: URI, model: DebugConfigurationModel): Promise; protected provideDebugConfigurations(debugType: string, workspaceFolderUri: string | undefined): Promise; protected fireWillProvideDebugConfiguration(): Promise; /** * Returns dynamic debug configuration providers grouped by label. * Each entry contains a label and all the types that share that label. */ getDynamicDebugConfigurationProviders(): DynamicDebugConfigurationProvider[]; /** * Returns the types of registered dynamic debug configuration providers * without invoking them. * @deprecated Use getDynamicDebugConfigurationProviders() instead for proper label support. */ getDynamicDebugConfigurationProviderTypes(): string[]; provideDynamicDebugConfigurations(): Promise>; fetchDynamicDebugConfiguration(name: string, type: string, folder?: string): Promise; /** * Provides dynamic debug configurations for a specific provider type only. * This activates only the extension for the specified type, making it more * efficient than `provideDynamicDebugConfigurations()` which activates all providers. */ provideDynamicDebugConfigurationsByType(providerType: string): Promise; protected fireWillProvideDynamicDebugConfiguration(debugType?: string): Promise; protected getInitialConfigurationContent(initialConfigurations: DebugConfiguration[]): string; protected selectDebugType(): Promise; protected readonly storage: StorageService; load(): Promise; protected resolveRecentDynamicOptionsFromData(options?: DynamicDebugConfigurationSessionOptions[]): void; save(): void; } export declare namespace DebugConfigurationManager { interface Data { current?: DebugSessionOptions; recentDynamicOptions?: DynamicDebugConfigurationSessionOptions[]; } } //# sourceMappingURL=debug-configuration-manager.d.ts.map