Show warning about upcoming BDC deprecation (#20549)

This commit is contained in:
Charles Gagnon
2022-09-07 14:53:07 -07:00
committed by GitHub
parent 56fcb43c35
commit aa0f1e88e8

View File

@@ -30,6 +30,15 @@ export async function activate(extensionContext: vscode.ExtensionContext): Promi
IconPathHelper.setExtensionContext(extensionContext);
await vscode.commands.executeCommand('setContext', 'bdc.loaded', false);
const treeDataProvider = new ControllerTreeDataProvider(extensionContext.globalState);
let controllers: any[] = extensionContext.globalState.get('controllers', []);
if (controllers.length > 0) {
const deprecationNoticeKey = 'bdc.deprecationNoticeShown';
const deprecationNoticeShown = extensionContext.globalState.get(deprecationNoticeKey, false);
if (!deprecationNoticeShown) {
void vscode.window.showWarningMessage(localize('bdc.deprecationWarning', 'The Big Data Cluster add-on is being retired and Azure Data Studio functionality for it will be removed in an upcoming release. Read more about this and support going forward [here](https://go.microsoft.com/fwlink/?linkid=2207340).'));
void extensionContext.globalState.update(deprecationNoticeKey, true);
}
}
vscode.window.registerTreeDataProvider('sqlBigDataCluster', treeDataProvider);
registerCommands(extensionContext, treeDataProvider);
return {