Merge from vscode 7eaf220cafb9d9e901370ffce02229171cbf3ea6

This commit is contained in:
ADS Merger
2020-09-03 02:34:56 +00:00
committed by Anthony Dresser
parent 39d9eed585
commit a63578e6f7
519 changed files with 14338 additions and 6670 deletions

View File

@@ -7,8 +7,8 @@ import 'vs/css!./media/queryEditor';
import * as DOM from 'vs/base/browser/dom';
import * as path from 'vs/base/common/path';
import { EditorOptions, IEditorControl, IEditorMemento } from 'vs/workbench/common/editor';
import { BaseEditor, EditorMemento } from 'vs/workbench/browser/parts/editor/baseEditor';
import { EditorOptions, IEditorControl, IEditorMemento, IEditorOpenContext } from 'vs/workbench/common/editor';
import { EditorPane, EditorMemento } from 'vs/workbench/browser/parts/editor/editorPane';
import { Orientation } from 'vs/base/browser/ui/sash/sash';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IThemeService } from 'vs/platform/theme/common/themeService';
@@ -50,7 +50,7 @@ interface IQueryEditorViewState {
* Editor that hosts 2 sub-editors: A TextResourceEditor for SQL file editing, and a QueryResultsEditor
* for viewing and editing query results. This editor is based off SideBySideEditor.
*/
export class QueryEditor extends BaseEditor {
export class QueryEditor extends EditorPane {
public static ID: string = 'workbench.editor.queryEditor';
@@ -320,7 +320,7 @@ export class QueryEditor extends BaseEditor {
this.taskbar.setContent(content);
}
public async setInput(newInput: QueryEditorInput, options: EditorOptions, token: CancellationToken): Promise<void> {
public async setInput(newInput: QueryEditorInput, options: EditorOptions, context: IEditorOpenContext, token: CancellationToken): Promise<void> {
const oldInput = this.input;
if (newInput.matches(oldInput)) {
@@ -350,9 +350,9 @@ export class QueryEditor extends BaseEditor {
}
await Promise.all([
super.setInput(newInput, options, token),
this.currentTextEditor.setInput(newInput.text, options, token),
this.resultsEditor.setInput(newInput.results, options)
super.setInput(newInput, options, context, token),
this.currentTextEditor.setInput(newInput.text, options, context, token),
this.resultsEditor.setInput(newInput.results, options, context)
]);
this.inputDisposables.clear();

View File

@@ -3,10 +3,10 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { EditorOptions } from 'vs/workbench/common/editor';
import { EditorOptions, IEditorOpenContext } from 'vs/workbench/common/editor';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { RawContextKey } from 'vs/platform/contextkey/common/contextkey';
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
import { EditorPane } from 'vs/workbench/browser/parts/editor/editorPane';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { BareFontInfo } from 'vs/editor/common/config/fontInfo';
import { getZoomLevel } from 'vs/base/browser/browser';
@@ -71,7 +71,7 @@ export function getBareResultsGridInfoStyles(info: BareResultsGridInfo): string
/**
* Editor associated with viewing and editing the data of a query results grid.
*/
export class QueryResultsEditor extends BaseEditor {
export class QueryResultsEditor extends EditorPane {
public static ID: string = 'workbench.editor.queryResultsEditor';
protected _rawOptions: BareResultsGridInfo;
@@ -131,8 +131,8 @@ export class QueryResultsEditor extends BaseEditor {
this.resultsView.layout(dimension);
}
setInput(input: QueryResultsInput, options: EditorOptions): Promise<void> {
super.setInput(input, options, CancellationToken.None);
setInput(input: QueryResultsInput, options: EditorOptions, context: IEditorOpenContext): Promise<void> {
super.setInput(input, options, context, CancellationToken.None);
this.resultsView.input = input;
return Promise.resolve<void>(null);
}