1 | import * as atomIde from "atom-ide-base";
|
2 | import * as atom from "atom";
|
3 | import * as ls from "../languageclient";
|
4 | import LinterPushV2Adapter from "./linter-push-v2-adapter";
|
5 | /** @deprecated Use Linter V2 service */
|
6 | export declare type DiagnosticCode = number | string;
|
7 | /** @deprecated Use Linter V2 service */
|
8 | export default class IdeDiagnosticAdapter extends LinterPushV2Adapter {
|
9 | private _diagnosticCodes;
|
10 | /**
|
11 | * Public: Capture the diagnostics sent from a langguage server, convert them to the Linter V2 format and forward them
|
12 | * on to any attached {V2IndieDelegate}s.
|
13 | *
|
14 | * @deprecated Use Linter V2 service
|
15 | * @param params The {PublishDiagnosticsParams} received from the language server that should be captured and
|
16 | * forwarded on to any attached {V2IndieDelegate}s.
|
17 | */
|
18 | captureDiagnostics(params: ls.PublishDiagnosticsParams): void;
|
19 | /**
|
20 | * Public: get diagnostics for the given linter messages
|
21 | *
|
22 | * @deprecated Use Linter V2 service
|
23 | * @param linterMessages An array of linter {V2Message}
|
24 | * @param editor
|
25 | * @returns An array of LS {Diagnostic[]}
|
26 | */
|
27 | getLSDiagnosticsForIdeDiagnostics(diagnostics: atomIde.Diagnostic[], editor: atom.TextEditor): ls.Diagnostic[];
|
28 | /**
|
29 | * Public: Get the {Diagnostic} that is associated with the given {atomIde.Diagnostic}.
|
30 | *
|
31 | * @deprecated Use Linter V2 service
|
32 | * @param diagnostic The {atomIde.Diagnostic} object to fetch the {Diagnostic} for.
|
33 | * @param editor
|
34 | * @returns The associated {Diagnostic}.
|
35 | */
|
36 | getLSDiagnosticForIdeDiagnostic(diagnostic: atomIde.Diagnostic, editor: atom.TextEditor): ls.Diagnostic;
|
37 | /**
|
38 | * Private: Get the recorded diagnostic code for a range/message. Diagnostic codes are tricky because there's no
|
39 | * suitable place in the Linter API for them. For now, we'll record the original code for each range/message
|
40 | * combination and retrieve it when needed (e.g. for passing back into code actions)
|
41 | */
|
42 | private getDiagnosticCode;
|
43 | }
|
44 | /** @deprecated Use Linter V2 service */
|
45 | export declare function atomIdeDiagnosticToLSDiagnostic(diagnostic: atomIde.Diagnostic): ls.Diagnostic;
|
46 | /** @deprecated Use Linter V2 service */
|
47 | export declare function diagnosticTypeToLSSeverity(type: atomIde.DiagnosticType): ls.DiagnosticSeverity;
|