UNPKG

1.25 kBTypeScriptView Raw
1import type * as atomIde from "atom-ide-base";
2import { LanguageClientConnection } from "../languageclient";
3/** Adapts Atom's user notifications to those of the language server protocol. */
4export default class LoggingConsoleAdapter {
5 private _consoles;
6 /**
7 * Create a new {LoggingConsoleAdapter} that will listen for log messages via the supplied {LanguageClientConnection}.
8 *
9 * @param connection A {LanguageClientConnection} to the language server that will provide log messages.
10 */
11 constructor(connection: LanguageClientConnection);
12 /** Dispose this adapter ensuring any resources are freed and events unhooked. */
13 dispose(): void;
14 /**
15 * Public: Attach this {LoggingConsoleAdapter} to a given {atomIde.ConsoleApi}.
16 *
17 * @param console A {atomIde.ConsoleApi} that wants to receive messages.
18 */
19 attach(console: atomIde.ConsoleApi): void;
20 /** Public: Remove all {atomIde.ConsoleApi}'s attached to this adapter. */
21 detachAll(): void;
22 /**
23 * Log a message using the Atom IDE UI Console API.
24 *
25 * @param params The {LogMessageParams} received from the language server indicating the details of the message to be loggedd.
26 */
27 private logMessage;
28}