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:
Charles Gagnon
2021-06-17 08:17:11 -07:00
committed by GitHub
parent fdcb97c7f7
commit 3cb2f552a6
2582 changed files with 124827 additions and 87099 deletions

View File

@@ -38,12 +38,12 @@ export class ConnectionViewletPanel extends ViewPane {
@IObjectExplorerService private readonly objectExplorerService: IObjectExplorerService,
@IContextKeyService contextKeyService: IContextKeyService,
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
@IOpenerService protected openerService: IOpenerService,
@IThemeService protected themeService: IThemeService,
@IOpenerService openerService: IOpenerService,
@IThemeService themeService: IThemeService,
@ILogService private readonly logService: ILogService,
@ITelemetryService telemetryService: ITelemetryService,
) {
super({ ...(options as IViewPaneOptions) }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, opener, themeService, telemetryService);
super({ ...(options as IViewPaneOptions) }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
this._serverTreeView = this.objectExplorerService.getServerTreeView() as ServerTreeView;
if (!this._serverTreeView) {
this._serverTreeView = this.instantiationService.createInstance(ServerTreeView);
@@ -51,15 +51,15 @@ export class ConnectionViewletPanel extends ViewPane {
}
}
protected renderHeader(container: HTMLElement): void {
protected override renderHeader(container: HTMLElement): void {
super.renderHeader(container);
}
renderHeaderTitle(container: HTMLElement): void {
override renderHeaderTitle(container: HTMLElement): void {
super.renderHeaderTitle(container, this.options.title);
}
renderBody(container: HTMLElement): void {
override renderBody(container: HTMLElement): void {
const viewletContainer = DOM.append(container, DOM.$('div.server-explorer-viewlet'));
const viewContainer = DOM.append(viewletContainer, DOM.$('div.object-explorer-view'));
this._serverTreeView.renderBody(viewContainer).then(undefined, error => {
@@ -72,7 +72,7 @@ export class ConnectionViewletPanel extends ViewPane {
return this._serverTreeView.tree;
}
layoutBody(size: number): void {
override layoutBody(size: number): void {
this._serverTreeView.layout(size);
DOM.toggleClass(this._root!, 'narrow', this._root!.clientWidth < 300);
}
@@ -111,11 +111,11 @@ export class ConnectionViewletPanel extends ViewPane {
}
}
dispose(): void {
override dispose(): void {
super.dispose();
}
focus(): void {
override focus(): void {
super.focus();
this._serverTreeView.tree.domFocus();
}

View File

@@ -25,7 +25,6 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { ViewPane } from 'vs/workbench/browser/parts/views/viewPane';
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { Viewlet } from 'vs/workbench/browser/viewlet';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { SqlIconId } from 'sql/base/common/codicons';
@@ -55,22 +54,6 @@ export class DataExplorerViewletViewsContribution implements IWorkbenchContribut
}
}
export class DataExplorerViewlet extends Viewlet {
constructor(
@ITelemetryService telemetryService: ITelemetryService,
@IStorageService protected storageService: IStorageService,
@IInstantiationService protected instantiationService: IInstantiationService,
@IThemeService themeService: IThemeService,
@IContextMenuService protected contextMenuService: IContextMenuService,
@IExtensionService protected extensionService: IExtensionService,
@IWorkspaceContextService protected contextService: IWorkspaceContextService,
@IWorkbenchLayoutService protected layoutService: IWorkbenchLayoutService,
@IConfigurationService protected configurationService: IConfigurationService
) {
super(VIEWLET_ID, instantiationService.createInstance(DataExplorerViewPaneContainer), telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService, layoutService, configurationService);
}
}
export class DataExplorerViewPaneContainer extends ViewPaneContainer {
private root?: HTMLElement;
@@ -91,26 +74,22 @@ export class DataExplorerViewPaneContainer extends ViewPaneContainer {
super(VIEWLET_ID, { mergeViewWithContainerWhenSingleView: true }, instantiationService, configurationService, layoutService, contextMenuService, telemetryService, extensionService, themeService, storageService, contextService, viewDescriptorService);
}
create(parent: HTMLElement): void {
override create(parent: HTMLElement): void {
this.root = parent;
super.create(parent);
parent.classList.add('dataExplorer-viewlet');
}
public updateStyles(): void {
super.updateStyles();
override focus(): void {
}
focus(): void {
}
layout(dimension: Dimension): void {
override layout(dimension: Dimension): void {
toggleClass(this.root!, 'narrow', dimension.width <= 300);
super.layout(new Dimension(dimension.width, dimension.height));
}
getOptimalWidth(): number {
override getOptimalWidth(): number {
return 400;
}
@@ -126,7 +105,7 @@ export class DataExplorerViewPaneContainer extends ViewPaneContainer {
return actions;
}
protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): ViewPane {
protected override createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): ViewPane {
let viewletPanel = this.instantiationService.createInstance(viewDescriptor.ctorDescriptor.ctor, options) as ViewPane;
this._register(viewletPanel);
return viewletPanel;

View File

@@ -7,16 +7,20 @@ import * as assert from 'assert';
import * as Platform from 'vs/platform/registry/common/platform';
import { ViewletDescriptor, Extensions, Viewlet, ViewletRegistry } from 'vs/workbench/browser/viewlet';
import * as Types from 'vs/base/common/types';
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
suite('Data Explorer Viewlet', () => {
class DataExplorerTestViewlet extends Viewlet {
constructor() {
super('dataExplorer', undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
super('dataExplorer', undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
}
public layout(dimension: any): void {
public override layout(dimension: any): void {
throw new Error('Method not implemented.');
}
protected createViewPaneContainer(parent: HTMLElement): ViewPaneContainer {
throw new Error('Method not implemented.');
}
}