blob: f3e20815fc3958768248316623e6e56eee7304fe [file] [log] [blame]
/* eslint-disable @typescript-eslint/no-unused-vars */
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------*/
import vscode = require('vscode');
export abstract class GoBaseCodeLensProvider implements vscode.CodeLensProvider {
protected enabled = true;
private onDidChangeCodeLensesEmitter = new vscode.EventEmitter<void>();
public get onDidChangeCodeLenses(): vscode.Event<void> {
return this.onDidChangeCodeLensesEmitter.event;
}
public setEnabled(enabled: false): void {
if (this.enabled !== enabled) {
this.enabled = enabled;
this.onDidChangeCodeLensesEmitter.fire();
}
}
public provideCodeLenses(
document: vscode.TextDocument,
token: vscode.CancellationToken
): vscode.ProviderResult<vscode.CodeLens[]> {
return [];
}
}