mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
add plugin host API for Diagnostics#Source
This commit is contained in:
@@ -9,12 +9,11 @@ import {IMarkerService, IResourceMarker, IMarkerData} from 'vs/platform/markers/
|
||||
import URI from 'vs/base/common/uri';
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import {IDisposable, disposeAll} from 'vs/base/common/lifecycle';
|
||||
import vscode = require('vscode');
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
class DiagnosticCollection implements vscode.DiagnosticCollection {
|
||||
|
||||
private static _maxDiagnosticsPerFile = 250;
|
||||
private static _maxDiagnosticsPerFile: number = 250;
|
||||
|
||||
private _name: string;
|
||||
private _proxy: MainThreadDiagnostics;
|
||||
@@ -125,6 +124,7 @@ class DiagnosticCollection implements vscode.DiagnosticCollection {
|
||||
endLineNumber: range.end.line + 1,
|
||||
endColumn: range.end.character + 1,
|
||||
message: diagnostic.message,
|
||||
source: diagnostic.source,
|
||||
severity: DiagnosticCollection._convertDiagnosticsSeverity(diagnostic.severity),
|
||||
code: String(diagnostic.code)
|
||||
}
|
||||
@@ -143,7 +143,7 @@ class DiagnosticCollection implements vscode.DiagnosticCollection {
|
||||
|
||||
export class PluginHostDiagnostics {
|
||||
|
||||
private static _idPool = 0;
|
||||
private static _idPool: number = 0;
|
||||
private _proxy: MainThreadDiagnostics;
|
||||
|
||||
constructor(threadService: IThreadService) {
|
||||
@@ -176,4 +176,4 @@ export class MainThreadDiagnostics {
|
||||
this._markerService.changeAll(owner, data);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,6 +418,7 @@ export class Diagnostic {
|
||||
|
||||
range: Range;
|
||||
message: string;
|
||||
source: string;
|
||||
code: string | number;
|
||||
severity: DiagnosticSeverity;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user