Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)

* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
This commit is contained in:
Anthony Dresser
2019-07-15 22:35:46 -07:00
committed by GitHub
parent f720ec642f
commit 0b7e7ddbf9
2406 changed files with 59140 additions and 35464 deletions

View File

@@ -11,9 +11,9 @@ import * as editorBrowser from 'vs/editor/browser/editorBrowser';
import { Range } from 'vs/editor/common/core/range';
import { IModelDecorationsChangeAccessor, IModelDeltaDecoration, ITextModel } from 'vs/editor/common/model';
import { ModelDecorationOptions } from 'vs/editor/common/model/textModel';
import { Command, ICodeLensSymbol } from 'vs/editor/common/modes';
import { Command, CodeLens } from 'vs/editor/common/modes';
import { editorCodeLensForeground } from 'vs/editor/common/view/editorColorRegistry';
import { ICodeLensData } from 'vs/editor/contrib/codelens/codelens';
import { CodeLensItem } from 'vs/editor/contrib/codelens/codelens';
import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry';
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
@@ -65,7 +65,7 @@ class CodeLensContentWidget implements editorBrowser.IContentWidget {
constructor(
editor: editorBrowser.ICodeEditor,
symbolRange: Range,
data: ICodeLensData[]
data: CodeLensItem[]
) {
this._id = 'codeLensWidget' + (++CodeLensContentWidget._idPool);
this._editor = editor;
@@ -88,7 +88,7 @@ class CodeLensContentWidget implements editorBrowser.IContentWidget {
this._domNode.innerHTML = ' ';
}
withCommands(inSymbols: Array<ICodeLensSymbol | undefined | null>, animate: boolean): void {
withCommands(inSymbols: Array<CodeLens | undefined | null>, animate: boolean): void {
this._commands.clear();
const symbols = coalesce(inSymbols);
@@ -189,17 +189,17 @@ export class CodeLensHelper {
}
}
export class CodeLens {
export class CodeLensWidget {
private readonly _editor: editorBrowser.ICodeEditor;
private readonly _viewZone: CodeLensViewZone;
private readonly _viewZoneId: number;
private readonly _contentWidget: CodeLensContentWidget;
private _decorationIds: string[];
private _data: ICodeLensData[];
private _data: CodeLensItem[];
constructor(
data: ICodeLensData[],
data: CodeLensItem[],
editor: editorBrowser.ICodeEditor,
helper: CodeLensHelper,
viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor,
@@ -256,7 +256,7 @@ export class CodeLens {
});
}
updateCodeLensSymbols(data: ICodeLensData[], helper: CodeLensHelper): void {
updateCodeLensSymbols(data: CodeLensItem[], helper: CodeLensHelper): void {
while (this._decorationIds.length) {
helper.removeDecoration(this._decorationIds.pop()!);
}
@@ -270,7 +270,7 @@ export class CodeLens {
});
}
computeIfNecessary(model: ITextModel): ICodeLensData[] | null {
computeIfNecessary(model: ITextModel): CodeLensItem[] | null {
if (!this._contentWidget.isVisible()) {
return null;
}
@@ -285,7 +285,7 @@ export class CodeLens {
return this._data;
}
updateCommands(symbols: Array<ICodeLensSymbol | undefined | null>): void {
updateCommands(symbols: Array<CodeLens | undefined | null>): void {
this._contentWidget.withCommands(symbols, true);
for (let i = 0; i < this._data.length; i++) {
const resolved = symbols[i];