mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 09:35:37 -05:00
Fix deployment warnings to only show if no resources found (#10878)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import * as azurecore from '../../../azurecore/src/azurecore';
|
||||
|
||||
/**
|
||||
* Wrapper class to act as a facade over VSCode and Data APIs and allow us to test / mock callbacks into
|
||||
@@ -137,4 +138,16 @@ export class ApiWrapper {
|
||||
public registerWidget(widgetId: string, handler: (view: azdata.ModelView) => void): void {
|
||||
azdata.ui.registerModelViewProvider(widgetId, handler);
|
||||
}
|
||||
|
||||
private azurecoreApi: azurecore.IExtension | undefined;
|
||||
|
||||
public async getAzurecoreApi(): Promise<azurecore.IExtension> {
|
||||
if (!this.azurecoreApi) {
|
||||
this.azurecoreApi = await this.getExtension(azurecore.extension.name)?.activate();
|
||||
if (!this.azurecoreApi) {
|
||||
throw new Error('Unable to retrieve azurecore API');
|
||||
}
|
||||
}
|
||||
return this.azurecoreApi;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user