import * as glob from "@codingame/monaco-vscode-api/vscode/vs/base/common/glob"; import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service"; import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service"; import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service"; import { IUntypedEditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor"; import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service"; import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service"; import { EditorAssociations, EditorInputFactoryObject, RegisteredEditorInfo, RegisteredEditorOptions, ResolvedEditor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService"; import { IEditorResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService.service"; import { PreferredGroup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService"; export declare class EditorResolverService extends Disposable implements IEditorResolverService { private readonly editorGroupService; private readonly instantiationService; private readonly configurationService; private readonly quickInputService; private readonly notificationService; private readonly storageService; private readonly extensionService; private readonly logService; readonly _serviceBrand: undefined; private readonly _onDidChangeEditorRegistrations; readonly onDidChangeEditorRegistrations: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event; private static readonly configureDefaultID; private static readonly cacheStorageID; private static readonly conflictingDefaultsStorageID; private _editors; private _flattenedEditors; private _shouldReFlattenEditors; private cache; constructor(editorGroupService: IEditorGroupsService, instantiationService: IInstantiationService, configurationService: IConfigurationService, quickInputService: IQuickInputService, notificationService: INotificationService, storageService: IStorageService, extensionService: IExtensionService, logService: ILogService); private resolveUntypedInputAndGroup; resolveEditor(editor: IUntypedEditorInput, preferredGroup: PreferredGroup | undefined): Promise; private doResolveSideBySideEditor; bufferChangeEvents(callback: Function): void; registerEditor(globPattern: string | glob.IRelativePattern, editorInfo: RegisteredEditorInfo, options: RegisteredEditorOptions, editorFactoryObject: EditorInputFactoryObject): IDisposable; getAssociationsForResource(resource: URI): EditorAssociations; private getAssociationsForResourceByType; private getAssociationsForResourceFromSetting; private getRawAssociationsForResourceByType; private getRawAssociationsForResourceFromSetting; getAllUserAssociations(): EditorAssociations; private getAllUserAssociationsForSetting; /** * Given the nested nature of the editors map, we merge factories of the same glob and id to make it flat * and easier to work with */ private _flattenEditorsMap; /** * Returns all editors as an array. Possible to contain duplicates */ private get _registeredEditors(); updateUserAssociations(globPattern: string, editorID: string): void; private updateUserAssociationsForType; private updateUserAssociationsForSetting; private findMatchingEditors; getEditors(resource?: URI): RegisteredEditorInfo[]; /** * Given a resource and an editorId selects the best possible editor * @returns The editor and whether there was another default which conflicted with it */ private getEditor; private getEffectivePriority; private doResolveEditor; /** * Moves the first existing editor for a resource to the target group unless already opened there. * Additionally will close any other editors that are open for that resource and viewtype besides the first one found * @param resource The resource of the editor * @param viewType the viewtype of the editor * @param targetGroup The group to move it to * @returns The moved editor input or `undefined` if the editor could not be moved */ private moveExistingEditorForResource; /** * Given a resource and an editorId, returns all editors open for that resource and editorId. * @param resource The resource specified * @param editorId The editorID * @returns A list of editors */ private findExistingEditorsForResource; private doHandleConflictingDefaults; private mapEditorsToQuickPickEntry; private doPickEditor; private cacheEditors; /** * Checks if a resource matches any user-configured editor association that * points to a non-default editor. This ensures that on first startup (when * the cache is empty), we still wait for extensions to register before * resolving the editor, so that user-configured custom editors are available. */ private resourceMatchesUserAssociation; private resourceMatchesCache; }