mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 04:53:33 +01:00
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
'use strict';
|
||||
|
||||
import URI from 'vs/base/common/uri';
|
||||
import {illegalArgument, illegalState, readonly, onUnexpectedError} from 'vs/base/common/errors';
|
||||
import {TextEditorOptions} from 'vscode';
|
||||
import {illegalArgument} from 'vs/base/common/errors';
|
||||
|
||||
export class Disposable {
|
||||
|
||||
@@ -165,8 +164,8 @@ export class Range {
|
||||
}
|
||||
|
||||
constructor(start: Position, end: Position);
|
||||
constructor(startLine: number, startColumn: number, endLine:number, endColumn:number);
|
||||
constructor(startLineOrStart: number|Position, startColumnOrEnd: number|Position, endLine?:number, endColumn?:number) {
|
||||
constructor(startLine: number, startColumn: number, endLine: number, endColumn: number);
|
||||
constructor(startLineOrStart: number|Position, startColumnOrEnd: number|Position, endLine?: number, endColumn?: number) {
|
||||
let start: Position;
|
||||
let end: Position;
|
||||
|
||||
@@ -266,8 +265,8 @@ export class Selection extends Range {
|
||||
}
|
||||
|
||||
constructor(anchor: Position, active: Position);
|
||||
constructor(anchorLine: number, anchorColumn: number, activeLine:number, activeColumn:number);
|
||||
constructor(anchorLineOrAnchor: number|Position, anchorColumnOrActive: number|Position, activeLine?:number, activeColumn?:number) {
|
||||
constructor(anchorLine: number, anchorColumn: number, activeLine: number, activeColumn: number);
|
||||
constructor(anchorLineOrAnchor: number|Position, anchorColumnOrActive: number|Position, activeLine?: number, activeColumn?: number) {
|
||||
let anchor: Position;
|
||||
let active: Position;
|
||||
|
||||
@@ -419,6 +418,7 @@ export class Diagnostic {
|
||||
|
||||
range: Range;
|
||||
message: string;
|
||||
source: string;
|
||||
code: string | number;
|
||||
severity: DiagnosticSeverity;
|
||||
|
||||
@@ -434,7 +434,7 @@ export class Hover {
|
||||
public contents: vscode.MarkedString[];
|
||||
public range: Range;
|
||||
|
||||
constructor(contents: vscode.MarkedString | vscode.MarkedString[], range?:Range) {
|
||||
constructor(contents: vscode.MarkedString | vscode.MarkedString[], range?: Range) {
|
||||
if (!contents) {
|
||||
throw new Error('Illegal argument');
|
||||
}
|
||||
@@ -598,4 +598,4 @@ export enum ViewColumn {
|
||||
export enum StatusBarAlignment {
|
||||
Left = 1,
|
||||
Right = 2
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user