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

@@ -8,7 +8,8 @@ import { EditDataInput } from 'sql/workbench/browser/editData/editDataInput';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { EditDataResultsEditor } from 'sql/workbench/contrib/editData/browser/editDataResultsEditor';
import { EditDataResultsInput } from 'sql/workbench/browser/editData/editDataResultsInput';
import { EditorDescriptor, IEditorRegistry, Extensions } from 'vs/workbench/browser/editor';
import { EditorDescriptor, IEditorRegistry } from 'vs/workbench/browser/editor';
import { EditorExtensions } from 'vs/workbench/common/editor';
import { IConfigurationRegistry, Extensions as ConfigExtensions } from 'vs/platform/configuration/common/configurationRegistry';
import { Registry } from 'vs/platform/registry/common/platform';
import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
@@ -37,7 +38,7 @@ configurationRegistry.registerConfiguration({
}
});
Registry.as<IEditorRegistry>(Extensions.Editors)
Registry.as<IEditorRegistry>(EditorExtensions.Editors)
.registerEditor(editDataEditorDescriptor, [new SyncDescriptor(EditDataInput)]);
// Editor
@@ -47,7 +48,7 @@ const editDataResultsEditorDescriptor = EditorDescriptor.create(
'EditDataResults'
);
Registry.as<IEditorRegistry>(Extensions.Editors)
Registry.as<IEditorRegistry>(EditorExtensions.Editors)
.registerEditor(editDataResultsEditorDescriptor, [new SyncDescriptor(EditDataResultsInput)]);
// Keybinding for toggling the query pane

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Action, IActionViewItem, IActionRunner } from 'vs/base/common/actions';
import { Action, IActionRunner } from 'vs/base/common/actions';
import { Disposable } from 'vs/base/common/lifecycle';
import { IQueryModelService } from 'sql/workbench/services/query/common/queryModel';
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
@@ -16,6 +16,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
import Severity from 'vs/base/common/severity';
import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
const $ = dom.$;
/**
@@ -32,11 +33,6 @@ export abstract class EditDataAction extends Action {
this.setClass(enabledClass);
}
/**
* This method is executed when the button is clicked.
*/
public abstract run(): Promise<void>;
protected setClass(enabledClass: string): void {
this._classes = [];
@@ -73,7 +69,7 @@ export class RefreshTableAction extends EditDataAction {
this.label = nls.localize('editData.run', "Run");
}
public run(): Promise<void> {
public override run(): Promise<void> {
if (this.isConnected(this.editor)) {
let input = this.editor.editDataInput;
@@ -116,7 +112,7 @@ export class StopRefreshTableAction extends EditDataAction {
this.label = nls.localize('editData.stop', "Stop");
}
public run(): Promise<void> {
public override run(): Promise<void> {
let input = this.editor.editDataInput;
this._queryModelService.disposeEdit(input.uri);
return Promise.resolve(null);
@@ -139,7 +135,7 @@ export class ChangeMaxRowsAction extends EditDataAction {
this.class = ChangeMaxRowsAction.EnabledClass;
}
public run(): Promise<void> {
public override run(): Promise<void> {
return Promise.resolve(null);
}
@@ -249,7 +245,7 @@ export class ShowQueryPaneAction extends EditDataAction {
}
}
public run(): Promise<void> {
public override run(): Promise<void> {
this.editor.toggleQueryPane();
this.updateLabel(this.editor.queryPaneEnabled());
return Promise.resolve(null);

View File

@@ -20,7 +20,7 @@ import { EditDataInput } from 'sql/workbench/browser/editData/editDataInput';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import * as queryContext from 'sql/workbench/contrib/query/common/queryContext';
import { Taskbar, ITaskbarContent } from 'sql/base/browser/ui/taskbar/taskbar';
import { IAction, IActionViewItem } from 'vs/base/common/actions';
import { IAction } from 'vs/base/common/actions';
import { IQueryModelService } from 'sql/workbench/services/query/common/queryModel';
import { IEditorDescriptorService } from 'sql/workbench/services/queryEditor/browser/editorDescriptorService';
import {
@@ -37,6 +37,7 @@ import { CancellationToken } from 'vs/base/common/cancellation';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService';
import { onUnexpectedError } from 'vs/base/common/errors';
import { IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
/**
* Editor that hosts an action bar and a resultSetInput for an edit data session
@@ -113,7 +114,7 @@ export class EditDataEditor extends EditorPane {
* Called to indicate to the editor that the input should be cleared and resources associated with the
* input should be freed.
*/
public clearInput(): void {
public override clearInput(): void {
if (this._resultsEditor) {
this._resultsEditor.clearInput();
}
@@ -134,7 +135,7 @@ export class EditDataEditor extends EditorPane {
this._createTaskbar(parent);
}
public dispose(): void {
public override dispose(): void {
this._disposeEditors();
super.dispose();
}
@@ -142,13 +143,13 @@ export class EditDataEditor extends EditorPane {
/**
* Sets focus on this editor. Specifically, it sets the focus on the hosted text editor.
*/
public focus(): void {
public override focus(): void {
if (this._sqlEditor) {
this._sqlEditor.focus();
}
}
public getControl(): IEditorControl {
public override getControl(): IEditorControl {
if (this._sqlEditor) {
return this._sqlEditor.getControl();
}
@@ -196,7 +197,7 @@ export class EditDataEditor extends EditorPane {
/**
* Sets this editor and the sub-editors to visible.
*/
public setEditorVisible(visible: boolean, group: IEditorGroup): void {
public override setEditorVisible(visible: boolean, group: IEditorGroup): void {
if (this._resultsEditor) {
this._resultsEditor.setVisible(visible, group);
}
@@ -213,7 +214,7 @@ export class EditDataEditor extends EditorPane {
/**
* Sets the input data for this editor.
*/
public setInput(newInput: EditDataInput, options?: EditorOptions, context?: IEditorOpenContext): Promise<void> {
public override setInput(newInput: EditDataInput, options?: EditorOptions, context?: IEditorOpenContext): Promise<void> {
let oldInput = <EditDataInput>this.input;
if (!newInput.setup) {
this._initialized = false;
@@ -301,7 +302,7 @@ export class EditDataEditor extends EditorPane {
}
updateStyles() {
override updateStyles() {
if (this._resultsEditorContainer) {
this._resultsEditorContainer.style.borderTopColor = this.getColor(PANEL_BORDER);
}

View File

@@ -22,7 +22,7 @@ export class EditDataGridActionProvider extends GridActionProvider {
/**
* Return actions given a click on an edit data grid
*/
public getGridActions(): IAction[] {
public override getGridActions(): IAction[] {
let actions: IAction[] = [];
actions.push(new DeleteRowAction(DeleteRowAction.ID, DeleteRowAction.LABEL, this._deleteRowCallback));
actions.push(new RevertRowAction(RevertRowAction.ID, RevertRowAction.LABEL, this._revertRowCallback));
@@ -43,7 +43,7 @@ export class DeleteRowAction extends Action {
super(id, label);
}
public async run(gridInfo: IGridInfo): Promise<void> {
public override async run(gridInfo: IGridInfo): Promise<void> {
this.callback(gridInfo.rowIndex);
}
}
@@ -60,7 +60,7 @@ export class RevertRowAction extends Action {
super(id, label);
}
public async run(gridInfo: IGridInfo): Promise<void> {
public override async run(gridInfo: IGridInfo): Promise<void> {
this.callback();
}
}

View File

@@ -93,13 +93,13 @@ export class EditDataGridPanel extends GridParentComponent {
onRestoreViewState: Event<void>,
@IInstantiationService protected instantiationService: IInstantiationService,
@INotificationService protected notificationService: INotificationService,
@IContextMenuService protected contextMenuService: IContextMenuService,
@IKeybindingService protected keybindingService: IKeybindingService,
@IContextKeyService protected contextKeyService: IContextKeyService,
@IConfigurationService protected configurationService: IConfigurationService,
@IClipboardService protected clipboardService: IClipboardService,
@IQueryEditorService protected queryEditorService: IQueryEditorService,
@ILogService protected logService: ILogService
@IContextMenuService contextMenuService: IContextMenuService,
@IKeybindingService keybindingService: IKeybindingService,
@IContextKeyService contextKeyService: IContextKeyService,
@IConfigurationService configurationService: IConfigurationService,
@IClipboardService clipboardService: IClipboardService,
@IQueryEditorService queryEditorService: IQueryEditorService,
@ILogService logService: ILogService
) {
super(contextMenuService, keybindingService, contextKeyService, configurationService, clipboardService, queryEditorService, logService);
this.nativeElement = document.createElement('div');
@@ -147,7 +147,7 @@ export class EditDataGridPanel extends GridParentComponent {
this.dataService.onLoaded();
}
public render(container: HTMLElement): void {
public override render(container: HTMLElement): void {
container.appendChild(this.nativeElement);
}
@@ -516,7 +516,7 @@ export class EditDataGridPanel extends GridParentComponent {
* Force re-rendering of the results grids. Calling this upon unhide (upon focus) fixes UI
* glitches that occur when a QueryResultsEditor is hidden then unhidden while it is running a query.
*/
refreshDatasets(): void {
override refreshDatasets(): void {
let tempRenderedDataSets = this.renderedDataSets;
this.renderedDataSets = [];
this.handleChanges({

View File

@@ -24,7 +24,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
export class EditDataResultsEditor extends EditorPane {
public static ID: string = 'workbench.editor.editDataResultsEditor';
protected _input: EditDataResultsInput;
protected override _input: EditDataResultsInput;
protected _rawOptions: BareResultsGridInfo;
private styleSheet = DOM.createStyleSheet();
@@ -47,7 +47,7 @@ export class EditDataResultsEditor extends EditorPane {
});
}
public get input(): EditDataResultsInput {
public override get input(): EditDataResultsInput {
return this._input;
}
@@ -55,7 +55,7 @@ export class EditDataResultsEditor extends EditorPane {
parent.appendChild(this.styleSheet);
}
public dispose(): void {
public override dispose(): void {
this.styleSheet = undefined;
super.dispose();
}
@@ -63,7 +63,7 @@ export class EditDataResultsEditor extends EditorPane {
public layout(dimension: DOM.Dimension): void {
}
public setInput(input: EditDataResultsInput, options: EditorOptions, context: IEditorOpenContext): Promise<void> {
public override setInput(input: EditDataResultsInput, options: EditorOptions, context: IEditorOpenContext): Promise<void> {
super.setInput(input, options, context, CancellationToken.None);
this._applySettings();
if (!input.hasBootstrapped) {

View File

@@ -74,7 +74,7 @@ class SaveResultAction extends Action {
super(id, label);
}
public async run(gridInfo: IGridInfo): Promise<void> {
public override async run(gridInfo: IGridInfo): Promise<void> {
this.dataService.sendSaveRequest({
batchIndex: gridInfo.batchIndex,
resultSetNumber: gridInfo.resultSetNumber,
@@ -100,7 +100,7 @@ class CopyResultAction extends Action {
super(id, label);
}
public async run(gridInfo: IGridInfo): Promise<void> {
public override async run(gridInfo: IGridInfo): Promise<void> {
this.dataService.copyResults(gridInfo.selection, gridInfo.batchIndex, gridInfo.resultSetNumber, this.copyHeader);
}
}
@@ -117,7 +117,7 @@ class SelectAllGridAction extends Action {
super(id, label);
}
public async run(gridInfo: IGridInfo): Promise<void> {
public override async run(gridInfo: IGridInfo): Promise<void> {
this.selectAllCallback(gridInfo.gridIndex);
}
}