import { DisposableStore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service"; import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service"; import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service"; import { ITunnelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/tunnel/common/tunnel.service"; import { IWorkspaceFolder } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace"; import { IDebugSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug"; import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service"; import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service"; import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service"; import { IHighlight } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/highlightedlabel/highlightedLabel"; export declare enum DebugLinkHoverBehavior { /** A nice workbench hover */ Rich = 0, /** * Basic browser hover * @deprecated Consumers should adopt `rich` by propagating disposables appropriately */ Basic = 1, /** No hover */ None = 2 } /** Store implies HoverBehavior=rich */ export type DebugLinkHoverBehaviorTypeData = { type: DebugLinkHoverBehavior.None | DebugLinkHoverBehavior.Basic; } | { type: DebugLinkHoverBehavior.Rich; store: DisposableStore; }; export interface ILinkDetector { linkify(text: string, splitLines?: boolean, workspaceFolder?: IWorkspaceFolder, includeFulltext?: boolean, hoverBehavior?: DebugLinkHoverBehaviorTypeData, highlights?: IHighlight[]): HTMLElement; linkifyLocation(text: string, locationReference: number, session: IDebugSession, hoverBehavior?: DebugLinkHoverBehaviorTypeData): HTMLElement; } export declare class LinkDetector implements ILinkDetector { private readonly editorService; private readonly fileService; private readonly openerService; private readonly pathService; private readonly tunnelService; private readonly environmentService; private readonly configurationService; private readonly hoverService; constructor(editorService: IEditorService, fileService: IFileService, openerService: IOpenerService, pathService: IPathService, tunnelService: ITunnelService, environmentService: IWorkbenchEnvironmentService, configurationService: IConfigurationService, hoverService: IHoverService); /** * Matches and handles web urls, absolute and relative file links in the string provided. * Returns element that wraps the processed string, where matched links are replaced by . * 'onclick' event is attached to all anchored links that opens them in the editor. * When splitLines is true, each line of the text, even if it contains no links, is wrapped in a * and added as a child of the returned . * If a `hoverBehavior` is passed, hovers may be added using the workbench hover service. * This should be preferred for new code where hovers are desirable. */ linkify(text: string, splitLines?: boolean, workspaceFolder?: IWorkspaceFolder, includeFulltext?: boolean, hoverBehavior?: DebugLinkHoverBehaviorTypeData, highlights?: IHighlight[]): HTMLElement; private _linkify; private applyHighlights; /** * Linkifies a location reference. */ linkifyLocation(text: string, locationReference: number, session: IDebugSession, hoverBehavior?: DebugLinkHoverBehaviorTypeData): HTMLElement; /** * Makes an {@link ILinkDetector} that links everything in the output to the * reference if they don't have other explicit links. */ makeReferencedLinkDetector(locationReference: number, session: IDebugSession): ILinkDetector; private createWebLink; private createPathLink; private createLink; private decorateLink; private detectLinks; }