sql-assessment extension code (#12948)

sql-assessment extension on model view components base
This commit is contained in:
Vladimir Chernov
2020-10-19 22:43:22 +03:00
committed by GitHub
parent 72f7e8de52
commit 873668a7cf
24 changed files with 1538 additions and 5 deletions

View File

@@ -0,0 +1,35 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import * as vscode from 'vscode';
export abstract class SqlAssessmentTab implements azdata.Tab, vscode.Disposable {
title!: string;
content!: azdata.Component;
id!: string;
icon?: string | vscode.Uri | { light: string | vscode.Uri; dark: string | vscode.Uri; } | undefined;
protected extensionContext: vscode.ExtensionContext;
public constructor(extensionContext: vscode.ExtensionContext, title: string, id: string, icon: { light: string; dark: string }) {
this.title = title;
this.id = id;
this.icon = icon;
this.extensionContext = extensionContext;
}
public dispose() {
}
public async Create(view: azdata.ModelView): Promise<SqlAssessmentTab> {
this.content = await this.tabContent(view);
return this;
}
abstract async tabContent(view: azdata.ModelView): Promise<azdata.Component>;
}