/****************************************************************************** * Copyright 2021 TypeFox GmbH * This program and the accompanying materials are made available under the * terms of the MIT License, which is available in the project root. ******************************************************************************/ import type { Connection } from 'vscode-languageserver'; import type { ActionMessage } from 'sprotty-protocol'; import type { Location } from 'vscode-languageserver'; import type { LangiumSprottyServices, LangiumSprottySharedServices } from './sprotty-services.js'; import { FitToScreenAction } from 'sprotty-protocol'; import { NotificationType } from 'vscode-languageserver'; /** * Notification sent in both directions to transmit actions between server and client. */ export declare namespace DiagramActionNotification { const type: NotificationType; } /** * Notification sent from the client to indicate that a diagram was closed. */ export declare namespace DiagramDidCloseNotification { const type: NotificationType; } /** * Notification sent from the server to open a location in a text editor. */ export declare namespace OpenInTextEditorNotification { const type: NotificationType; interface OpenInTextEditorMessage { location: Location; forceOpen: boolean; } } /** * Adds JSON-RPC handlers for `DiagramActionNotification` and `DiagramDidCloseNotification` received * from the client. */ export declare function addDiagramHandler(connection: Connection, services: LangiumSprottySharedServices): void; /** * Adds an action handler for selection changes that sends notifications to the language client to open the corresponding * source regions in the text editor, if a trace is available. */ export declare function addDiagramSelectionHandler(services: LangiumSprottyServices): void; /** * Adds a listener for text position changes that sends actions to the diagram client to select the corresponding * target elements in the diagram, if a trace is available. */ export declare function addTextSelectionHandler(services: LangiumSprottyServices, options?: { fitToScreen?: Partial | 'none'; }): void; //# sourceMappingURL=lsp.d.ts.map