import { Disposable } from '../common/disposable'; import { MaybePromise } from '../common/types'; import { URI } from '../common/uri'; import { QuickInputService } from './quick-input'; export interface OpenWithHandler { /** * A unique id of this handler. */ readonly id: string; /** * A human-readable name of this handler. */ readonly label?: string; /** * A human-readable provider name of this handler. */ readonly providerName?: string; /** * A css icon class of this handler. */ readonly iconClass?: string; /** * Test whether this handler can open the given URI for given options. * Return a nonzero number if this handler can open; otherwise it cannot. * Never reject. * * A returned value indicating a priority of this handler. */ canHandle(uri: URI): number; /** * Open a widget for the given URI and options. * Resolve to an opened widget or undefined, e.g. if a page is opened. * Never reject if `canHandle` return a positive number; otherwise should reject. */ open(uri: URI): MaybePromise; } export declare class OpenWithService { protected readonly quickInputService: QuickInputService; protected readonly handlers: OpenWithHandler[]; registerHandler(handler: OpenWithHandler): Disposable; openWith(uri: URI): Promise; getHandlers(uri: URI): OpenWithHandler[]; } //# sourceMappingURL=open-with-service.d.ts.map