mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-01 17:23:35 -05:00
sql-assessment extension code (#12948)
sql-assessment extension on model view components base
This commit is contained in:
35
extensions/sql-assessment/src/tabs/sqlAssessmentTab.ts
Normal file
35
extensions/sql-assessment/src/tabs/sqlAssessmentTab.ts
Normal 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>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user