mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 (#15681)
* Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 * Fixes and cleanup * Distro * Fix hygiene yarn * delete no yarn lock changes file * Fix hygiene * Fix layer check * Fix CI * Skip lib checks * Remove tests deleted in vs code * Fix tests * Distro * Fix tests and add removed extension point * Skip failing notebook tests for now * Disable broken tests and cleanup build folder * Update yarn.lock and fix smoke tests * Bump sqlite * fix contributed actions and file spacing * Fix user data path * Update yarn.locks Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
@@ -80,7 +80,7 @@ class AccountPanel extends ViewPane {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
}
|
||||
|
||||
protected renderBody(container: HTMLElement): void {
|
||||
protected override renderBody(container: HTMLElement): void {
|
||||
this.accountList = new List<azdata.Account>('AccountList', container, new AccountListDelegate(AccountDialog.ACCOUNTLIST_HEIGHT), [this.instantiationService.createInstance(AccountListRenderer)]);
|
||||
this.tenantList = new List<Tenant>('TenantList', container, new TenantListDelegate(AccountDialog.ACCOUNTLIST_HEIGHT), [this.instantiationService.createInstance(TenantListRenderer)]);
|
||||
this._register(attachListStyler(this.accountList, this.themeService));
|
||||
@@ -90,7 +90,7 @@ class AccountPanel extends ViewPane {
|
||||
this.tenantList.getHTMLElement().tabIndex = -1;
|
||||
}
|
||||
|
||||
protected layoutBody(size: number): void {
|
||||
protected override layoutBody(size: number): void {
|
||||
this.accountList?.layout(size);
|
||||
this.tenantList?.layout(size);
|
||||
}
|
||||
@@ -99,7 +99,7 @@ class AccountPanel extends ViewPane {
|
||||
return this.accountList!.length;
|
||||
}
|
||||
|
||||
public focus() {
|
||||
public override focus() {
|
||||
this.accountList!.domFocus();
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ export class AccountDialog extends Modal {
|
||||
this._splitView!.layout(DOM.getContentHeight(this._container!));
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
this._closeButton = this.addFooterButton(localize('accountDialog.close', "Close"), () => this.close());
|
||||
@@ -270,12 +270,12 @@ export class AccountDialog extends Modal {
|
||||
}
|
||||
|
||||
/* Overwrite escape key behavior */
|
||||
protected onClose() {
|
||||
protected override onClose() {
|
||||
this.close();
|
||||
}
|
||||
|
||||
/* Overwrite enter key behavior */
|
||||
protected onAccept() {
|
||||
protected override onAccept() {
|
||||
this.close('ok');
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ export class AccountDialog extends Modal {
|
||||
return true;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
for (const provider of this._providerViewsMap.values()) {
|
||||
if (provider.addAccountAction) {
|
||||
|
||||
@@ -99,11 +99,11 @@ export class AccountListRenderer extends AccountPickerListRenderer {
|
||||
super();
|
||||
}
|
||||
|
||||
public get templateId(): string {
|
||||
public override get templateId(): string {
|
||||
return AccountListRenderer.TEMPLATE_ID;
|
||||
}
|
||||
|
||||
public renderTemplate(container: HTMLElement): AccountListTemplate {
|
||||
public override renderTemplate(container: HTMLElement): AccountListTemplate {
|
||||
const tableTemplate = super.renderTemplate(container) as AccountListTemplate;
|
||||
tableTemplate.content = DOM.append(tableTemplate.label, DOM.$('div.content'));
|
||||
tableTemplate.actions = new ActionBar(tableTemplate.root, { animated: false });
|
||||
@@ -111,7 +111,7 @@ export class AccountListRenderer extends AccountPickerListRenderer {
|
||||
return tableTemplate;
|
||||
}
|
||||
|
||||
public renderElement(account: azdata.Account, index: number, templateData: AccountListTemplate): void {
|
||||
public override renderElement(account: azdata.Account, index: number, templateData: AccountListTemplate): void {
|
||||
super.renderElement(account, index, templateData);
|
||||
if (account.isStale) {
|
||||
templateData.content.innerText = localize('refreshCredentials', "You need to refresh the credentials for this account.");
|
||||
|
||||
@@ -191,7 +191,7 @@ export class AccountPicker extends Disposable {
|
||||
});
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
public override dispose() {
|
||||
super.dispose();
|
||||
if (this._accountList) {
|
||||
this._accountList.dispose();
|
||||
|
||||
@@ -71,7 +71,7 @@ export class AutoOAuthDialog extends Modal {
|
||||
);
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
this.backButton!.onDidClick(() => this.cancel());
|
||||
@@ -117,12 +117,12 @@ export class AutoOAuthDialog extends Modal {
|
||||
}
|
||||
|
||||
/* Overwrite escape key behavior */
|
||||
protected onClose() {
|
||||
protected override onClose() {
|
||||
this.cancel();
|
||||
}
|
||||
|
||||
/* Overwrite enter key behavior */
|
||||
protected onAccept() {
|
||||
protected override onAccept() {
|
||||
this.addAccount();
|
||||
}
|
||||
|
||||
|
||||
@@ -65,18 +65,18 @@ export class TenantListRenderer extends TenantPickerListRenderer {
|
||||
super();
|
||||
}
|
||||
|
||||
public get templateId(): string {
|
||||
public override get templateId(): string {
|
||||
return TenantPickerListRenderer.TEMPLATE_ID;
|
||||
}
|
||||
|
||||
public renderTemplate(container: HTMLElement): PickerListTemplate {
|
||||
public override renderTemplate(container: HTMLElement): PickerListTemplate {
|
||||
const tableTemplate = super.renderTemplate(container) as PickerListTemplate;
|
||||
tableTemplate.content = DOM.append(tableTemplate.label, DOM.$('div.content'));
|
||||
|
||||
return tableTemplate;
|
||||
}
|
||||
|
||||
public renderElement(tenant: Tenant, index: number, templateData: PickerListTemplate): void {
|
||||
public override renderElement(tenant: Tenant, index: number, templateData: PickerListTemplate): void {
|
||||
super.renderElement(tenant, index, templateData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ export function bootstrapAngular<T>(accessor: ServicesAccessor, moduleType: IMod
|
||||
|
||||
platform.bootstrapModule(moduleType(params, uniqueSelectorString, instantiationService)).then(moduleRef => {
|
||||
if (input) {
|
||||
input.onDispose(() => {
|
||||
input.onWillDispose(() => {
|
||||
moduleRef.destroy();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ export class CmsConnectionController extends ConnectionController {
|
||||
}, providerName);
|
||||
}
|
||||
|
||||
public showUiComponent(container: HTMLElement, authTypeChanged: boolean = false): void {
|
||||
public override showUiComponent(container: HTMLElement, authTypeChanged: boolean = false): void {
|
||||
this._databaseCache = new Map<string, string[]>();
|
||||
this._connectionWidget.createConnectionWidget(container, authTypeChanged);
|
||||
}
|
||||
|
||||
@@ -62,14 +62,14 @@ export class CmsConnectionWidget extends ConnectionWidget {
|
||||
}
|
||||
}
|
||||
|
||||
protected registerListeners(): void {
|
||||
protected override registerListeners(): void {
|
||||
super.registerListeners();
|
||||
if (this._serverDescriptionInputBox) {
|
||||
this._register(styler.attachInputBoxStyler(this._serverDescriptionInputBox, this._themeService));
|
||||
}
|
||||
}
|
||||
|
||||
protected fillInConnectionForm(authTypeChanged: boolean = false): void {
|
||||
protected override fillInConnectionForm(authTypeChanged: boolean = false): void {
|
||||
// Server Name
|
||||
this.addServerNameOption();
|
||||
|
||||
@@ -89,7 +89,7 @@ export class CmsConnectionWidget extends ConnectionWidget {
|
||||
this.addAdvancedOptions();
|
||||
}
|
||||
|
||||
protected addAuthenticationTypeOption(authTypeChanged: boolean = false): void {
|
||||
protected override addAuthenticationTypeOption(authTypeChanged: boolean = false): void {
|
||||
super.addAuthenticationTypeOption(authTypeChanged);
|
||||
let authTypeOption = this._optionsMaps[ConnectionOptionSpecialType.authType];
|
||||
let newAuthTypes = authTypeOption.categoryValues;
|
||||
@@ -124,7 +124,7 @@ export class CmsConnectionWidget extends ConnectionWidget {
|
||||
}
|
||||
}
|
||||
|
||||
public createConnectionWidget(container: HTMLElement, authTypeChanged: boolean = false): void {
|
||||
public override createConnectionWidget(container: HTMLElement, authTypeChanged: boolean = false): void {
|
||||
this._container = DOM.append(container, DOM.$('div.connection-table'));
|
||||
this._tableContainer = DOM.append(this._container, DOM.$('table.connection-table-content'));
|
||||
this.fillInConnectionForm(authTypeChanged);
|
||||
@@ -138,14 +138,14 @@ export class CmsConnectionWidget extends ConnectionWidget {
|
||||
});
|
||||
}
|
||||
|
||||
public handleOnConnecting(): void {
|
||||
public override handleOnConnecting(): void {
|
||||
super.handleOnConnecting();
|
||||
if (this._serverDescriptionInputBox) {
|
||||
this._serverDescriptionInputBox.disable();
|
||||
}
|
||||
}
|
||||
|
||||
public handleResetConnection(): void {
|
||||
public override handleResetConnection(): void {
|
||||
super.handleResetConnection();
|
||||
if (this._serverDescriptionInputBox) {
|
||||
this._serverDescriptionInputBox.enable();
|
||||
@@ -156,7 +156,7 @@ export class CmsConnectionWidget extends ConnectionWidget {
|
||||
return this._serverDescriptionInputBox.value;
|
||||
}
|
||||
|
||||
public connect(model: IConnectionProfile): boolean {
|
||||
public override connect(model: IConnectionProfile): boolean {
|
||||
let validInputs = super.connect(model);
|
||||
if (this._serverDescriptionInputBox) {
|
||||
model.options.registeredServerDescription = this._serverDescriptionInputBox.value;
|
||||
@@ -165,7 +165,7 @@ export class CmsConnectionWidget extends ConnectionWidget {
|
||||
return validInputs;
|
||||
}
|
||||
|
||||
public fillInConnectionInputs(connectionInfo: IConnectionProfile) {
|
||||
public override fillInConnectionInputs(connectionInfo: IConnectionProfile) {
|
||||
super.fillInConnectionInputs(connectionInfo);
|
||||
if (connectionInfo) {
|
||||
let description = connectionInfo.options.registeredServerDescription ? connectionInfo.options.registeredServerDescription : '';
|
||||
|
||||
@@ -48,7 +48,7 @@ export class ClearRecentConnectionsAction extends Action {
|
||||
this._useConfirmationMessage = value;
|
||||
}
|
||||
|
||||
public run(): Promise<void> {
|
||||
public override run(): Promise<void> {
|
||||
if (this._useConfirmationMessage) {
|
||||
return this.promptConfirmationMessage().then(result => {
|
||||
if (result.confirmed) {
|
||||
@@ -124,7 +124,7 @@ export class ClearSingleRecentConnectionAction extends Action {
|
||||
this.enabled = true;
|
||||
}
|
||||
|
||||
public run(): Promise<void> {
|
||||
public override run(): Promise<void> {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
resolve(this._connectionManagementService.clearRecentConnection(this._connectionProfile));
|
||||
this._onRecentConnectionRemoved.fire();
|
||||
@@ -152,7 +152,7 @@ export class GetCurrentConnectionStringAction extends Action {
|
||||
this.enabled = true;
|
||||
}
|
||||
|
||||
public run(): Promise<void> {
|
||||
public override run(): Promise<void> {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
let activeInput = this._editorService.activeEditor;
|
||||
if (activeInput && (activeInput instanceof QueryEditorInput || activeInput instanceof EditDataInput || activeInput instanceof DashboardInput)
|
||||
|
||||
@@ -22,13 +22,13 @@ import { ServerTreeRenderer } from 'sql/workbench/services/objectExplorer/browse
|
||||
import { TreeUpdateUtils } from 'sql/workbench/services/objectExplorer/browser/treeUpdateUtils';
|
||||
import { TreeNode } from 'sql/workbench/services/objectExplorer/common/treeNode';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { ActionBar, IActionViewItemProvider } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { status } from 'vs/base/browser/ui/aria/aria';
|
||||
import { IIdentityProvider, IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
|
||||
import { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar';
|
||||
import { IAsyncDataSource, ITreeNode, ITreeRenderer } from 'vs/base/browser/ui/tree/tree';
|
||||
import { IAction, IActionViewItemProvider } from 'vs/base/common/actions';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { debounce } from 'vs/base/common/decorators';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { Iterable } from 'vs/base/common/iterator';
|
||||
@@ -42,7 +42,7 @@ import { createAndFillInContextMenuActions, MenuEntryActionViewItem } from 'vs/p
|
||||
import { IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { FileKind } from 'vs/platform/files/common/files';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -602,9 +602,9 @@ class ConnectionBrowseTreeMenuProvider {
|
||||
return [];
|
||||
}
|
||||
|
||||
const contextKeyService = this.contextKeyService.createScoped();
|
||||
const contextKey = new ContextKey(contextKeyService);
|
||||
contextKey.set(context);
|
||||
const contextKeyService = context instanceof ConnectionDialogTreeProviderElement ?
|
||||
this.contextKeyService.createOverlay([['treeId', context.id]]) :
|
||||
this.contextKeyService.createOverlay([['contextValue', context.contextValue]]);
|
||||
const menu = this.menuService.createMenu(MenuId.ConnectionDialogBrowseTreeContext, contextKeyService);
|
||||
const primary: IAction[] = [];
|
||||
const secondary: IAction[] = [];
|
||||
@@ -725,37 +725,3 @@ class TreeItemRenderer extends Disposable implements ITreeRenderer<ITreeItemFrom
|
||||
templateData.elementDisposable.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
type ContextValueType = ITreeItem | ConnectionDialogTreeProviderElement;
|
||||
|
||||
class ContextKey extends Disposable implements IContextKey<ContextValueType> {
|
||||
static readonly ContextValue = new RawContextKey<string | undefined>('contextValue', undefined);
|
||||
static readonly TreeId = new RawContextKey<string | undefined>('treeId', undefined);
|
||||
private _contextValueKey: IContextKey<string | undefined>;
|
||||
private _treeIdKey: IContextKey<string | undefined>;
|
||||
private _item: ContextValueType;
|
||||
|
||||
constructor(
|
||||
@IContextKeyService contextKeyService: IContextKeyService
|
||||
) {
|
||||
super();
|
||||
this._contextValueKey = ContextKey.ContextValue.bindTo(contextKeyService);
|
||||
this._treeIdKey = ContextKey.TreeId.bindTo(contextKeyService);
|
||||
}
|
||||
set(value: ContextValueType): void {
|
||||
this.reset();
|
||||
this._item = value;
|
||||
if (value instanceof ConnectionDialogTreeProviderElement) {
|
||||
this._treeIdKey.set(value.id);
|
||||
} else {
|
||||
this._contextValueKey.set(value.contextValue);
|
||||
}
|
||||
}
|
||||
reset(): void {
|
||||
this._contextValueKey.reset();
|
||||
this._treeIdKey.reset();
|
||||
}
|
||||
get(): ContextValueType {
|
||||
return this._item;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ export class ConnectionDialogWidget extends Modal {
|
||||
/**
|
||||
* Render the connection flyout
|
||||
*/
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
const connectLabel = localize('connectionDialog.connect', "Connect");
|
||||
@@ -285,12 +285,12 @@ export class ConnectionDialogWidget extends Modal {
|
||||
}
|
||||
|
||||
/* Overwrite espace key behavior */
|
||||
protected onClose(e: StandardKeyboardEvent) {
|
||||
protected override onClose(e: StandardKeyboardEvent) {
|
||||
this.cancel();
|
||||
}
|
||||
|
||||
/* Overwrite enter key behavior */
|
||||
protected onAccept(e: StandardKeyboardEvent) {
|
||||
protected override onAccept(e: StandardKeyboardEvent) {
|
||||
if (!e.target.classList.contains('monaco-tree')) {
|
||||
this.connect();
|
||||
}
|
||||
|
||||
@@ -69,12 +69,12 @@ export class RecentConnectionTreeController extends DefaultController {
|
||||
super();
|
||||
}
|
||||
|
||||
protected onLeftClick(tree: ITree, element: any, eventish: ICancelableEvent, origin: string = 'mouse'): boolean {
|
||||
protected override onLeftClick(tree: ITree, element: any, eventish: ICancelableEvent, origin: string = 'mouse'): boolean {
|
||||
this.clickcb(element, eventish, origin);
|
||||
return super.onLeftClick(tree, element, eventish, origin);
|
||||
}
|
||||
|
||||
protected onEnter(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
protected override onEnter(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
super.onEnter(tree, event);
|
||||
this.clickcb(tree.getSelection()[0], event, 'keyboard');
|
||||
return true;
|
||||
@@ -86,7 +86,7 @@ export class RecentConnectionTreeController extends DefaultController {
|
||||
return true;
|
||||
}
|
||||
|
||||
public onMouseDown(tree: ITree, element: any, event: mouse.IMouseEvent, origin: string = 'mouse'): boolean {
|
||||
public override onMouseDown(tree: ITree, element: any, event: mouse.IMouseEvent, origin: string = 'mouse'): boolean {
|
||||
if (event.leftButton || event.middleButton) {
|
||||
return this.onLeftClick(tree, element, event, origin);
|
||||
} else {
|
||||
@@ -94,7 +94,7 @@ export class RecentConnectionTreeController extends DefaultController {
|
||||
}
|
||||
}
|
||||
|
||||
public onKeyDown(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
public override onKeyDown(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
if (event.keyCode === 20) {
|
||||
let element = tree.getFocus();
|
||||
if (element instanceof ConnectionProfile) {
|
||||
|
||||
@@ -115,7 +115,7 @@ suite('ConnectionDialogService tests', () => {
|
||||
});
|
||||
testConnectionDialog = new TestConnectionDialogWidget(providerDisplayNames, providerNameToDisplayMap['MSSQL'], providerNameToDisplayMap, testInstantiationService, mockConnectionManagementService.object, undefined, undefined, viewDescriptorService, new TestThemeService(), new TestLayoutService(), new NullAdsTelemetryService(), new MockContextKeyService(), undefined, new NullLogService(), new TestTextResourcePropertiesService(new TestConfigurationService), new TestConfigurationService());
|
||||
testConnectionDialog.render();
|
||||
testConnectionDialog.renderBody(DOM.createStyleSheet());
|
||||
testConnectionDialog['renderBody'](DOM.createStyleSheet());
|
||||
(connectionDialogService as any)._connectionDialog = testConnectionDialog;
|
||||
|
||||
capabilitiesService.capabilities[Constants.mssqlProviderName] = {
|
||||
|
||||
@@ -68,7 +68,7 @@ suite('ConnectionDialogWidget tests', () => {
|
||||
connectionDialogWidget = new TestConnectionDialogWidget(providerDisplayNames, providerNameToDisplayMap['MSSQL'], providerNameToDisplayMap, cmInstantiationService, mockConnectionManagementService.object, undefined, undefined, viewDescriptorService, new TestThemeService(), new TestLayoutService(), new NullAdsTelemetryService(), new MockContextKeyService(), undefined, new NullLogService(), new TestTextResourcePropertiesService(new TestConfigurationService()), new TestConfigurationService());
|
||||
element = DOM.createStyleSheet();
|
||||
connectionDialogWidget.render();
|
||||
connectionDialogWidget.renderBody(element);
|
||||
connectionDialogWidget['renderBody'](element);
|
||||
});
|
||||
|
||||
teardown(() => {
|
||||
|
||||
@@ -38,7 +38,4 @@ export class TestConnectionDialogWidget extends ConnectionDialogWidget {
|
||||
) {
|
||||
super(providerDisplayNameOptions, selectedProviderType, providerNameToDisplayNameMap, _instantiationService, _connectionManagementService, _contextMenuService, _contextViewService, themeService, layoutService, telemetryService, contextKeyService, clipboardService, logService, textResourcePropertiesService, configurationService);
|
||||
}
|
||||
public renderBody(container: HTMLElement) {
|
||||
super.renderBody(container);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'vs/css!./media/views';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IDisposable, Disposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IAction, ActionRunner, IActionViewItemProvider } from 'vs/base/common/actions';
|
||||
import { IAction, ActionRunner } from 'vs/base/common/actions';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IMenuService, MenuId, MenuItemAction, registerAction2, Action2, SubmenuItemAction } from 'vs/platform/actions/common/actions';
|
||||
@@ -21,7 +21,7 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { ResourceLabels, IResourceLabel } from 'vs/workbench/browser/labels';
|
||||
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { ActionBar, IActionViewItemProvider } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { dirname, basename } from 'vs/base/common/resources';
|
||||
import { FileThemeIcon, FolderThemeIcon, registerThemingParticipant, ThemeIcon, IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
@@ -963,7 +963,7 @@ class MultipleSelectionActionRunner extends ActionRunner {
|
||||
}));
|
||||
}
|
||||
|
||||
async runAction(action: IAction, context: TreeViewItemHandleArg): Promise<void> {
|
||||
override async runAction(action: IAction, context: TreeViewItemHandleArg): Promise<void> {
|
||||
const selection = this.getSelectedResources();
|
||||
let selectionHandleArgs: TreeViewItemHandleArg[] | undefined = undefined;
|
||||
let actionInSelected: boolean = false;
|
||||
@@ -1003,15 +1003,16 @@ class TreeMenus extends Disposable implements IDisposable {
|
||||
}
|
||||
|
||||
private getActions(menuId: MenuId, context: { key: string, value?: string }): { primary: IAction[]; secondary: IAction[]; } {
|
||||
const contextKeyService = this.contextKeyService.createScoped();
|
||||
contextKeyService.createKey('view', this.id);
|
||||
contextKeyService.createKey(context.key, context.value);
|
||||
const contextKeyService = this.contextKeyService.createOverlay([
|
||||
['view', this.id],
|
||||
[context.key, context.value]
|
||||
]);
|
||||
|
||||
const menu = this.menuService.createMenu(menuId, contextKeyService);
|
||||
const primary: IAction[] = [];
|
||||
const secondary: IAction[] = [];
|
||||
const result = { primary, secondary };
|
||||
createAndFillInContextMenuActions(menu, { shouldForwardArgs: true }, result, g => /^inline/.test(g));
|
||||
createAndFillInContextMenuActions(menu, { shouldForwardArgs: true }, result, 'inline');
|
||||
|
||||
menu.dispose();
|
||||
|
||||
@@ -1042,7 +1043,7 @@ export class TestTreeView extends TreeView {
|
||||
super(id, title, themeService, instantiationService, commandService, configurationService, progressService, contextMenuService, keybindingService, notificationService, viewDescriptorService, contextKeyService);
|
||||
}
|
||||
|
||||
setVisibility(isVisible: boolean): void {
|
||||
override setVisibility(isVisible: boolean): void {
|
||||
super.setVisibility(isVisible);
|
||||
if (this.visible) {
|
||||
this.activate();
|
||||
|
||||
@@ -141,7 +141,7 @@ export class NewDashboardTabDialog extends Modal {
|
||||
this._extensionList!.layout(height);
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
|
||||
@@ -192,12 +192,12 @@ export class NewDashboardTabDialog extends Modal {
|
||||
}
|
||||
|
||||
/* Overwrite escape key behavior */
|
||||
protected onClose() {
|
||||
protected override onClose() {
|
||||
this.cancel();
|
||||
}
|
||||
|
||||
/* Overwrite enter key behavior */
|
||||
protected onAccept() {
|
||||
protected override onAccept() {
|
||||
this.addNewTabs();
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ export class NewDashboardTabDialog extends Modal {
|
||||
}
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export class DialogModal extends Modal {
|
||||
this._dialogPane.layout();
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachCustomDialogStyler(this, this._themeService, this._modalOptions.dialogStyle);
|
||||
|
||||
@@ -159,18 +159,18 @@ export class DialogModal extends Modal {
|
||||
/**
|
||||
* Overridable to change behavior of escape key
|
||||
*/
|
||||
protected onClose(e: StandardKeyboardEvent): void {
|
||||
protected override onClose(e: StandardKeyboardEvent): void {
|
||||
this.cancel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Overridable to change behavior of enter key
|
||||
*/
|
||||
protected onAccept(e: StandardKeyboardEvent): void {
|
||||
protected override onAccept(e: StandardKeyboardEvent): void {
|
||||
this.done().catch(err => onUnexpectedError(err));
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
this._dialogPane.dispose();
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ export class DialogPane extends Disposable implements IThemable {
|
||||
return valid;
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
public override dispose() {
|
||||
super.dispose();
|
||||
this._body.remove();
|
||||
this._moduleRefs.forEach(moduleRef => moduleRef.destroy());
|
||||
|
||||
@@ -65,7 +65,7 @@ export class WizardModal extends Modal {
|
||||
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
|
||||
@@ -151,7 +151,7 @@ export class WizardModal extends Modal {
|
||||
this.updatePageNumbers();
|
||||
}
|
||||
|
||||
protected set messagesElementVisible(visible: boolean) {
|
||||
protected override set messagesElementVisible(visible: boolean) {
|
||||
if (visible) {
|
||||
this._mpContainer.prepend(this._messageElement);
|
||||
} else {
|
||||
@@ -309,14 +309,14 @@ export class WizardModal extends Modal {
|
||||
/**
|
||||
* Overridable to change behavior of escape key
|
||||
*/
|
||||
protected onClose(e: StandardKeyboardEvent): void {
|
||||
protected override onClose(e: StandardKeyboardEvent): void {
|
||||
this.cancel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Overridable to change behavior of enter key
|
||||
*/
|
||||
protected onAccept(e: StandardKeyboardEvent): void {
|
||||
protected override onAccept(e: StandardKeyboardEvent): void {
|
||||
if (this._wizard.currentPage === this._wizard.pages.length - 1) {
|
||||
this.done().catch(err => onUnexpectedError(err));
|
||||
} else {
|
||||
@@ -326,7 +326,7 @@ export class WizardModal extends Modal {
|
||||
}
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
this._dialogPanes.forEach(dialogPane => dialogPane.dispose());
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ export class WizardPage extends DialogTab {
|
||||
private _onUpdate: Emitter<void> = new Emitter<void>();
|
||||
public readonly onUpdate: Event<void> = this._onUpdate.event;
|
||||
|
||||
constructor(public title: string, content?: string, public pageName?: string) {
|
||||
constructor(title: string, content?: string, public pageName?: string) {
|
||||
super(title, content);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ export default class EditQueryRunner extends QueryRunner {
|
||||
public readonly onEditSessionReady = this._onEditSessionReady.event;
|
||||
|
||||
constructor(
|
||||
public uri: string,
|
||||
uri: string,
|
||||
@INotificationService private readonly notificationService: INotificationService,
|
||||
@IQueryManagementService queryManagementService: IQueryManagementService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
|
||||
@@ -61,7 +61,7 @@ export class ErrorMessageDialog extends Modal {
|
||||
this._body = DOM.append(container, DOM.$('div.error-dialog'));
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
this._register(attachModalDialogStyler(this, this._themeService));
|
||||
this.createCopyButton();
|
||||
@@ -126,12 +126,12 @@ export class ErrorMessageDialog extends Modal {
|
||||
}
|
||||
|
||||
/* espace key */
|
||||
protected onClose() {
|
||||
protected override onClose() {
|
||||
this.ok();
|
||||
}
|
||||
|
||||
/* enter key */
|
||||
protected onAccept() {
|
||||
protected override onAccept() {
|
||||
this.ok();
|
||||
}
|
||||
|
||||
@@ -179,6 +179,6 @@ export class ErrorMessageDialog extends Modal {
|
||||
}
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export class FileBrowserController extends treedefaults.DefaultController {
|
||||
super({ clickBehavior: treedefaults.ClickBehavior.ON_MOUSE_DOWN, openMode: treedefaults.OpenMode.SINGLE_CLICK });
|
||||
}
|
||||
|
||||
protected onLeftClick(tree: ITree, element: any, event: IMouseEvent, origin: string = 'mouse'): boolean {
|
||||
protected override onLeftClick(tree: ITree, element: any, event: IMouseEvent, origin: string = 'mouse'): boolean {
|
||||
// In file browser, double clicking an element calls tree.dispose(). There should not be any tree events after selection.
|
||||
if (event.detail === 2) {
|
||||
let payload = { origin: origin, originalEvent: event };
|
||||
@@ -39,7 +39,7 @@ export class FileBrowserController extends treedefaults.DefaultController {
|
||||
}
|
||||
}
|
||||
|
||||
protected onEnter(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
protected override onEnter(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
let payload = { origin: 'keyboard', originalEvent: event };
|
||||
|
||||
if (tree.getHighlight()) {
|
||||
|
||||
@@ -72,7 +72,7 @@ export class FileBrowserDialog extends Modal {
|
||||
this._body = DOM.append(container, DOM.$('.file-browser-dialog'));
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
|
||||
@@ -131,7 +131,7 @@ export class FileBrowserDialog extends Modal {
|
||||
}
|
||||
|
||||
/* enter key */
|
||||
protected onAccept() {
|
||||
protected override onAccept() {
|
||||
if (this._okButton.enabled === true) {
|
||||
this.ok();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export class CopyInsightDialogSelectionAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(event?: IInsightDialogActionContext): Promise<void> {
|
||||
public override async run(event?: IInsightDialogActionContext): Promise<void> {
|
||||
await this._clipboardService.writeText(event.cellData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,14 +91,14 @@ class InsightTableView extends ViewPane {
|
||||
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
}
|
||||
|
||||
protected renderBody(container: HTMLElement): void {
|
||||
protected override renderBody(container: HTMLElement): void {
|
||||
this._table = new Table(container, {
|
||||
columns: this.columns,
|
||||
dataProvider: this.data
|
||||
}, this.tableOptions);
|
||||
}
|
||||
|
||||
protected layoutBody(size: number): void {
|
||||
protected override layoutBody(size: number): void {
|
||||
this._table.layout(size, Orientation.VERTICAL);
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ export class InsightsDialogView extends Modal {
|
||||
});
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
this._closeButton = this.addFooterButton('Close', () => this.close());
|
||||
this._register(attachButtonStyler(this._closeButton, this._themeService));
|
||||
@@ -420,7 +420,7 @@ export class InsightsDialogView extends Modal {
|
||||
this._taskButtonDisposables = [];
|
||||
}
|
||||
|
||||
protected onClose(e: StandardKeyboardEvent) {
|
||||
protected override onClose(e: StandardKeyboardEvent) {
|
||||
this.close();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,9 +35,10 @@ export async function resolveQueryFilePath(services: ServicesAccessor, filePath?
|
||||
// Resolve the path using each folder in our workspace, or undefined if there aren't any
|
||||
// (so that non-folder vars such as environment vars still resolve)
|
||||
const isRemote = fileService.canHandleResource(URI.from({ scheme: Schemas.vscodeRemote }));
|
||||
let resolvedFileUris = (workspaceFolders.length > 0 ? workspaceFolders : [undefined])
|
||||
.map(f => {
|
||||
const uri = URI.file(configurationResolverService.resolve(f, filePath));
|
||||
let resolvedFileUriPromises = (workspaceFolders.length > 0 ? workspaceFolders : [undefined])
|
||||
.map(async f => {
|
||||
const resolvedUri = await configurationResolverService.resolveAsync(f, filePath);
|
||||
const uri = URI.file(resolvedUri);
|
||||
if (f) {
|
||||
return uri.with({ scheme: f.uri.scheme }); // ensure we maintain the correct scheme
|
||||
} else if (isRemote) {
|
||||
@@ -46,6 +47,7 @@ export async function resolveQueryFilePath(services: ServicesAccessor, filePath?
|
||||
return uri;
|
||||
}
|
||||
});
|
||||
const resolvedFileUris = await Promise.all(resolvedFileUriPromises);
|
||||
|
||||
// Just need a single query file so use the first we find that exists
|
||||
for (const uri of resolvedFileUris) {
|
||||
@@ -54,5 +56,5 @@ export async function resolveQueryFilePath(services: ServicesAccessor, filePath?
|
||||
}
|
||||
}
|
||||
|
||||
throw Error(localize('insightsDidNotFindResolvedFile', "Could not find query file at any of the following paths :\n {0}", resolvedFileUris.join('\n')));
|
||||
throw Error(localize('insightsDidNotFindResolvedFile', "Could not find query file at any of the following paths :\n {0}", resolvedFileUriPromises.join('\n')));
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import { IFileService } from 'vs/platform/files/common/files';
|
||||
import * as pfs from 'vs/base/node/pfs';
|
||||
import { getRandomTestPath } from 'vs/base/test/node/testUtils';
|
||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||
import { NativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
|
||||
import { NativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-sandbox/environmentService';
|
||||
import { isEqual } from 'vs/base/common/resources';
|
||||
import { TestWorkbenchConfiguration } from 'vs/workbench/test/electron-browser/workbenchTestServices';
|
||||
|
||||
@@ -56,7 +56,6 @@ suite('Insights Utils tests', function () {
|
||||
test('resolveQueryFilePath resolves path correctly with fully qualified path', async () => {
|
||||
const configurationResolverService = new ConfigurationResolverService(
|
||||
undefined,
|
||||
new MockWorkbenchEnvironmentService({}),
|
||||
undefined,
|
||||
undefined,
|
||||
new TestContextService(),
|
||||
@@ -64,7 +63,7 @@ suite('Insights Utils tests', function () {
|
||||
undefined);
|
||||
|
||||
const fileService = new class extends TestFileService {
|
||||
exists(uri: URI): Promise<boolean> {
|
||||
override exists(uri: URI): Promise<boolean> {
|
||||
return pfs.exists(uri.fsPath);
|
||||
}
|
||||
};
|
||||
@@ -89,7 +88,6 @@ suite('Insights Utils tests', function () {
|
||||
));
|
||||
const configurationResolverService = new ConfigurationResolverService(
|
||||
undefined,
|
||||
new MockWorkbenchEnvironmentService({}),
|
||||
undefined,
|
||||
undefined,
|
||||
contextService,
|
||||
@@ -97,7 +95,7 @@ suite('Insights Utils tests', function () {
|
||||
undefined);
|
||||
|
||||
const fileService = new class extends TestFileService {
|
||||
exists(uri: URI): Promise<boolean> {
|
||||
override exists(uri: URI): Promise<boolean> {
|
||||
return pfs.exists(uri.fsPath);
|
||||
}
|
||||
};
|
||||
@@ -122,7 +120,6 @@ suite('Insights Utils tests', function () {
|
||||
);
|
||||
const configurationResolverService = new ConfigurationResolverService(
|
||||
undefined,
|
||||
new MockWorkbenchEnvironmentService({}),
|
||||
undefined,
|
||||
undefined,
|
||||
contextService,
|
||||
@@ -130,7 +127,7 @@ suite('Insights Utils tests', function () {
|
||||
undefined);
|
||||
|
||||
const fileService = new class extends TestFileService {
|
||||
exists(uri: URI): Promise<boolean> {
|
||||
override exists(uri: URI): Promise<boolean> {
|
||||
return pfs.exists(uri.fsPath);
|
||||
}
|
||||
};
|
||||
@@ -157,7 +154,6 @@ suite('Insights Utils tests', function () {
|
||||
undefined, undefined, undefined));
|
||||
const configurationResolverService = new ConfigurationResolverService(
|
||||
undefined,
|
||||
new MockWorkbenchEnvironmentService({}),
|
||||
undefined,
|
||||
undefined,
|
||||
contextService,
|
||||
@@ -165,7 +161,7 @@ suite('Insights Utils tests', function () {
|
||||
undefined);
|
||||
|
||||
const fileService = new class extends TestFileService {
|
||||
exists(uri: URI): Promise<boolean> {
|
||||
override exists(uri: URI): Promise<boolean> {
|
||||
return pfs.exists(uri.fsPath);
|
||||
}
|
||||
};
|
||||
@@ -191,7 +187,7 @@ suite('Insights Utils tests', function () {
|
||||
const environmentService = new MockWorkbenchEnvironmentService({ TEST_PATH: queryFileDir });
|
||||
|
||||
// Create mock window service with env variable containing test folder for resolution
|
||||
const configurationResolverService = new TestConfigurationResolverService({ getExecPath: () => undefined }, environmentService.userEnv,
|
||||
const configurationResolverService = new TestConfigurationResolverService({ getAppRoot: () => undefined, getExecPath: () => undefined }, Promise.resolve(environmentService.userEnv),
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
@@ -200,7 +196,7 @@ suite('Insights Utils tests', function () {
|
||||
undefined);
|
||||
|
||||
const fileService = new class extends TestFileService {
|
||||
exists(uri: URI): Promise<boolean> {
|
||||
override exists(uri: URI): Promise<boolean> {
|
||||
return pfs.exists(uri.fsPath);
|
||||
}
|
||||
};
|
||||
@@ -221,7 +217,7 @@ suite('Insights Utils tests', function () {
|
||||
const environmentService = new MockWorkbenchEnvironmentService({ TEST_PATH: queryFileDir });
|
||||
|
||||
// Create mock window service with env variable containing test folder for resolution
|
||||
const configurationResolverService = new TestConfigurationResolverService({ getExecPath: () => undefined }, environmentService.userEnv,
|
||||
const configurationResolverService = new TestConfigurationResolverService({ getAppRoot: () => undefined, getExecPath: () => undefined }, Promise.resolve(environmentService.userEnv),
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
@@ -230,7 +226,7 @@ suite('Insights Utils tests', function () {
|
||||
undefined);
|
||||
|
||||
const fileService = new class extends TestFileService {
|
||||
exists(uri: URI): Promise<boolean> {
|
||||
override exists(uri: URI): Promise<boolean> {
|
||||
return pfs.exists(uri.fsPath);
|
||||
}
|
||||
};
|
||||
@@ -248,7 +244,6 @@ suite('Insights Utils tests', function () {
|
||||
const invalidPath = path.join('${INVALID}', 'test.sql');
|
||||
const configurationResolverService = new ConfigurationResolverService(
|
||||
undefined,
|
||||
new MockWorkbenchEnvironmentService({}),
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
@@ -256,7 +251,7 @@ suite('Insights Utils tests', function () {
|
||||
undefined);
|
||||
|
||||
const fileService = new class extends TestFileService {
|
||||
exists(uri: URI): Promise<boolean> {
|
||||
override exists(uri: URI): Promise<boolean> {
|
||||
return pfs.exists(uri.fsPath);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1117,7 +1117,7 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
this.disconnectAttachToConnections().catch(e => this.logService.error(e));
|
||||
this.handleClosed().catch(e => this.logService.error(e));
|
||||
|
||||
@@ -216,7 +216,7 @@ export class NotebookService extends Disposable implements INotebookService {
|
||||
|
||||
if (isUntitled) {
|
||||
let untitledModel = await fileInput.resolve();
|
||||
await untitledModel.load();
|
||||
await untitledModel.resolve();
|
||||
if (options.initialDirtyState === false) {
|
||||
fileInput.setDirty(false);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export class NotebookViewsExtension extends NotebookExtension<INotebookViewMetad
|
||||
|
||||
readonly maxNameIterationAttempts = 100;
|
||||
readonly extension = 'azuredatastudio';
|
||||
readonly version = 1;
|
||||
override readonly version = 1;
|
||||
|
||||
protected _metadata: INotebookViewMetadata;
|
||||
private _onViewDeleted = new Emitter<void>();
|
||||
|
||||
@@ -43,7 +43,7 @@ export class RefreshAction extends Action {
|
||||
) {
|
||||
super(id, label);
|
||||
}
|
||||
public async run(): Promise<void> {
|
||||
public override async run(): Promise<void> {
|
||||
let treeNode: TreeNode | undefined = undefined;
|
||||
if (this.element instanceof ConnectionProfile) {
|
||||
let connection: ConnectionProfile = this.element;
|
||||
@@ -103,7 +103,7 @@ export class EditConnectionAction extends Action {
|
||||
this.class = 'edit-server-action';
|
||||
}
|
||||
|
||||
public async run(): Promise<void> {
|
||||
public override async run(): Promise<void> {
|
||||
if (this._connectionProfile) {
|
||||
await this._connectionManagementService.showEditConnectionDialog(this._connectionProfile);
|
||||
}
|
||||
@@ -123,7 +123,7 @@ export class DisconnectConnectionAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
async run(actionContext: ObjectExplorerActionsContext): Promise<any> {
|
||||
override async run(actionContext: ObjectExplorerActionsContext): Promise<any> {
|
||||
if (!this._connectionProfile) {
|
||||
return true;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ export class AddServerAction extends Action {
|
||||
super(id, label, SqlIconId.addServerAction);
|
||||
}
|
||||
|
||||
public async run(element: ConnectionProfileGroup): Promise<void> {
|
||||
public override async run(element: ConnectionProfileGroup): Promise<void> {
|
||||
// Not sure how to fix this....
|
||||
let connection: Partial<IConnectionProfile> | undefined = element === undefined ? undefined : {
|
||||
connectionName: undefined,
|
||||
@@ -196,7 +196,7 @@ export class AddServerGroupAction extends Action {
|
||||
super(id, label, SqlIconId.addServerGroupAction);
|
||||
}
|
||||
|
||||
public async run(): Promise<void> {
|
||||
public override async run(): Promise<void> {
|
||||
return this.serverGroupController.showCreateGroupDialog();
|
||||
}
|
||||
}
|
||||
@@ -218,7 +218,7 @@ export class EditServerGroupAction extends Action {
|
||||
this.class = 'edit-server-group-action';
|
||||
}
|
||||
|
||||
public run(): Promise<void> {
|
||||
public override run(): Promise<void> {
|
||||
return this.serverGroupController.showEditGroupDialog(this._group);
|
||||
}
|
||||
}
|
||||
@@ -241,7 +241,7 @@ export class ActiveConnectionsFilterAction extends Action {
|
||||
super(id, label, SqlIconId.activeConnectionsAction);
|
||||
}
|
||||
|
||||
public async run(): Promise<void> {
|
||||
public override async run(): Promise<void> {
|
||||
const serverTreeView = this._objectExplorerService.getServerTreeView();
|
||||
if (serverTreeView.view !== ServerTreeViewView.active) {
|
||||
// show active connections in the tree
|
||||
@@ -281,7 +281,7 @@ export class DeleteConnectionAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
public async run(): Promise<void> {
|
||||
public override async run(): Promise<void> {
|
||||
if (this.element instanceof ConnectionProfile) {
|
||||
await this._connectionManagementService.deleteConnection(this.element);
|
||||
} else if (this.element instanceof ConnectionProfileGroup) {
|
||||
|
||||
@@ -42,7 +42,7 @@ export class OEAction extends ExecuteCommandAction {
|
||||
super(id, label, commandService);
|
||||
}
|
||||
|
||||
public async run(actionContext: any): Promise<boolean> {
|
||||
public override async run(actionContext: any): Promise<boolean> {
|
||||
const treeSelectionHandler = this._instantiationService.createInstance(TreeSelectionHandler);
|
||||
|
||||
let profile: IConnectionProfile | undefined = undefined;
|
||||
|
||||
@@ -135,7 +135,7 @@ export class ServerTreeActionProvider {
|
||||
}
|
||||
|
||||
private getContextKeyService(context: ObjectExplorerContext): IContextKeyService {
|
||||
let scopedContextService = this._contextKeyService.createScoped();
|
||||
let scopedContextService = this._contextKeyService.createScoped(context.tree.getHTMLElement());
|
||||
let connectionContextKey = new ConnectionContextKey(scopedContextService, this._queryManagementService);
|
||||
let connectionProfile = context && context.profile;
|
||||
connectionContextKey.set(connectionProfile);
|
||||
|
||||
@@ -30,31 +30,31 @@ export class ServerTreeController extends treedefaults.DefaultController {
|
||||
});
|
||||
}
|
||||
|
||||
public onClick(tree: ITree, element: any, event: IMouseEvent): boolean {
|
||||
public override onClick(tree: ITree, element: any, event: IMouseEvent): boolean {
|
||||
return super.onClick(tree, element, event);
|
||||
}
|
||||
|
||||
protected onLeftClick(tree: ITree, element: any, event: IMouseEvent, origin: string = 'mouse'): boolean {
|
||||
protected override onLeftClick(tree: ITree, element: any, event: IMouseEvent, origin: string = 'mouse'): boolean {
|
||||
return super.onLeftClick(tree, element, event, origin);
|
||||
}
|
||||
|
||||
// Do not allow left / right to expand and collapse groups #7848
|
||||
protected onLeft(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
protected override onLeft(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected onRight(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
protected override onRight(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected onEnter(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
protected override onEnter(tree: ITree, event: IKeyboardEvent): boolean {
|
||||
return super.onEnter(tree, event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return actions in the context menu
|
||||
*/
|
||||
public onContextMenu(tree: ITree, element: any, event: ContextMenuEvent): boolean {
|
||||
public override onContextMenu(tree: ITree, element: any, event: ContextMenuEvent): boolean {
|
||||
if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'input') {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,6 @@ export class TreeCreationUtils {
|
||||
accessibilityProvider: new ServerTreeAccessibilityProvider(nls.localize('serversAriaLabel', "Servers")),
|
||||
keyboardNavigationLabelProvider: instantiationService.createInstance(ServerTreeKeyboardNavigationLabelProvider),
|
||||
openOnSingleClick: true,
|
||||
openOnFocus: true,
|
||||
dnd: dnd,
|
||||
identityProvider: identityProvider
|
||||
};
|
||||
|
||||
@@ -310,7 +310,7 @@ export class ProfilerColumnEditorDialog extends Modal {
|
||||
super(nls.localize('profilerColumnDialog.profiler', "Profiler"), TelemetryKeys.ModalDialogName.Profiler, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService);
|
||||
}
|
||||
|
||||
public render(): void {
|
||||
public override render(): void {
|
||||
super.render();
|
||||
this._register(attachModalDialogStyler(this, this._themeService));
|
||||
this.addFooterButton(nls.localize('profilerColumnDialog.ok', "OK"), () => this.onAccept(undefined));
|
||||
@@ -337,7 +337,7 @@ export class ProfilerColumnEditorDialog extends Modal {
|
||||
this._updateList();
|
||||
}
|
||||
|
||||
protected onAccept(e?: StandardKeyboardEvent): void {
|
||||
protected override onAccept(e?: StandardKeyboardEvent): void {
|
||||
this._updateInput();
|
||||
super.onAccept(e);
|
||||
}
|
||||
|
||||
@@ -93,11 +93,11 @@ export class ProfilerFilterDialog extends Modal {
|
||||
this._okButton!.focus();
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
this.title = DialogTitle;
|
||||
this.titleIconClassName = TitleIconClass;
|
||||
@@ -137,12 +137,12 @@ export class ProfilerFilterDialog extends Modal {
|
||||
}
|
||||
|
||||
/* espace key */
|
||||
protected onClose() {
|
||||
protected override onClose() {
|
||||
this.hide('close');
|
||||
}
|
||||
|
||||
/* enter key */
|
||||
protected onAccept() {
|
||||
protected override onAccept() {
|
||||
this.handleOkButtonClick();
|
||||
}
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ export default class QueryRunner extends Disposable {
|
||||
this.dispose();
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
public override dispose() {
|
||||
this._batchSets = undefined!;
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { EditorInput } from 'vs/workbench/common/editor';
|
||||
import { IEditorDescriptor, IEditorRegistry, Extensions } from 'vs/workbench/browser/editor';
|
||||
import { EditorExtensions, EditorInput } from 'vs/workbench/common/editor';
|
||||
import { IEditorDescriptor, IEditorRegistry } from 'vs/workbench/browser/editor';
|
||||
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -22,7 +22,7 @@ export class EditorDescriptorService implements IEditorDescriptorService {
|
||||
}
|
||||
|
||||
public getEditor(input: EditorInput): IEditorDescriptor | undefined {
|
||||
return Registry.as<IEditorRegistry>(Extensions.Editors).getEditor(input);
|
||||
return Registry.as<IEditorRegistry>(EditorExtensions.Editors).getEditor(input);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ export class FirewallRuleDialog extends Modal {
|
||||
this.viewModel = this._instantiationService.createInstance(FirewallRuleViewModel);
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
this.backButton!.onDidClick(() => this.cancel());
|
||||
@@ -254,12 +254,12 @@ export class FirewallRuleDialog extends Modal {
|
||||
}
|
||||
|
||||
/* Overwrite esapce key behavior */
|
||||
protected onClose() {
|
||||
protected override onClose() {
|
||||
this.cancel();
|
||||
}
|
||||
|
||||
/* Overwrite enter key behavior */
|
||||
protected onAccept() {
|
||||
protected override onAccept() {
|
||||
this.createFirewallRule();
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ export class RestoreDialog extends Modal {
|
||||
this.viewModel.onUpdateRestoreDatabaseFiles((files) => this.updateRestoreDatabaseFiles(files));
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
let cancelLabel = localize('restoreDialog.cancel', "Cancel");
|
||||
@@ -677,12 +677,12 @@ export class RestoreDialog extends Modal {
|
||||
}
|
||||
|
||||
/* Overwrite esapce key behavior */
|
||||
protected onClose() {
|
||||
protected override onClose() {
|
||||
this.cancel();
|
||||
}
|
||||
|
||||
/* Overwrite enter key behavior */
|
||||
protected onAccept() {
|
||||
protected override onAccept() {
|
||||
this.restore(false);
|
||||
}
|
||||
|
||||
@@ -720,7 +720,7 @@ export class RestoreDialog extends Modal {
|
||||
// Nothing currently laid out statically in this class
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
for (let key in this._optionsMap) {
|
||||
let widget: Widget = this._optionsMap[key];
|
||||
|
||||
@@ -75,7 +75,7 @@ export class ServerGroupDialog extends Modal {
|
||||
super(localize('ServerGroupsDialogTitle', "Server Groups"), TelemetryKeys.ModalDialogName.ServerGroups, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService);
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
const okLabel = localize('serverGroup.ok', "OK");
|
||||
@@ -349,12 +349,12 @@ export class ServerGroupDialog extends Modal {
|
||||
}
|
||||
|
||||
/* Overwrite escape key behavior */
|
||||
protected onClose() {
|
||||
protected override onClose() {
|
||||
this.cancel();
|
||||
}
|
||||
|
||||
/* Overwrite enter key behavior */
|
||||
protected onAccept() {
|
||||
protected override onAccept() {
|
||||
this.addGroup();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user