Merge VS Code 1.21 source code (#1067)

* Initial VS Code 1.21 file copy with patches

* A few more merges

* Post npm install

* Fix batch of build breaks

* Fix more build breaks

* Fix more build errors

* Fix more build breaks

* Runtime fixes 1

* Get connection dialog working with some todos

* Fix a few packaging issues

* Copy several node_modules to package build to fix loader issues

* Fix breaks from master

* A few more fixes

* Make tests pass

* First pass of license header updates

* Second pass of license header updates

* Fix restore dialog issues

* Remove add additional themes menu items

* fix select box issues where the list doesn't show up

* formatting

* Fix editor dispose issue

* Copy over node modules to correct location on all platforms
This commit is contained in:
Karl Burtram
2018-04-04 15:27:51 -07:00
committed by GitHub
parent 5fba3e31b4
commit dafb780987
9412 changed files with 141255 additions and 98813 deletions

View File

@@ -203,7 +203,9 @@ export class ConnectionDialogService implements IConnectionDialogService {
}
private handleShowUiComponent(input: OnShowUIResponse) {
this._currentProviderType = input.selectedProviderType;
if (input.selectedProviderType) {
this._currentProviderType = input.selectedProviderType;
}
this._model.providerName = this.getCurrentProviderName();
this._model = new ConnectionProfile(this._capabilitiesService, this._model);

View File

@@ -30,12 +30,13 @@ import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { localize } from 'vs/nls';
import { ITree } from 'vs/base/parts/tree/browser/tree';
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IMessageService, IConfirmation } from 'vs/platform/message/common/message';
import { IConfirmationService, IChoiceService, IConfirmation, IConfirmationResult, Choice } from 'vs/platform/dialogs/common/dialogs';
import * as styler from 'vs/platform/theme/common/styler';
import { TPromise } from 'vs/base/common/winjs.base';
import * as DOM from 'vs/base/browser/dom';
import { DialogService } from 'vs/workbench/services/dialogs/electron-browser/dialogs';
export interface OnShowUIResponse {
selectedProviderType: string;
@@ -89,7 +90,8 @@ export class ConnectionDialogWidget extends Modal {
@ITelemetryService telemetryService: ITelemetryService,
@IContextKeyService contextKeyService: IContextKeyService,
@IContextMenuService private _contextMenuService: IContextMenuService,
@IMessageService private _messageService: IMessageService
@IConfirmationService private _confirmationService: IConfirmationService,
@IContextViewService private _contextViewService: IContextViewService
) {
super(localize('connection', 'Connection'), TelemetryKeys.Connection, _partService, telemetryService, contextKeyService, { hasSpinner: true, hasErrors: true });
}
@@ -99,7 +101,7 @@ export class ConnectionDialogWidget extends Modal {
container.appendChild(connectionContainer.getHTMLElement());
this._bodyBuilder = new Builder(connectionContainer.getHTMLElement());
this._providerTypeSelectBox = new SelectBox(this.providerTypeOptions, this.selectedProviderType);
this._providerTypeSelectBox = new SelectBox(this.providerTypeOptions, this.selectedProviderType, this._contextViewService);
// Recent connection tab
let recentConnectionTab = $('.connection-recent-tab');
@@ -264,35 +266,15 @@ export class ConnectionDialogWidget extends Modal {
type: 'question'
};
// @SQLTODO
return new TPromise<boolean>((resolve, reject) => {
let confirmed: boolean = this._messageService.confirm(confirm);
if (confirmed) {
this._connectionManagementService.clearRecentConnectionsList();
this.open(false);
}
resolve(confirmed);
this._confirmationService.confirm(confirm).then((confirmed) => {
if (confirmed) {
this._connectionManagementService.clearRecentConnectionsList();
this.open(false);
}
resolve(confirmed);
});
});
//this._messageService.confirm(confirm).then(confirmation => {
// if (!confirmation.confirmed) {
// return TPromise.as(false);
// } else {
// this._connectionManagementService.clearRecentConnectionsList();
// this.open(false);
// return TPromise.as(true);
// }
// });
// return this._messageService.confirm(confirm).then(confirmation => {
// if (!confirmation.confirmed) {
// return TPromise.as(false);
// } else {
// this._connectionManagementService.clearRecentConnectionsList();
// this.open(false);
// return TPromise.as(true);
// }
// });
}
private createRecentConnectionList(): void {

View File

@@ -97,14 +97,14 @@ export class ConnectionWidget {
} else {
authTypeOption.defaultValue = this.getAuthTypeDisplayName(Constants.sqlLogin);
}
this._authTypeSelectBox = new SelectBox(authTypeOption.categoryValues.map(c => c.displayName), authTypeOption.defaultValue);
this._authTypeSelectBox = new SelectBox(authTypeOption.categoryValues.map(c => c.displayName), authTypeOption.defaultValue, this._contextViewService);
}
this._providerName = providerName;
}
public createConnectionWidget(container: HTMLElement): void {
this._serverGroupOptions = [this.DefaultServerGroup];
this._serverGroupSelectBox = new SelectBox(this._serverGroupOptions.map(g => g.name), this.DefaultServerGroup.name);
this._serverGroupSelectBox = new SelectBox(this._serverGroupOptions.map(g => g.name), this.DefaultServerGroup.name, this._contextViewService);
this._previousGroupOption = this._serverGroupSelectBox.value;
this._builder = $().div({ class: 'connection-table' }, (modelTableContent) => {
modelTableContent.element('table', { class: 'connection-table-content' }, (tableContainer) => {

View File

@@ -16,7 +16,6 @@ import { IConnectionManagementService } from 'sql/parts/connection/common/connec
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
import { IAction } from 'vs/base/common/actions';
import Event, { Emitter } from 'vs/base/common/event';
import { IMessageService } from 'vs/platform/message/common/message';
import mouse = require('vs/base/browser/mouseEvent');
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
@@ -27,7 +26,6 @@ export class RecentConnectionActionsProvider extends ContributableActionProvider
constructor(
@IInstantiationService private _instantiationService: IInstantiationService,
@IConnectionManagementService private _connectionManagementService: IConnectionManagementService,
@IMessageService private _messageService: IMessageService,
) {
super();
}