mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 17:22:48 -05:00
This reverts commit d15a3fcc98.
This commit is contained in:
@@ -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,
|
||||
@INotificationService private _notificationService: INotificationService,
|
||||
@IStatusbarService private _statusBarService: IStatusbarService,
|
||||
@ILogService private logService: ILogService
|
||||
) {
|
||||
if (ipc) {
|
||||
@@ -92,8 +92,8 @@ export class CommandLineService implements ICommandLineProcessing {
|
||||
}
|
||||
let connectedContext: azdata.ConnectedContext = undefined;
|
||||
if (profile) {
|
||||
if (this._notificationService) {
|
||||
this._notificationService.status(localize('connectingLabel', 'Connecting: {0}', profile.serverName), { hideAfter: 2500 });
|
||||
if (this._statusBarService) {
|
||||
this._statusBarService.setStatusMessage(localize('connectingLabel', 'Connecting:') + profile.serverName, 2500);
|
||||
}
|
||||
try {
|
||||
await this._connectionManagementService.connectIfNotConnected(profile, 'connection', true);
|
||||
@@ -106,8 +106,8 @@ export class CommandLineService implements ICommandLineProcessing {
|
||||
}
|
||||
}
|
||||
if (commandName) {
|
||||
if (this._notificationService) {
|
||||
this._notificationService.status(localize('runningCommandLabel', 'Running command: {0}', commandName), { hideAfter: 2500 });
|
||||
if (this._statusBarService) {
|
||||
this._statusBarService.setStatusMessage(localize('runningCommandLabel', 'Running command:') + commandName, 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._notificationService) {
|
||||
this._notificationService.status(localize('openingNewQueryLabel', 'Opening new query: {0}', profile.serverName), { hideAfter: 2500 });
|
||||
if (this._statusBarService) {
|
||||
this._statusBarService.setStatusMessage(localize('openingNewQueryLabel', 'Opening new query:') + profile.serverName, 2500);
|
||||
}
|
||||
try {
|
||||
await TaskUtilities.newQuery(profile,
|
||||
@@ -150,8 +150,8 @@ export class CommandLineService implements ICommandLineProcessing {
|
||||
showConnectionDialogOnError: warnOnConnectFailure,
|
||||
showFirewallRuleOnError: warnOnConnectFailure
|
||||
};
|
||||
if (this._notificationService) {
|
||||
this._notificationService.status(localize('connectingQueryLabel', 'Connecting query file'), { hideAfter: 2500 });
|
||||
if (this._statusBarService) {
|
||||
this._statusBarService.setStatusMessage(localize('connectingQueryLabel', 'Connecting query file'), 2500);
|
||||
}
|
||||
await this._connectionManagementService.connect(profile, uriString, options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user