mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 17:22:59 -05:00
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -22,7 +22,6 @@ import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMess
|
||||
import { IConnectionDialogService } from 'sql/workbench/services/connection/common/connectionDialogService';
|
||||
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
@@ -311,8 +310,8 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
||||
return newProfile;
|
||||
}
|
||||
|
||||
private showDialogWithModel(): TPromise<void> {
|
||||
return new TPromise<void>((resolve, reject) => {
|
||||
private showDialogWithModel(): Promise<void> {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
this.updateModelServerCapabilities(this._inputModel);
|
||||
this.doShowDialog(this._params);
|
||||
resolve(null);
|
||||
@@ -373,7 +372,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
||||
}
|
||||
|
||||
|
||||
private doShowDialog(params: INewConnectionParams): TPromise<void> {
|
||||
private doShowDialog(params: INewConnectionParams): Promise<void> {
|
||||
if (!this._connectionDialog) {
|
||||
let container = this._partService.getWorkbenchElement().parentElement;
|
||||
this._container = container;
|
||||
@@ -391,7 +390,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
||||
}
|
||||
this._connectionDialog.newConnectionParams = params;
|
||||
|
||||
return new TPromise<void>(() => {
|
||||
return new Promise<void>(() => {
|
||||
this._connectionDialog.open(this._connectionManagementService.getRecentConnections(params.providers).length > 0);
|
||||
this.uiController.focusOnOpen();
|
||||
});
|
||||
|
||||
@@ -166,19 +166,19 @@ export class ConnectionDialogWidget extends Modal {
|
||||
}
|
||||
});
|
||||
|
||||
this._panel.onTabChange(c => {
|
||||
this._panel.onTabChange(async c => {
|
||||
if (c === savedConnectionTabId && this._savedConnectionTree.getContentHeight() === 0) {
|
||||
// Update saved connection tree
|
||||
TreeUpdateUtils.structuralTreeUpdate(this._savedConnectionTree, 'saved', this._connectionManagementService, this._providers).then(() => {
|
||||
if (this._savedConnectionTree.getContentHeight() > 0) {
|
||||
this._noSavedConnectionBuilder.hide();
|
||||
this._savedConnectionBuilder.show();
|
||||
} else {
|
||||
this._noSavedConnectionBuilder.show();
|
||||
this._savedConnectionBuilder.hide();
|
||||
}
|
||||
this._savedConnectionTree.layout(DOM.getTotalHeight(this._savedConnectionTree.getHTMLElement()));
|
||||
});
|
||||
await TreeUpdateUtils.structuralTreeUpdate(this._savedConnectionTree, 'saved', this._connectionManagementService, this._providers);
|
||||
|
||||
if (this._savedConnectionTree.getContentHeight() > 0) {
|
||||
this._noSavedConnectionBuilder.hide();
|
||||
this._savedConnectionBuilder.show();
|
||||
} else {
|
||||
this._noSavedConnectionBuilder.show();
|
||||
this._savedConnectionBuilder.hide();
|
||||
}
|
||||
this._savedConnectionTree.layout(DOM.getTotalHeight(this._savedConnectionTree.getHTMLElement()));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -378,7 +378,7 @@ export class ConnectionDialogWidget extends Modal {
|
||||
* Open the flyout dialog
|
||||
* @param recentConnections Are there recent connections that should be shown
|
||||
*/
|
||||
public open(recentConnections: boolean) {
|
||||
public async open(recentConnections: boolean): Promise<void> {
|
||||
this._panel.showTab(this._recentConnectionTabId);
|
||||
|
||||
this.show();
|
||||
@@ -389,7 +389,7 @@ export class ConnectionDialogWidget extends Modal {
|
||||
this._recentConnectionBuilder.hide();
|
||||
this._noRecentConnectionBuilder.show();
|
||||
}
|
||||
TreeUpdateUtils.structuralTreeUpdate(this._recentConnectionTree, 'recent', this._connectionManagementService, this._providers);
|
||||
await TreeUpdateUtils.structuralTreeUpdate(this._recentConnectionTree, 'recent', this._connectionManagementService, this._providers);
|
||||
|
||||
// reset saved connection tree
|
||||
this._savedConnectionTree.setInput([]);
|
||||
|
||||
Reference in New Issue
Block a user