Add sql bindings package reference to project (#16912)

* list packages and add packages working

* cleanup and remove list packages

* cleanup

* change to pull in latest package version
This commit is contained in:
Kim Santiago
2021-08-27 16:58:54 -07:00
committed by GitHub
parent 22141259d3
commit 2c75f199e8
5 changed files with 134 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ import { WorkspaceTreeItem } from 'dataworkspace';
import * as constants from '../common/constants';
import { SqlDatabaseProjectProvider } from '../projectProvider/projectProvider';
import { launchAddSqlBindingQuickpick } from '../dialogs/addSqlBindingQuickpick';
import { PackageHelper } from '../tools/packageHelper';
/**
* The main controller class that initializes the extension
@@ -23,11 +24,13 @@ import { launchAddSqlBindingQuickpick } from '../dialogs/addSqlBindingQuickpick'
export default class MainController implements vscode.Disposable {
protected projectsController: ProjectsController;
protected netcoreTool: NetCoreTool;
protected packageHelper: PackageHelper;
private _outputChannel: vscode.OutputChannel = vscode.window.createOutputChannel(constants.projectsOutputChannel);
public constructor(private context: vscode.ExtensionContext) {
this.projectsController = new ProjectsController(this._outputChannel);
this.netcoreTool = new NetCoreTool(this._outputChannel);
this.packageHelper = new PackageHelper(this._outputChannel);
}
public get extensionContext(): vscode.ExtensionContext {
@@ -74,7 +77,7 @@ export default class MainController implements vscode.Disposable {
vscode.commands.registerCommand('sqlDatabaseProjects.changeTargetPlatform', async (node: WorkspaceTreeItem) => { await this.projectsController.changeTargetPlatform(node); });
vscode.commands.registerCommand('sqlDatabaseProjects.validateExternalStreamingJob', async (node: WorkspaceTreeItem) => { await this.projectsController.validateExternalStreamingJob(node); });
vscode.commands.registerCommand('sqlDatabaseProjects.addSqlBinding', async (uri: vscode.Uri | undefined) => { await launchAddSqlBindingQuickpick(uri); });
vscode.commands.registerCommand('sqlDatabaseProjects.addSqlBinding', async (uri: vscode.Uri | undefined) => { await launchAddSqlBindingQuickpick(uri, this.packageHelper); });
IconPathHelper.setExtensionContext(this.extensionContext);