Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)

* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
This commit is contained in:
Anthony Dresser
2019-07-15 22:35:46 -07:00
committed by GitHub
parent f720ec642f
commit 0b7e7ddbf9
2406 changed files with 59140 additions and 35464 deletions

View File

@@ -22,11 +22,11 @@ import { ICommandService } from 'vs/platform/commands/common/commands';
import { ipcRenderer as ipc } from 'electron';
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar';
import { localize } from 'vs/nls';
import { QueryInput } from 'sql/workbench/parts/query/common/queryInput';
import { URI } from 'vs/base/common/uri';
import { ILogService } from 'vs/platform/log/common/log';
import { INotificationService } from 'vs/platform/notification/common/notification';
export class CommandLineService implements ICommandLineProcessing {
public _serviceBrand: any;
@@ -40,7 +40,7 @@ export class CommandLineService implements ICommandLineProcessing {
@IEditorService private _editorService: IEditorService,
@ICommandService private _commandService: ICommandService,
@IConfigurationService private _configurationService: IConfigurationService,
@IStatusbarService private _statusBarService: IStatusbarService,
@INotificationService private _notificationService: INotificationService,
@ILogService private logService: ILogService
) {
if (ipc) {
@@ -92,8 +92,8 @@ export class CommandLineService implements ICommandLineProcessing {
}
let connectedContext: azdata.ConnectedContext = undefined;
if (profile) {
if (this._statusBarService) {
this._statusBarService.setStatusMessage(localize('connectingLabel', 'Connecting:') + profile.serverName, 2500);
if (this._notificationService) {
this._notificationService.status(localize('connectingLabel', 'Connecting: {0}', profile.serverName), { hideAfter: 2500 });
}
try {
await this._connectionManagementService.connectIfNotConnected(profile, 'connection', true);
@@ -106,8 +106,8 @@ export class CommandLineService implements ICommandLineProcessing {
}
}
if (commandName) {
if (this._statusBarService) {
this._statusBarService.setStatusMessage(localize('runningCommandLabel', 'Running command:') + commandName, 2500);
if (this._notificationService) {
this._notificationService.status(localize('runningCommandLabel', 'Running command: {0}', commandName), { hideAfter: 2500 });
}
await this._commandService.executeCommand(commandName, connectedContext);
} else if (profile) {
@@ -119,8 +119,8 @@ export class CommandLineService implements ICommandLineProcessing {
}
else {
// Default to showing new query
if (this._statusBarService) {
this._statusBarService.setStatusMessage(localize('openingNewQueryLabel', 'Opening new query:') + profile.serverName, 2500);
if (this._notificationService) {
this._notificationService.status(localize('openingNewQueryLabel', 'Opening new query: {0}', profile.serverName), { hideAfter: 2500 });
}
try {
await TaskUtilities.newQuery(profile,
@@ -150,8 +150,8 @@ export class CommandLineService implements ICommandLineProcessing {
showConnectionDialogOnError: warnOnConnectFailure,
showFirewallRuleOnError: warnOnConnectFailure
};
if (this._statusBarService) {
this._statusBarService.setStatusMessage(localize('connectingQueryLabel', 'Connecting query file'), 2500);
if (this._notificationService) {
this._notificationService.status(localize('connectingQueryLabel', 'Connecting query file'), { hideAfter: 2500 });
}
await this._connectionManagementService.connect(profile, uriString, options);
}