mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 11:01:37 -05:00
change import back to import type * as azdataType (#19292)
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as azdataType from 'azdata';
|
import type * as azdataType from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as constants from '../common/constants';
|
import * as constants from '../common/constants';
|
||||||
import * as newProjectTool from '../tools/newProjectTool';
|
import * as newProjectTool from '../tools/newProjectTool';
|
||||||
@@ -52,17 +52,17 @@ export class CreateProjectFromDatabaseDialog {
|
|||||||
|
|
||||||
let connected = false;
|
let connected = false;
|
||||||
if (this.profile) {
|
if (this.profile) {
|
||||||
const connections = await azdataType.connection.getConnections(true);
|
const connections = await getAzdataApi()!.connection.getConnections(true);
|
||||||
connected = !!connections.find(c => c.connectionId === this.profile!.id);
|
connected = !!connections.find(c => c.connectionId === this.profile!.id);
|
||||||
|
|
||||||
if (!connected) {
|
if (!connected) {
|
||||||
// if the connection clicked on isn't currently connected, try to connect
|
// if the connection clicked on isn't currently connected, try to connect
|
||||||
const result = await azdataType.connection.connect(this.profile, true, false);
|
const result = await getAzdataApi()!.connection.connect(this.profile, true, false);
|
||||||
connected = result.connected;
|
connected = result.connected;
|
||||||
|
|
||||||
if (!result.connected) {
|
if (!result.connected) {
|
||||||
// if can't connect automatically, open connection dialog with the info from the profile
|
// if can't connect automatically, open connection dialog with the info from the profile
|
||||||
const connection = await azdataType.connection.openConnectionDialog(undefined, this.profile);
|
const connection = await getAzdataApi()!.connection.openConnectionDialog(undefined, this.profile);
|
||||||
connected = !!connection;
|
connected = !!connection;
|
||||||
|
|
||||||
// update these fields if connection was successful, to ensure they match the connection made
|
// update these fields if connection was successful, to ensure they match the connection made
|
||||||
|
|||||||
Reference in New Issue
Block a user