mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
@@ -77,7 +77,7 @@ export default class MainController implements Disposable {
|
|||||||
await templates.loadTemplates(path.join(this.context.extensionPath, 'resources', 'templates'));
|
await templates.loadTemplates(path.join(this.context.extensionPath, 'resources', 'templates'));
|
||||||
|
|
||||||
// ensure .net core is installed
|
// ensure .net core is installed
|
||||||
this.netcoreTool.findOrInstallNetCore();
|
await this.netcoreTool.findOrInstallNetCore();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ export class ProjectsController {
|
|||||||
|
|
||||||
// check that dacpac exists
|
// check that dacpac exists
|
||||||
if (await utils.exists(dacpacPath)) {
|
if (await utils.exists(dacpacPath)) {
|
||||||
this.apiWrapper.executeCommand(constants.schemaCompareStartCommand, dacpacPath);
|
await this.apiWrapper.executeCommand(constants.schemaCompareStartCommand, dacpacPath);
|
||||||
} else {
|
} else {
|
||||||
this.apiWrapper.showErrorMessage(constants.buildDacpacNotFound);
|
this.apiWrapper.showErrorMessage(constants.buildDacpacNotFound);
|
||||||
}
|
}
|
||||||
@@ -346,7 +346,7 @@ export class ProjectsController {
|
|||||||
|
|
||||||
const newEntry = await project.addScriptItem(relativeFilePath, newFileText);
|
const newEntry = await project.addScriptItem(relativeFilePath, newFileText);
|
||||||
|
|
||||||
this.apiWrapper.executeCommand(constants.vscodeOpenCommand, newEntry.fsUri);
|
await this.apiWrapper.executeCommand(constants.vscodeOpenCommand, newEntry.fsUri);
|
||||||
|
|
||||||
this.refreshProjectsTree();
|
this.refreshProjectsTree();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -34,26 +34,25 @@ export class NetCoreTool {
|
|||||||
|
|
||||||
private _outputChannel: vscode.OutputChannel = vscode.window.createOutputChannel(projectsOutputChannel);
|
private _outputChannel: vscode.OutputChannel = vscode.window.createOutputChannel(projectsOutputChannel);
|
||||||
|
|
||||||
public findOrInstallNetCore(): boolean {
|
public async findOrInstallNetCore(): Promise<boolean> {
|
||||||
if (!this.isNetCoreInstallationPresent) {
|
if (!this.isNetCoreInstallationPresent) {
|
||||||
this.showInstallDialog();
|
await this.showInstallDialog();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private showInstallDialog(): void {
|
private async showInstallDialog(): Promise<void> {
|
||||||
vscode.window.showInformationMessage(NetCoreInstallationConfirmation, UpdateNetCoreLocation, InstallNetCore).then(async (result) => {
|
let result = await vscode.window.showInformationMessage(NetCoreInstallationConfirmation, UpdateNetCoreLocation, InstallNetCore);
|
||||||
if (result === UpdateNetCoreLocation) {
|
if (result === UpdateNetCoreLocation) {
|
||||||
//open settings
|
//open settings
|
||||||
vscode.commands.executeCommand('workbench.action.openGlobalSettings');
|
await vscode.commands.executeCommand('workbench.action.openGlobalSettings');
|
||||||
}
|
}
|
||||||
else if (result === InstallNetCore) {
|
else if (result === InstallNetCore) {
|
||||||
//open install link
|
//open install link
|
||||||
const dotnetcoreURL = 'https://dotnet.microsoft.com/download/dotnet-core/3.1';
|
const dotnetcoreURL = 'https://dotnet.microsoft.com/download/dotnet-core/3.1';
|
||||||
vscode.env.openExternal(vscode.Uri.parse(dotnetcoreURL));
|
await vscode.env.openExternal(vscode.Uri.parse(dotnetcoreURL));
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private get isNetCoreInstallationPresent(): Boolean {
|
private get isNetCoreInstallationPresent(): Boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user