import type { AstNode, CommentProvider, DocumentationProvider, LangiumDocument, MaybePromise } from 'langium'; import type { LangiumServices } from 'langium/lsp'; import { AstNodeHoverProvider } from 'langium/lsp'; import type { Hover, HoverParams } from 'vscode-languageserver'; import { QualifiedNameProvider } from '../../services/naming.js'; import { DomainLangIndexManager } from '../domain-lang-index-manager.js'; /** * Provides hover information for DomainLang elements. * * Extends Langium's AstNodeHoverProvider with DDD-specific hover content * for domains, bounded contexts, relationships, and other DSL constructs. */ export declare class DomainLangHoverProvider extends AstNodeHoverProvider { protected readonly documentationProvider: DocumentationProvider; protected readonly commentProvider: CommentProvider; protected readonly qualifiedNameProvider: QualifiedNameProvider; protected readonly indexManager: DomainLangIndexManager; /** * Registry of type-specific hover content generators. * Each generator returns content for its node type, or undefined to skip. */ private readonly hoverGenerators; constructor(services: LangiumServices); getHoverContent(document: LangiumDocument, params: HoverParams): Promise; /** * Try to get hover for a declaration node (AST node). * For qualified name references, only shows hover when hovering over the last segment. * For qualified name declarations (like namespace names), shows hover on any segment. */ private tryGetDeclarationHover; /** * Try to get hover for a keyword node. * Uses the keyword dictionary for all keywords. */ private tryGetKeywordHover; protected getAstNodeHoverContent(node: AstNode, currentDocument?: LangiumDocument): MaybePromise; /** * Gets the import alias for a node if it's from an imported document. * Returns undefined if the node is in the same document or not imported with an alias. */ private getImportAliasForNode; private getDomainHover; private getThisRefHover; private getBoundedContextHover; private getNamespaceHover; private getContextMapHover; private getDomainMapHover; private getDecisionHover; private getPolicyHover; private getBusinessRuleHover; private getDomainTermHover; private getTeamHover; private getClassificationHover; private getMetadataHover; private getRelationshipHover; private getImportHover; private getDefaultHover; /** * Computes the display name for a node in hover, considering import aliases. * If node is imported with an alias, shows `alias.name`, otherwise shows full qualified name. */ private getDisplayNameForHover; /** * Formats a relationship line for hover display. */ private formatRelationshipLine; /** * Formats the final hover content with consistent structure. * Delegates to the shared hover-builders utility. */ private formatHover; private refLink; }