Merge from vscode cfc1ab4c5f816765b91fb7ead3c3427a7c8581a3

This commit is contained in:
ADS Merger
2020-03-11 04:19:23 +00:00
parent 16fab722d5
commit 4c3e48773d
880 changed files with 20441 additions and 11232 deletions

View File

@@ -30,10 +30,10 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { ISelectOptionItem } from 'vs/base/browser/ui/selectBox/selectBox';
import { KeyCode } from 'vs/base/common/keyCodes';
import { ITheme } from 'vs/platform/theme/common/themeService';
import { AngularDisposable } from 'sql/base/browser/lifecycle';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
import { fileFiltersSet } from 'sql/workbench/services/restore/common/constants';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
export const BACKUP_SELECTOR: string = 'backup-component';
@@ -349,7 +349,7 @@ export class BackupComponent extends AngularDisposable {
this.mediaDescriptionBox.disable();
this.registerListeners();
this.updateTheme(this.themeService.getTheme());
this.updateTheme(this.themeService.getColorTheme());
}
ngAfterViewInit() {
@@ -552,7 +552,7 @@ export class BackupComponent extends AngularDisposable {
}
// Update theming that is specific to backup dialog
private updateTheme(theme: ITheme): void {
private updateTheme(theme: IColorTheme): void {
// set modal footer style
let footerHtmlElement: HTMLElement = <HTMLElement>this.modalFooterElement.nativeElement;
const backgroundColor = theme.getColor(SIDE_BAR_BACKGROUND);

View File

@@ -16,10 +16,10 @@ import { bootstrapAngular } from 'sql/workbench/services/bootstrap/browser/boots
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { append, $ } from 'vs/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { attachModalDialogStyler } from 'sql/workbench/common/styler';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
export class BackupDialog extends Modal {
private _body: HTMLElement;
@@ -28,7 +28,7 @@ export class BackupDialog extends Modal {
constructor(
@IThemeService themeService: IThemeService,
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@ILayoutService layoutService: ILayoutService,
@IAdsTelemetryService telemetryService: IAdsTelemetryService,
@IContextKeyService contextKeyService: IContextKeyService,
@IInstantiationService private _instantiationService: IInstantiationService,

View File

@@ -9,7 +9,7 @@ import { mixin } from 'sql/base/common/objects';
import { localize } from 'vs/nls';
import * as colors from 'vs/platform/theme/common/colorRegistry';
import { editorLineNumbers } from 'vs/editor/common/view/editorColorRegistry';
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeService';
import { IInsight, IPointDataSet, customMixin } from './interfaces';
import { IInsightOptions, DataDirection, ChartType, LegendPosition, DataType } from 'sql/workbench/contrib/charts/common/interfaces';
@@ -53,14 +53,14 @@ export class Graph implements IInsight {
public static readonly types = [ChartType.Bar, ChartType.Doughnut, ChartType.HorizontalBar, ChartType.Line, ChartType.Pie, ChartType.Scatter, ChartType.TimeSeries];
public readonly types = Graph.types;
private _theme: ITheme;
private _theme: IColorTheme;
constructor(
container: HTMLElement, options: IInsightOptions = defaultOptions,
@IThemeService themeService: IThemeService
) {
this._theme = themeService.getTheme();
themeService.onThemeChange(e => {
this._theme = themeService.getColorTheme();
themeService.onDidColorThemeChange(e => {
this._theme = e;
this.data = this._data;
});

View File

@@ -26,7 +26,7 @@ import { WebviewWidget } from 'sql/workbench/contrib/dashboard/browser/widgets/w
import { CommonServiceInterface } from 'sql/workbench/services/bootstrap/browser/commonServiceInterface.service';
import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import * as colors from 'vs/platform/theme/common/colorRegistry';
import * as themeColors from 'vs/workbench/common/theme';
import { Action, IAction } from 'vs/base/common/actions';
@@ -37,6 +37,7 @@ import { generateUuid } from 'vs/base/common/uuid';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ILogService } from 'vs/platform/log/common/log';
import { values } from 'vs/base/common/collections';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
const componentMap: { [x: string]: Type<IDashboardWidget> } = {
'properties-widget': PropertiesWidgetComponent,

View File

@@ -98,7 +98,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
this._onMessageDisposable.dispose();
}
this._webview = this.webviewService.createWebview(this.id,
this._webview = this.webviewService.createWebviewElement(this.id,
{},
{
allowScripts: true

View File

@@ -5,14 +5,14 @@
import 'vs/css!./dashboardPanel';
import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import { registerThemingParticipant, IColorTheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import {
TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_FOREGROUND, TAB_ACTIVE_BORDER, TAB_INACTIVE_BACKGROUND,
TAB_INACTIVE_FOREGROUND, EDITOR_GROUP_HEADER_TABS_BACKGROUND, TAB_BORDER, EDITOR_GROUP_BORDER
} from 'vs/workbench/common/theme';
import { activeContrastBorder } from 'vs/platform/theme/common/colorRegistry';
registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) => {
// Title Active
const tabActiveBackground = theme.getColor(TAB_ACTIVE_BACKGROUND);
@@ -112,4 +112,4 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
}
`);
}
});
});

View File

@@ -15,10 +15,11 @@ import { RefreshWidgetAction, EditDashboardAction } from 'sql/workbench/contrib/
import { DashboardPage } from 'sql/workbench/contrib/dashboard/browser/core/dashboardPage.component';
import { AngularDisposable } from 'sql/base/browser/lifecycle';
import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IDisposable } from 'vs/base/common/lifecycle';
import * as themeColors from 'vs/workbench/common/theme';
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
import { onUnexpectedError } from 'vs/base/common/errors';
export const DASHBOARD_SELECTOR: string = 'dashboard-component';

View File

@@ -15,7 +15,7 @@ import * as colors from 'vs/platform/theme/common/colorRegistry';
import * as types from 'vs/base/common/types';
import { Disposable } from 'vs/base/common/lifecycle';
import * as nls from 'vs/nls';
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeService';
import { IPointDataSet } from 'sql/workbench/contrib/charts/browser/interfaces';
import { IInsightsView, IInsightData } from 'sql/platform/dashboard/browser/insightRegistry';
import { ChartType, LegendPosition } from 'sql/workbench/contrib/charts/common/interfaces';
@@ -61,8 +61,8 @@ export abstract class ChartInsight extends Disposable implements IInsightsView {
}
init() {
this._register(this.themeService.onThemeChange(e => this.updateTheme(e)));
this.updateTheme(this.themeService.getTheme());
this._register(this.themeService.onDidColorThemeChange(e => this.updateTheme(e)));
this.updateTheme(this.themeService.getColorTheme());
// Note: must use a boolean to not render the canvas until all properties such as the labels and chart type are set.
// This is because chart.js doesn't auto-update anything other than dataset when re-rendering so defaults are used
// hence it's easier to not render until ready
@@ -96,7 +96,7 @@ export abstract class ChartInsight extends Disposable implements IInsightsView {
return this._options;
}
protected updateTheme(e: ITheme): void {
protected updateTheme(e: IColorTheme): void {
const foregroundColor = e.getColor(colors.editorForeground);
const foreground = foregroundColor ? foregroundColor.toString() : null;
const backgroundColor = e.getColor(colors.editorBackground);

View File

@@ -10,7 +10,7 @@ import { IChartConfig } from 'sql/workbench/contrib/dashboard/browser/widgets/in
import * as colors from 'vs/platform/theme/common/colorRegistry';
import { editorLineNumbers } from 'vs/editor/common/view/editorColorRegistry';
import { ChangeDetectorRef, Inject, forwardRef } from '@angular/core';
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeService';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { customMixin } from 'sql/workbench/contrib/charts/browser/interfaces';
import { ChartType } from 'sql/workbench/contrib/charts/common/interfaces';
@@ -127,7 +127,7 @@ export default class BarChart extends ChartInsight {
super.setConfig(config);
}
protected updateTheme(e: ITheme): void {
protected updateTheme(e: IColorTheme): void {
super.updateTheme(e);
const foregroundColor = e.getColor(colors.editorForeground);
const foreground = foregroundColor ? foregroundColor.toString() : null;

View File

@@ -17,7 +17,7 @@ import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
/* VS imports */
import * as themeColors from 'vs/workbench/common/theme';
import * as colors from 'vs/platform/theme/common/colorRegistry';
import { registerThemingParticipant, ICssStyleCollector, ITheme } from 'vs/platform/theme/common/themeService';
import { registerThemingParticipant, ICssStyleCollector, IColorTheme } from 'vs/platform/theme/common/themeService';
import * as types from 'vs/base/common/types';
import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement';
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
@@ -149,7 +149,7 @@ export class TasksWidget extends DashboardWidget implements IDashboardWidget, On
return tile;
}
private registerThemeing(theme: ITheme, collector: ICssStyleCollector) {
private registerThemeing(theme: IColorTheme, collector: ICssStyleCollector) {
const contrastBorder = theme.getColor(colors.contrastBorder);
const sideBarColor = theme.getColor(themeColors.SIDE_BAR_BACKGROUND);
if (contrastBorder) {

View File

@@ -97,7 +97,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
this._onMessageDisposable.dispose();
}
this._webview = this.webviewService.createWebview(this.id,
this._webview = this.webviewService.createWebviewElement(this.id,
{},
{
allowScripts: true,

View File

@@ -50,7 +50,7 @@ export class ConnectionViewletPanel extends ViewPane {
@ILogService private readonly logService: ILogService,
@ITelemetryService telemetryService: ITelemetryService,
) {
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: options.title }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, opener, themeService, telemetryService);
super({ ...(options as IViewPaneOptions) }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, opener, themeService, telemetryService);
this._addServerAction = this.instantiationService.createInstance(AddServerAction,
AddServerAction.ID,
AddServerAction.LABEL);

View File

@@ -14,7 +14,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { coalesce } from 'vs/base/common/arrays';
import { CustomTreeViewPanel, CustomTreeView } from 'sql/workbench/browser/parts/views/customView';
import { CustomTreeViewPane, CustomTreeView } from 'sql/workbench/browser/parts/views/customView';
import { VIEWLET_ID } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
@@ -106,7 +106,7 @@ export class DataExplorerContainerExtensionHandler implements IWorkbenchContribu
const viewDescriptor = <ITreeViewDescriptor>{
id: item.id,
name: item.name,
ctorDescriptor: new SyncDescriptor(CustomTreeViewPanel),
ctorDescriptor: new SyncDescriptor(CustomTreeViewPane),
when: ContextKeyExpr.deserialize(item.when),
canToggleVisibility: true,
collapsed: this.showCollapsed(container),

View File

@@ -7,7 +7,7 @@ import * as strings from 'vs/base/common/strings';
import * as DOM from 'vs/base/browser/dom';
import * as nls from 'vs/nls';
import { EditorOptions, EditorInput, IEditorControl, IEditor } from 'vs/workbench/common/editor';
import { EditorOptions, EditorInput, IEditorControl, IEditorPane } from 'vs/workbench/common/editor';
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
@@ -522,7 +522,7 @@ export class EditDataEditor extends BaseEditor {
this._createEditor(<UntitledTextEditorInput>newInput.sql, this._sqlEditorContainer)
]);
};
onEditorsCreated = (result: IEditor[]) => {
onEditorsCreated = (result: IEditorPane[]) => {
return Promise.all([
this._onResultsEditorCreated(<EditDataResultsEditor>result[0], newInput.results, options),
this._onSqlEditorCreated(<TextResourceEditor>result[1], newInput.sql, options)
@@ -583,7 +583,7 @@ export class EditDataEditor extends BaseEditor {
this._createEditor(<EditDataResultsInput>input.results, this._resultsEditorContainer)
.then(async result => {
await this._onResultsEditorCreated(<EditDataResultsEditor>result, input.results, this.options);
await this._onResultsEditorCreated(<EditDataResultsEditor>result, input.results, this._options);
this.resultsEditorVisibility = true;
this.hideQueryResultsView = false;
this._doLayout(true);
@@ -630,7 +630,7 @@ export class EditDataEditor extends BaseEditor {
let visible = currentEditorIsVisible;
if (!currentEditorIsVisible) {
// Current editor is closing but still tracked as visible. Check if any other editor is visible
const candidates = [...this._editorService.visibleControls].filter(e => {
const candidates = [...this._editorService.visibleEditorPanes].filter(e => {
if (e && e.getId) {
return e.getId() === EditDataEditor.ID;
}

View File

@@ -13,7 +13,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
function runActionOnActiveResultsEditor(accessor: ServicesAccessor, eventName: string): void {
let editorService = accessor.get(IEditorService);
const candidates = [editorService.activeControl, ...editorService.visibleControls].filter(e => {
const candidates = [editorService.activeEditorPane, ...editorService.visibleEditorPanes].filter(e => {
if (e) {
let id = e.getId();
if (id === QueryEditor.ID || id === EditDataEditor.ID) {

View File

@@ -197,6 +197,7 @@ class MockEditorService extends TestEditorService {
class TestModeService implements IModeService {
_serviceBrand: undefined;
onDidCreateMode: Event<IMode>;
onLanguagesMaybeChanged: Event<void>;
isRegisteredMode(mimetypeOrModeId: string): boolean {
throw new Error('Method not implemented.');

View File

@@ -27,12 +27,13 @@ import { IAction } from 'vs/base/common/actions';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IDashboardService } from 'sql/platform/dashboard/browser/dashboardService';
import { escape } from 'sql/base/common/strings';
import { IWorkbenchThemeService, IColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { tableBackground, cellBackground, cellBorderColor } from 'sql/platform/theme/common/colors';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
import { attachButtonStyler } from 'sql/platform/theme/common/styler';
import { find, fill } from 'vs/base/common/arrays';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
import { onUnexpectedError } from 'vs/base/common/errors';
export const JOBSVIEW_SELECTOR: string = 'jobsview-component';

View File

@@ -27,7 +27,7 @@ import { IAction } from 'vs/base/common/actions';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IDashboardService } from 'sql/platform/dashboard/browser/dashboardService';
import { escape } from 'sql/base/common/strings';
import { IWorkbenchThemeService, IColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { tableBackground, cellBackground, cellBorderColor } from 'sql/platform/theme/common/colors';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
@@ -35,6 +35,7 @@ import { attachButtonStyler } from 'sql/platform/theme/common/styler';
import { Taskbar } from 'sql/base/browser/ui/taskbar/taskbar';
import { find, fill } from 'vs/base/common/arrays';
import { onUnexpectedError } from 'vs/base/common/errors';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
export const NOTEBOOKSVIEW_SELECTOR: string = 'notebooksview-component';

View File

@@ -67,7 +67,7 @@ export default class WebViewComponent extends ComponentBase implements IComponen
}
private _createWebview(): void {
this._webview = this.webviewService.createWebview(this.id,
this._webview = this.webviewService.createWebviewElement(this.id,
{},
{
allowScripts: true

View File

@@ -13,7 +13,7 @@ import { Taskbar } from 'sql/base/browser/ui/taskbar/taskbar';
import { RunCellAction, CellContext } from 'sql/workbench/contrib/notebook/browser/cellViews/codeActions';
import { NotebookModel } from 'sql/workbench/services/notebook/browser/models/notebookModel';
import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import * as themeColors from 'vs/workbench/common/theme';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ITextModel } from 'vs/editor/common/model';
@@ -36,6 +36,7 @@ import { IEditorProgressService } from 'vs/platform/progress/common/progress';
import { SimpleProgressIndicator } from 'sql/workbench/services/progress/browser/simpleProgressIndicator';
import { notebookConstants } from 'sql/workbench/services/notebook/browser/interfaces';
import { tryMatchCellMagic } from 'sql/workbench/services/notebook/browser/utils';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
export const CODE_SELECTOR: string = 'code-component';
const MARKDOWN_CLASS = 'markdown';

View File

@@ -10,7 +10,7 @@ import { Event } from 'vs/base/common/event';
import { nb } from 'azdata';
import { ICellModel } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
import * as outputProcessor from 'sql/workbench/contrib/notebook/browser/models/outputProcessor';
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeService';
import * as DOM from 'vs/base/browser/dom';
import { ComponentHostDirective } from 'sql/base/browser/componentHost.directive';
import { Extensions, IMimeComponent, IMimeComponentRegistry } from 'sql/workbench/contrib/notebook/browser/outputs/mimeRegistry';
@@ -53,7 +53,7 @@ export class OutputComponent extends CellView implements OnInit, AfterViewInit {
}
ngOnInit() {
this._register(this._themeService.onThemeChange(event => this.updateTheme(event)));
this._register(this._themeService.onDidColorThemeChange(event => this.updateTheme(event)));
this.loadComponent();
this.layout();
this._initialized = true;
@@ -62,7 +62,7 @@ export class OutputComponent extends CellView implements OnInit, AfterViewInit {
}
ngAfterViewInit() {
this.updateTheme(this._themeService.getTheme());
this.updateTheme(this._themeService.getColorTheme());
}
ngOnChanges(changes: { [propKey: string]: SimpleChange }) {
@@ -128,7 +128,7 @@ export class OutputComponent extends CellView implements OnInit, AfterViewInit {
public hasError(): boolean {
return !types.isUndefinedOrNull(this.errorText);
}
private updateTheme(theme: ITheme): void {
private updateTheme(theme: IColorTheme): void {
let el = <HTMLElement>this._ref.nativeElement;
let backgroundColor = theme.getColor(colors.editorBackground, true);
let foregroundColor = theme.getColor(themeColors.SIDE_BAR_FOREGROUND, true);

View File

@@ -8,8 +8,9 @@ import { OnInit, Component, Input, Inject, ElementRef, ViewChild, forwardRef, Ch
import { AngularDisposable } from 'sql/base/browser/lifecycle';
import { ICellModel } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
import * as themeColors from 'vs/workbench/common/theme';
import { IWorkbenchThemeService, IColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { URI } from 'vs/base/common/uri';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
export const OUTPUT_AREA_SELECTOR: string = 'output-area-component';

View File

@@ -9,7 +9,7 @@ import 'vs/css!./media/highlight';
import { OnInit, Component, Input, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, OnChanges, SimpleChange, HostListener, ViewChildren, QueryList } from '@angular/core';
import { localize } from 'vs/nls';
import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import * as themeColors from 'vs/workbench/common/theme';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { Emitter } from 'vs/base/common/event';
@@ -27,6 +27,7 @@ import { CellToggleMoreActions } from 'sql/workbench/contrib/notebook/browser/ce
import { CodeComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/code.component';
import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor';
import { NotebookRange } from 'sql/workbench/services/notebook/browser/notebookService';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
export const TEXT_SELECTOR: string = 'text-cell-component';
const USER_SELECT_CLASS = 'actionselect';

View File

@@ -231,7 +231,7 @@ export abstract class NotebookInput extends EditorInput {
return this._textInput;
}
public revert(group: GroupIdentifier, options?: IRevertOptions): Promise<boolean> {
public revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void> {
return this._textInput.revert(group, options);
}

View File

@@ -6,7 +6,7 @@
import { nb } from 'azdata';
import { OnInit, Component, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, OnDestroy, ViewChildren, QueryList } from '@angular/core';
import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import * as themeColors from 'vs/workbench/common/theme';
import { INotificationService, INotification } from 'vs/platform/notification/common/notification';
import { localize } from 'vs/nls';
@@ -54,6 +54,7 @@ import { find, firstIndex } from 'vs/base/common/arrays';
import { CodeCellComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/codeCell.component';
import { TextCellComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/textCell.component';
import { NotebookInput } from 'sql/workbench/contrib/notebook/browser/models/notebookInput';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
import { ICommandService } from 'vs/platform/commands/common/commands';
@@ -260,7 +261,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
});
this.notificationService.error(errorWithAction);
let editors = this.editorService.visibleControls;
let editors = this.editorService.visibleEditorPanes;
for (let editor of editors) {
if (editor && editor.input.resource === this._notebookParams.input.notebookUri) {
await editor.group.closeEditor(this._notebookParams.input as NotebookInput, { preserveFocus: true }); // sketchy

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./notebook';
import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import { registerThemingParticipant, IColorTheme, 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, buttonForeground, editorBackground, lighten } from 'vs/platform/theme/common/colorRegistry';
import { editorLineHighlight, editorLineHighlightBorder } from 'vs/editor/common/view/editorColorRegistry';
@@ -15,7 +15,7 @@ import { getZoomLevel } from 'vs/base/browser/browser';
import * as types from 'vs/base/common/types';
export function registerNotebookThemes(overrideEditorThemeSetting: boolean, configurationService: IConfigurationService): IDisposable {
return registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
return registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) => {
let lightBoxShadow = '0px 4px 6px 0px rgba(0, 0, 0, 0.14)';
let darkBoxShadow = '0px 4px 6px 0px rgba(0, 0, 0, 1)';

View File

@@ -660,7 +660,7 @@ export class NotebookIntervalNode {
abstract class SettingsCommand extends Command {
protected getNotebookEditor(accessor: ServicesAccessor): NotebookEditor {
const activeEditor = accessor.get(IEditorService).activeControl;
const activeEditor = accessor.get(IEditorService).activeEditorPane;
if (activeEditor instanceof NotebookEditor) {
return activeEditor;
}

View File

@@ -21,7 +21,7 @@ import { IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference
import { FIND_IDS, CONTEXT_FIND_INPUT_FOCUSED } from 'vs/editor/contrib/find/findModel';
import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/findState';
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService';
import { IColorTheme, IThemeService } from 'vs/platform/theme/common/themeService';
import * as colors from 'vs/platform/theme/common/colorRegistry';
import { IEditorAction } from 'vs/editor/common/editorCommon';
import { IDisposable } from 'vs/base/common/lifecycle';
@@ -159,8 +159,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
this._notebookController.addOverlayWidget(this);
this._applyTheme(themeService.getTheme());
this._register(themeService.onThemeChange(this._applyTheme.bind(this)));
this._applyTheme(themeService.getColorTheme());
this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));
this.onkeyup(this._domNode, e => {
if (e.equals(KeyCode.Escape)) {
@@ -299,7 +299,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
}
}
private _applyTheme(theme: ITheme) {
private _applyTheme(theme: IColorTheme) {
let inputStyles: IFindInputStyles = {
inputActiveOptionBorder: theme.getColor(colors.inputActiveOptionBorder),
inputBackground: theme.getColor(colors.inputBackground),

View File

@@ -28,7 +28,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel';
import { TextFileEditorModelManager } from 'vs/workbench/services/textfile/common/textFileEditorModelManager';
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
import { TestEnvironmentService, TestLifecycleService, TestStorageService, TestTextFileService, workbenchInstantiationService, TestTextResourcePropertiesService } from 'vs/workbench/test/browser/workbenchTestServices';
import { TestEnvironmentService, TestLifecycleService, TestTextFileService, workbenchInstantiationService } from 'vs/workbench/test/browser/workbenchTestServices';
import { Range } from 'vs/editor/common/core/range';
import { nb } from 'azdata';
import { Emitter } from 'vs/base/common/event';
@@ -38,6 +38,7 @@ import { startsWith } from 'vs/base/common/strings';
import { assign } from 'vs/base/common/objects';
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { TestStorageService, TestTextResourcePropertiesService } from 'vs/workbench/test/common/workbenchTestServices';
class ServiceAccessor {

View File

@@ -25,7 +25,7 @@ import { TestCapabilitiesService } from 'sql/platform/capabilities/test/common/t
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
import { ClientSession } from 'sql/workbench/services/notebook/browser/models/clientSession';
import { TestStorageService } from 'vs/workbench/test/browser/workbenchTestServices';
import { TestStorageService } from 'vs/workbench/test/common/workbenchTestServices';
import { NotebookEditorContentManager } from 'sql/workbench/contrib/notebook/browser/models/notebookInput';
import { NotebookRange } from 'sql/workbench/services/notebook/browser/notebookService';
import { NotebookMarkdownRenderer } from 'sql/workbench/contrib/notebook/browser/outputs/notebookMarkdown';

View File

@@ -22,7 +22,7 @@ import { Memento } from 'vs/workbench/common/memento';
import { Emitter } from 'vs/base/common/event';
import { TestCapabilitiesService } from 'sql/platform/capabilities/test/common/testCapabilitiesService';
import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService';
import { TestStorageService } from 'vs/workbench/test/browser/workbenchTestServices';
import { TestStorageService } from 'vs/workbench/test/common/workbenchTestServices';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';

View File

@@ -33,6 +33,7 @@ import { $ } from 'vs/base/browser/dom';
import { OEManageConnectionAction } from 'sql/workbench/contrib/dashboard/browser/dashboardActions';
import { IViewsService, IView } from 'vs/workbench/common/views';
import { ConsoleLogService } from 'vs/platform/log/common/log';
import { IProgressIndicator } from 'vs/platform/progress/common/progress';
suite('SQL Connection Tree Action tests', () => {
let errorMessageService: TypeMoq.Mock<TestErrorMessageService>;
@@ -109,6 +110,9 @@ suite('SQL Connection Tree Action tests', () => {
});
const viewsService = new class implements IViewsService {
getProgressIndicator(id: string): IProgressIndicator {
throw new Error('Method not implemented.');
}
getActiveViewWithId<T extends IView>(id: string): T | null {
throw new Error('Method not implemented.');
}

View File

@@ -83,7 +83,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
let profilerService: IProfilerService = accessor.get(IProfilerService);
let editorService: IEditorService = accessor.get(IEditorService);
let activeEditor = editorService.activeControl;
let activeEditor = editorService.activeEditorPane;
if (activeEditor instanceof ProfilerEditor) {
let profilerInput = activeEditor.input;
if (profilerInput.state.isRunning) {

View File

@@ -297,13 +297,13 @@ export class ProfilerEditor extends BaseEditor {
profilerTableContainer.style.height = '100%';
profilerTableContainer.style.overflow = 'hidden';
profilerTableContainer.style.position = 'relative';
let theme = this.themeService.getTheme();
let theme = this.themeService.getColorTheme();
if (theme.type === DARK) {
DOM.addClass(profilerTableContainer, VS_DARK_THEME);
} else if (theme.type === HIGH_CONTRAST) {
DOM.addClass(profilerTableContainer, VS_HC_THEME);
}
this.themeService.onThemeChange(e => {
this.themeService.onDidColorThemeChange(e => {
DOM.removeClasses(profilerTableContainer, VS_DARK_THEME, VS_HC_THEME);
if (e.type === DARK) {
DOM.addClass(profilerTableContainer, VS_DARK_THEME);
@@ -623,7 +623,7 @@ export class ProfilerEditor extends BaseEditor {
abstract class SettingsCommand extends Command {
protected getProfilerEditor(accessor: ServicesAccessor): ProfilerEditor {
const activeEditor = accessor.get(IEditorService).activeControl;
const activeEditor = accessor.get(IEditorService).activeEditorPane;
if (activeEditor instanceof ProfilerEditor) {
return activeEditor;
}

View File

@@ -21,7 +21,7 @@ import { IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference
import { FIND_IDS, CONTEXT_FIND_INPUT_FOCUSED } from 'vs/editor/contrib/find/findModel';
import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/findState';
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService';
import { IColorTheme, IThemeService } from 'vs/platform/theme/common/themeService';
import * as colors from 'vs/platform/theme/common/colorRegistry';
import { IEditorAction } from 'vs/editor/common/editorCommon';
import { IDisposable } from 'vs/base/common/lifecycle';
@@ -156,8 +156,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
this._tableController.addOverlayWidget(this);
this._applyTheme(themeService.getTheme());
this._register(themeService.onThemeChange(this._applyTheme.bind(this)));
this._applyTheme(themeService.getColorTheme());
this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));
}
// ----- IOverlayWidget API
@@ -288,7 +288,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
}
}
private _applyTheme(theme: ITheme) {
private _applyTheme(theme: IColorTheme) {
let inputStyles: IFindInputStyles = {
inputActiveOptionBorder: theme.getColor(colors.inputActiveOptionBorder),
inputBackground: theme.getColor(colors.inputBackground),

View File

@@ -221,7 +221,7 @@ export class ChartDataAction extends Action {
// show the visualizer extension recommendation notification
this.extensionTipsService.promptRecommendedExtensionsByScenario(Constants.visualizerExtensions);
const activeEditor = this.editorService.activeControl as QueryEditor;
const activeEditor = this.editorService.activeEditorPane as QueryEditor;
activeEditor.chart({ batchId: context.batchId, resultId: context.resultId });
return Promise.resolve(true);
}

View File

@@ -99,7 +99,7 @@ export class SqlFlavorStatusbarItem extends Disposable implements IWorkbenchCont
let uri = event.editor.resource.toString();
if (uri && uri in this._sqlStatusEditors) {
// If active editor is being closed, hide the query status.
let activeEditor = this.editorService.activeControl;
let activeEditor = this.editorService.activeEditorPane;
if (activeEditor) {
let currentUri = activeEditor.input.resource.toString();
if (uri === currentUri) {
@@ -112,7 +112,7 @@ export class SqlFlavorStatusbarItem extends Disposable implements IWorkbenchCont
}
private _onEditorsChanged(): void {
let activeEditor = this.editorService.activeControl;
let activeEditor = this.editorService.activeEditorPane;
if (activeEditor) {
let uri = activeEditor.input.resource.toString();
@@ -143,7 +143,7 @@ export class SqlFlavorStatusbarItem extends Disposable implements IWorkbenchCont
// Show/hide query status for active editor
private _showStatus(uri: string): void {
let activeEditor = this.editorService.activeControl;
let activeEditor = this.editorService.activeEditorPane;
if (activeEditor) {
let currentUri = activeEditor.input.resource.toString();
if (uri === currentUri) {
@@ -185,7 +185,7 @@ export class ChangeFlavorAction extends Action {
}
public run(): Promise<any> {
let activeEditor = this._editorService.activeControl;
let activeEditor = this._editorService.activeEditorPane;
let currentUri = activeEditor?.input.resource.toString();
if (this._connectionManagementService.isConnected(currentUri)) {
let currentProvider = this._connectionManagementService.getProviderIdFromUri(currentUri);
@@ -206,7 +206,7 @@ export class ChangeFlavorAction extends Action {
return this._quickInputService.pick(providerOptions, { placeHolder: nls.localize('pickSqlProvider', "Select SQL Language Provider") }).then(provider => {
if (provider) {
let activeEditor = this._editorService.activeControl.getControl();
let activeEditor = this._editorService.activeEditorPane.getControl();
const editorWidget = getCodeEditor(activeEditor);
if (editorWidget) {
if (currentUri) {

View File

@@ -33,7 +33,7 @@ function isConnected(editor: QueryEditor, connectionManagementService: IConnecti
}
function runActionOnActiveQueryEditor(editorService: IEditorService, action: (QueryEditor) => void): void {
const candidates = [editorService.activeControl, ...editorService.visibleControls].filter(e => e instanceof QueryEditor);
const candidates = [editorService.activeEditorPane, ...editorService.visibleEditorPanes].filter(e => e instanceof QueryEditor);
if (candidates.length > 0) {
action(candidates[0]);
}
@@ -73,7 +73,7 @@ export class FocusOnCurrentQueryKeyboardAction extends Action {
}
public run(): Promise<void> {
const editor = this._editorService.activeControl;
const editor = this._editorService.activeEditorPane;
if (editor instanceof QueryEditor) {
editor.focus();
}
@@ -99,7 +99,7 @@ export class RunQueryKeyboardAction extends Action {
}
public run(): Promise<void> {
const editor = this._editorService.activeControl;
const editor = this._editorService.activeEditorPane;
if (editor instanceof QueryEditor || editor instanceof EditDataEditor) {
editor.runQuery();
}
@@ -124,7 +124,7 @@ export class RunCurrentQueryKeyboardAction extends Action {
}
public run(): Promise<void> {
const editor = this._editorService.activeControl;
const editor = this._editorService.activeEditorPane;
if (editor instanceof QueryEditor) {
editor.runCurrentQuery();
}
@@ -146,7 +146,7 @@ export class RunCurrentQueryWithActualPlanKeyboardAction extends Action {
}
public run(): Promise<void> {
const editor = this._editorService.activeControl;
const editor = this._editorService.activeEditorPane;
if (editor instanceof QueryEditor) {
editor.runCurrentQueryWithActualPlan();
}
@@ -172,7 +172,7 @@ export class CancelQueryKeyboardAction extends Action {
}
public run(): Promise<void> {
const editor = this._editorService.activeControl;
const editor = this._editorService.activeEditorPane;
if (editor instanceof QueryEditor || editor instanceof EditDataEditor) {
editor.cancelQuery();
}
@@ -224,7 +224,7 @@ export class ToggleQueryResultsKeyboardAction extends Action {
}
public run(): Promise<void> {
const editor = this._editorService.activeControl;
const editor = this._editorService.activeEditorPane;
if (editor instanceof QueryEditor) {
editor.toggleResultsEditorVisibility();
}
@@ -404,7 +404,7 @@ export class ParseSyntaxAction extends Action {
}
public run(): Promise<void> {
const editor = this.editorService.activeControl;
const editor = this.editorService.activeEditorPane;
if (editor instanceof QueryEditor) {
if (!editor.isSelectionEmpty()) {
if (this.isConnected(editor)) {

View File

@@ -16,7 +16,7 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { Tree } from 'vs/base/parts/tree/browser/treeImpl';
import { attachListStyler } from 'vs/platform/theme/common/styler';
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeService';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { OpenMode, ClickBehavior, ICancelableEvent, IControllerOptions } from 'vs/base/parts/tree/browser/treeDefaults';
import { WorkbenchTreeController } from 'vs/platform/list/browser/listService';
@@ -102,8 +102,8 @@ export class MessagePanel extends Disposable {
this.container.style.width = '100%';
this.container.style.height = '100%';
this._register(attachListStyler(this.tree, this.themeService));
this._register(this.themeService.onThemeChange(this.applyStyles, this));
this.applyStyles(this.themeService.getTheme());
this._register(this.themeService.onDidColorThemeChange(this.applyStyles, this));
this.applyStyles(this.themeService.getColorTheme());
this.controller.onKeyDown = (tree, event) => {
if (event.ctrlKey && event.code === 'KeyC') {
let context: IMessagesActionContext = {
@@ -210,7 +210,7 @@ export class MessagePanel extends Disposable {
}
}
private applyStyles(theme: ITheme): void {
private applyStyles(theme: IColorTheme): void {
const errorColor = theme.getColor(resultsErrorColor);
const content: string[] = [];
if (errorColor) {
@@ -387,7 +387,7 @@ export class MessageController extends WorkbenchTreeController {
if (element.selection) {
let selection: ISelectionData = element.selection;
// this is a batch statement
let editor = this.workbenchEditorService.activeControl as QueryEditor;
let editor = this.workbenchEditorService.activeEditorPane as QueryEditor;
const codeEditor = <ICodeEditor>editor.getControl();
codeEditor.focus();
codeEditor.setSelection({ endColumn: selection.endColumn + 1, endLineNumber: selection.endLine + 1, startColumn: selection.startColumn + 1, startLineNumber: selection.startLine + 1 });

View File

@@ -394,7 +394,7 @@ export class QueryEditor extends BaseEditor {
let visible = currentEditorIsVisible;
if (!currentEditorIsVisible) {
// Current editor is closing but still tracked as visible. Check if any other editor is visible
const candidates = [...this.editorService.visibleControls].filter(e => {
const candidates = [...this.editorService.visibleEditorPanes].filter(e => {
if (e && e.getId) {
return e.getId() === QueryEditor.ID;
}

View File

@@ -23,7 +23,7 @@ import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
import * as TypeMoq from 'typemoq';
import * as assert from 'assert';
import { TestStorageService, TestFileService, workbenchInstantiationService } from 'vs/workbench/test/browser/workbenchTestServices';
import { TestFileService, workbenchInstantiationService } from 'vs/workbench/test/browser/workbenchTestServices';
import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService';
import { UntitledQueryEditorInput } from 'sql/workbench/common/editor/query/untitledQueryEditorInput';
import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService';
@@ -33,6 +33,7 @@ import { TestConnectionManagementService } from 'sql/platform/connection/test/co
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService';
import { TestStorageService } from 'vs/workbench/test/common/workbenchTestServices';
suite('SQL QueryAction Tests', () => {

View File

@@ -17,7 +17,7 @@ import * as TypeMoq from 'typemoq';
import * as assert from 'assert';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
import { TestStorageService, workbenchInstantiationService } from 'vs/workbench/test/browser/workbenchTestServices';
import { workbenchInstantiationService } from 'vs/workbench/test/browser/workbenchTestServices';
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
import { UntitledQueryEditorInput } from 'sql/workbench/common/editor/query/untitledQueryEditorInput';
@@ -27,6 +27,7 @@ import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/commo
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
import { TestCapabilitiesService } from 'sql/platform/capabilities/test/common/testCapabilitiesService';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { TestStorageService } from 'vs/workbench/test/common/workbenchTestServices';
suite('SQL QueryEditor Tests', () => {
let instantiationService: TypeMoq.Mock<InstantiationService>;

View File

@@ -11,7 +11,7 @@ import * as QP from 'html-query-plan';
import { IQueryPlanParams, IBootstrapParams } from 'sql/workbench/services/bootstrap/common/bootstrapParams';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { registerThemingParticipant, ICssStyleCollector, ITheme } from 'vs/platform/theme/common/themeService';
import { registerThemingParticipant, ICssStyleCollector, IColorTheme } from 'vs/platform/theme/common/themeService';
import * as colors from 'vs/platform/theme/common/colorRegistry';
export const QUERYPLAN_SELECTOR: string = 'queryplan-component';
@@ -53,7 +53,7 @@ export class QueryPlanComponent implements OnDestroy, OnInit {
}
}
private _updateTheme(theme: ITheme, collector: ICssStyleCollector) {
private _updateTheme(theme: IColorTheme, collector: ICssStyleCollector) {
let backgroundColor = theme.getColor(colors.editorBackground);
let foregroundColor = theme.getColor(colors.editorForeground);

View File

@@ -14,7 +14,6 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { localize } from 'vs/nls';
import { toDisposable } from 'vs/base/common/lifecycle';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
import * as DOM from 'vs/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
import { IWebviewService, WebviewElement } from 'vs/workbench/contrib/webview/browser/webview';
@@ -22,6 +21,7 @@ import { generateUuid } from 'vs/base/common/uuid';
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfigurationService';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { attachModalDialogStyler } from 'sql/workbench/common/styler';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
export class WebViewDialog extends Modal {
@@ -44,7 +44,7 @@ export class WebViewDialog extends Modal {
constructor(
@IThemeService themeService: IThemeService,
@IClipboardService clipboardService: IClipboardService,
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@ILayoutService layoutService: ILayoutService,
@IAdsTelemetryService telemetryService: IAdsTelemetryService,
@IContextKeyService contextKeyService: IContextKeyService,
@ILogService logService: ILogService,
@@ -91,7 +91,7 @@ export class WebViewDialog extends Modal {
protected renderBody(container: HTMLElement) {
this._body = DOM.append(container, DOM.$('div.webview-dialog'));
this._webview = this.webviewService.createWebview(this.id,
this._webview = this.webviewService.createWebviewElement(this.id,
{},
{
allowScripts: true