mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 01:25:38 -05:00
This reverts commit d15a3fcc98.
This commit is contained in:
@@ -19,8 +19,6 @@ import { ConnectionStatusbarItem } from 'sql/workbench/parts/connection/browser/
|
||||
// Register Statusbar item
|
||||
(<statusbar.IStatusbarRegistry>Registry.as(statusbar.Extensions.Statusbar)).registerStatusbarItem(new statusbar.StatusbarItemDescriptor(
|
||||
ConnectionStatusbarItem,
|
||||
'status.connection',
|
||||
localize('status.connection', "Connection"),
|
||||
StatusbarAlignment.RIGHT,
|
||||
100 /* High Priority */
|
||||
));
|
||||
|
||||
@@ -40,7 +40,7 @@ export class ConnectionStatusbarItem implements IStatusbarItem {
|
||||
this._objectExplorerService.onSelectionOrFocusChange(() => this._updateStatus())
|
||||
);
|
||||
|
||||
return combinedDisposable(...this._toDispose);
|
||||
return combinedDisposable(this._toDispose);
|
||||
}
|
||||
|
||||
// Update the connection status shown in the bar
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { ConnectionSummary } from 'azdata';
|
||||
import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar';
|
||||
import * as LocalizedConstants from 'sql/workbench/parts/connection/common/localizedConstants';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
|
||||
// Status when making connections from the viewlet
|
||||
export class ConnectionGlobalStatus {
|
||||
@@ -12,12 +12,12 @@ export class ConnectionGlobalStatus {
|
||||
private _displayTime: number = 5000; // (in ms)
|
||||
|
||||
constructor(
|
||||
@INotificationService private _notificationService: INotificationService
|
||||
@IStatusbarService private _statusBarService: IStatusbarService
|
||||
) {
|
||||
}
|
||||
|
||||
public setStatusToConnected(connectionSummary: ConnectionSummary): void {
|
||||
if (this._notificationService) {
|
||||
if (this._statusBarService) {
|
||||
let text: string;
|
||||
let connInfo: string = connectionSummary.serverName;
|
||||
if (connInfo) {
|
||||
@@ -28,13 +28,13 @@ export class ConnectionGlobalStatus {
|
||||
}
|
||||
text = LocalizedConstants.onDidConnectMessage + ' ' + connInfo;
|
||||
}
|
||||
this._notificationService.status(text, { hideAfter: this._displayTime });
|
||||
this._statusBarService.setStatusMessage(text, this._displayTime);
|
||||
}
|
||||
}
|
||||
|
||||
public setStatusToDisconnected(fileUri: string): void {
|
||||
if (this._notificationService) {
|
||||
this._notificationService.status(LocalizedConstants.onDidDisconnectMessage, { hideAfter: this._displayTime });
|
||||
if (this._statusBarService) {
|
||||
this._statusBarService.setStatusMessage(LocalizedConstants.onDidDisconnectMessage, this._displayTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { $ } from 'vs/base/browser/dom';
|
||||
import { ExecuteCommandAction } from 'vs/platform/actions/common/actions';
|
||||
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { ILocalProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
|
||||
export class ObjectMetadataWrapper implements ObjectMetadata {
|
||||
public metadataType: MetadataType;
|
||||
@@ -111,7 +111,7 @@ export class ExplorerController extends TreeDefaults.DefaultController {
|
||||
private _contextMenuService: IContextMenuService,
|
||||
private _capabilitiesService: ICapabilitiesService,
|
||||
private _instantiationService: IInstantiationService,
|
||||
private _progressService: ILocalProgressService
|
||||
private _progressService: IProgressService
|
||||
) {
|
||||
super();
|
||||
}
|
||||
@@ -424,7 +424,7 @@ class ExplorerScriptSelectAction extends ScriptSelectAction {
|
||||
@IQueryEditorService queryEditorService: IQueryEditorService,
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@IScriptingService scriptingService: IScriptingService,
|
||||
@ILocalProgressService private progressService: ILocalProgressService
|
||||
@IProgressService private progressService: IProgressService
|
||||
) {
|
||||
super(id, label, queryEditorService, connectionManagementService, scriptingService);
|
||||
}
|
||||
@@ -443,7 +443,7 @@ class ExplorerScriptCreateAction extends ScriptCreateAction {
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@IScriptingService scriptingService: IScriptingService,
|
||||
@IErrorMessageService errorMessageService: IErrorMessageService,
|
||||
@ILocalProgressService private progressService: ILocalProgressService
|
||||
@IProgressService private progressService: IProgressService
|
||||
) {
|
||||
super(id, label, queryEditorService, connectionManagementService, scriptingService, errorMessageService);
|
||||
}
|
||||
@@ -462,7 +462,7 @@ class ExplorerScriptAlterAction extends ScriptAlterAction {
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@IScriptingService scriptingService: IScriptingService,
|
||||
@IErrorMessageService errorMessageService: IErrorMessageService,
|
||||
@ILocalProgressService private progressService: ILocalProgressService
|
||||
@IProgressService private progressService: IProgressService
|
||||
) {
|
||||
super(id, label, queryEditorService, connectionManagementService, scriptingService, errorMessageService);
|
||||
}
|
||||
@@ -481,7 +481,7 @@ class ExplorerScriptExecuteAction extends ScriptExecuteAction {
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@IScriptingService scriptingService: IScriptingService,
|
||||
@IErrorMessageService errorMessageService: IErrorMessageService,
|
||||
@ILocalProgressService private progressService: ILocalProgressService
|
||||
@IProgressService private progressService: IProgressService
|
||||
) {
|
||||
super(id, label, queryEditorService, connectionManagementService, scriptingService, errorMessageService);
|
||||
}
|
||||
@@ -498,7 +498,7 @@ class ExplorerManageAction extends ManageAction {
|
||||
id: string, label: string,
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@IAngularEventingService angularEventingService: IAngularEventingService,
|
||||
@ILocalProgressService private _progressService: ILocalProgressService
|
||||
@IProgressService private _progressService: IProgressService
|
||||
) {
|
||||
super(id, label, connectionManagementService, angularEventingService);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'vs/css!sql/media/objectTypes/objecttypes';
|
||||
import 'vs/css!sql/media/icons/common-icons';
|
||||
import 'vs/css!./media/explorerWidget';
|
||||
|
||||
import { Component, Inject, forwardRef, OnInit, ViewChild, ElementRef } from '@angular/core';
|
||||
import { Component, Inject, forwardRef, ChangeDetectorRef, OnInit, ViewChild, ElementRef } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { DashboardWidget, IDashboardWidget, WidgetConfig, WIDGET_CONFIG } from 'sql/workbench/parts/dashboard/common/dashboardWidget';
|
||||
@@ -26,7 +26,7 @@ import { Delayer } from 'vs/base/common/async';
|
||||
import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ILocalProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
|
||||
|
||||
@Component({
|
||||
@@ -58,6 +58,7 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
|
||||
constructor(
|
||||
@Inject(forwardRef(() => CommonServiceInterface)) private _bootstrap: CommonServiceInterface,
|
||||
@Inject(forwardRef(() => Router)) private _router: Router,
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) private _changeRef: ChangeDetectorRef,
|
||||
@Inject(WIDGET_CONFIG) protected _config: WidgetConfig,
|
||||
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
||||
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
|
||||
@@ -65,7 +66,7 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
|
||||
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
|
||||
@Inject(IContextMenuService) private contextMenuService: IContextMenuService,
|
||||
@Inject(ICapabilitiesService) private capabilitiesService: ICapabilitiesService,
|
||||
@Inject(ILocalProgressService) private progressService: ILocalProgressService
|
||||
@Inject(IProgressService) private progressService: IProgressService
|
||||
) {
|
||||
super();
|
||||
this.init();
|
||||
|
||||
@@ -128,6 +128,7 @@ export class ConnectionViewletPanel extends ViewletPanel {
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this.disposables = dispose(this.disposables);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import { ICustomViewDescriptor, TreeViewItemHandleArg } from 'sql/workbench/comm
|
||||
import { IQueryEditorService } from 'sql/workbench/services/queryEditor/common/queryEditorService';
|
||||
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
|
||||
import { IViewsRegistry, Extensions } from 'vs/workbench/common/views';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IProgressService2 } from 'vs/platform/progress/common/progress';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
|
||||
export const DISCONNECT_COMMAND_ID = 'dataExplorer.disconnect';
|
||||
@@ -82,7 +82,7 @@ CommandsRegistry.registerCommand({
|
||||
CommandsRegistry.registerCommand({
|
||||
id: REFRESH_COMMAND_ID,
|
||||
handler: (accessor, args: TreeViewItemHandleArg) => {
|
||||
const progressSerivce = accessor.get(IProgressService);
|
||||
const progressSerivce = accessor.get(IProgressService2);
|
||||
if (args.$treeItem) {
|
||||
const { treeView } = (<ICustomViewDescriptor>Registry.as<IViewsRegistry>(Extensions.ViewsRegistry).getView(args.$treeViewId));
|
||||
if (args.$treeContainerId) {
|
||||
|
||||
@@ -56,11 +56,12 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
this._setup = false;
|
||||
this._stopButtonEnabled = false;
|
||||
this._refreshButtonEnabled = false;
|
||||
this._toDispose = [];
|
||||
this._useQueryFilter = false;
|
||||
|
||||
// re-emit sql editor events through this editor if it exists
|
||||
if (this._sql) {
|
||||
this._register(this._sql.onDidChangeDirty(() => this._onDidChangeDirty.fire()));
|
||||
this._toDispose.push(this._sql.onDidChangeDirty(() => this._onDidChangeDirty.fire()));
|
||||
this._sql.disableSaving();
|
||||
}
|
||||
this.disableSaving();
|
||||
@@ -73,7 +74,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
let self = this;
|
||||
|
||||
// Register callbacks for the Actions
|
||||
this._register(
|
||||
this._toDispose.push(
|
||||
this._queryModelService.onRunQueryStart(uri => {
|
||||
if (self.uri === uri) {
|
||||
self.initEditStart();
|
||||
@@ -81,7 +82,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
})
|
||||
);
|
||||
|
||||
this._register(
|
||||
this._toDispose.push(
|
||||
this._queryModelService.onEditSessionReady((result) => {
|
||||
if (self.uri === result.ownerUri) {
|
||||
self.initEditEnd(result);
|
||||
@@ -209,6 +210,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
this._queryModelService.disposeQuery(this.uri);
|
||||
this._sql.dispose();
|
||||
this._results.dispose();
|
||||
this._toDispose = dispose(this._toDispose);
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import { NotebookModel } from 'sql/workbench/parts/notebook/models/notebookModel
|
||||
import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import * as themeColors from 'vs/workbench/common/theme';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { SimpleLocalProgressService } from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { SimpleProgressService } from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
@@ -189,7 +189,7 @@ export class CodeComponent extends AngularDisposable implements OnInit, OnChange
|
||||
}
|
||||
|
||||
private async createEditor(): Promise<void> {
|
||||
let instantiationService = this._instantiationService.createChild(new ServiceCollection([IProgressService, new SimpleLocalProgressService()]));
|
||||
let instantiationService = this._instantiationService.createChild(new ServiceCollection([IProgressService, new SimpleProgressService()]));
|
||||
this._editor = instantiationService.createInstance(QueryTextEditor);
|
||||
this._editor.create(this.codeElement.nativeElement);
|
||||
this._editor.setVisible(true);
|
||||
|
||||
@@ -7,8 +7,8 @@ import 'vs/css!./notebook';
|
||||
import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import { SIDE_BAR_BACKGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND, EDITOR_GROUP_HEADER_TABS_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { activeContrastBorder, contrastBorder, buttonBackground, textLinkForeground, textLinkActiveForeground, textPreformatForeground, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { IDisposable } from 'vscode-xterm';
|
||||
import { editorLineHighlight, editorLineHighlightBorder } from 'vs/editor/common/view/editorColorRegistry';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
export function registerNotebookThemes(overrideEditorThemeSetting: boolean): IDisposable {
|
||||
return registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { ITree } from 'vs/base/parts/tree/browser/tree';
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/common/objectExplorerService';
|
||||
|
||||
import { IProgressService, IProgressRunner, ILocalProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IProgressService, IProgressRunner } from 'vs/platform/progress/common/progress';
|
||||
import { TreeNode } from 'sql/workbench/parts/objectExplorer/common/treeNode';
|
||||
import { TreeUpdateUtils } from 'sql/workbench/parts/objectExplorer/browser/treeUpdateUtils';
|
||||
|
||||
@@ -18,7 +18,7 @@ export class TreeSelectionHandler {
|
||||
private _clicks: number = 0;
|
||||
private _doubleClickTimeoutTimer: NodeJS.Timer = undefined;
|
||||
|
||||
constructor(@ILocalProgressService private _progressService: ILocalProgressService) {
|
||||
constructor(@IProgressService private _progressService: IProgressService) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ export class ProfilerTableEditor extends BaseEditor implements IProfilerControll
|
||||
: localize('ProfilerTableEditor.eventCount', 'Events: {0}', this._input.data.getLength());
|
||||
|
||||
this._disposeStatusbarItem();
|
||||
this._statusbarItem = this._statusbarService.addEntry({ text: message }, 'status.eventCount', localize('status.eventCount', "Event Count"), StatusbarAlignment.RIGHT);
|
||||
this._statusbarItem = this._statusbarService.addEntry({ text: message }, StatusbarAlignment.RIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ export class SqlFlavorStatusbarItem implements IStatusbarItem {
|
||||
this._editorService.onDidVisibleEditorsChange(() => this._onEditorsChanged()),
|
||||
this._editorService.onDidCloseEditor(event => this._onEditorClosed(event))
|
||||
);
|
||||
return combinedDisposable(...this._toDispose);
|
||||
return combinedDisposable(this._toDispose);
|
||||
}
|
||||
|
||||
private _onSelectionClick() {
|
||||
|
||||
@@ -156,7 +156,7 @@ export class QueryEditor extends BaseEditor {
|
||||
|
||||
this.setTaskbarContent();
|
||||
|
||||
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
||||
this._toDispose.push(this.configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectedKeys.includes('workbench.enablePreviewFeatures')) {
|
||||
this.setTaskbarContent();
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export class QueryStatusbarItem implements IStatusbarItem {
|
||||
this._editorService.onDidCloseEditor(event => this._onEditorClosed(event))
|
||||
);
|
||||
|
||||
return combinedDisposable(...this._toDispose);
|
||||
return combinedDisposable(this._toDispose);
|
||||
}
|
||||
|
||||
private _onEditorClosed(event: IEditorCloseEvent): void {
|
||||
|
||||
@@ -40,7 +40,7 @@ export class RowCountStatusBarItem implements IStatusbarItem {
|
||||
|
||||
this._showStatus();
|
||||
|
||||
return combinedDisposable(...disposables);
|
||||
return combinedDisposable(disposables);
|
||||
}
|
||||
|
||||
private _onEditorsChanged() {
|
||||
|
||||
@@ -43,7 +43,7 @@ export class TimeElapsedStatusBarItem implements IStatusbarItem {
|
||||
|
||||
this._showStatus();
|
||||
|
||||
return combinedDisposable(...disposables);
|
||||
return combinedDisposable(disposables);
|
||||
}
|
||||
|
||||
private _onEditorsChanged() {
|
||||
|
||||
Reference in New Issue
Block a user