mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
Merge from vscode aba87f135229c17c4624341b7a2499dcedafcb87 (#6430)
* Merge from vscode aba87f135229c17c4624341b7a2499dcedafcb87 * fix compile errors
This commit is contained in:
@@ -8,7 +8,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import * as assert from 'assert';
|
||||
import { NullLogService } from 'vs/platform/log/common/log';
|
||||
import { SimpleTelemetryService } from 'vs/workbench/browser/web.simpleservices';
|
||||
import { TelemetryService } from 'vs/platform/telemetry/common/telemetryService';
|
||||
|
||||
suite('SQL Telemetry Utilities tests', () => {
|
||||
let telemetryService: TypeMoq.Mock<ITelemetryService>;
|
||||
@@ -35,7 +35,7 @@ suite('SQL Telemetry Utilities tests', () => {
|
||||
};
|
||||
|
||||
setup(() => {
|
||||
telemetryService = TypeMoq.Mock.ofType(SimpleTelemetryService, TypeMoq.MockBehavior.Strict);
|
||||
telemetryService = TypeMoq.Mock.ofType(TelemetryService, TypeMoq.MockBehavior.Strict, Object.create(null));
|
||||
telemetryService.setup(x => x.publicLog(TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(x => Promise.resolve(none));
|
||||
});
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBa
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/workbench/browser/modelComponents/interfaces';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
import { WebviewContentOptions } from 'vs/workbench/contrib/webview/common/webview';
|
||||
|
||||
function reviveWebviewOptions(options: vscode.WebviewOptions): vscode.WebviewOptions {
|
||||
@@ -38,7 +38,7 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
|
||||
private static readonly standardSupportedLinkSchemes = ['http', 'https', 'mailto'];
|
||||
|
||||
private _webview: WebviewElement;
|
||||
private _webview: ElectronWebviewBasedWebview;
|
||||
private _renderedHtml: string;
|
||||
private _extensionLocationUri: URI;
|
||||
private _ready: Promise<void>;
|
||||
@@ -65,7 +65,7 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
}
|
||||
|
||||
private _createWebview(): void {
|
||||
this._webview = this.instantiationService.createInstance(WebviewElement,
|
||||
this._webview = this.instantiationService.createInstance(ElectronWebviewBasedWebview,
|
||||
{
|
||||
allowSvgs: true
|
||||
},
|
||||
@@ -158,7 +158,7 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
this._ready.then(() => {
|
||||
super.setProperties(properties);
|
||||
if (this.options) {
|
||||
this._webview.options = this.getExtendedOptions();
|
||||
this._webview.contentOptions = this.getExtendedOptions();
|
||||
}
|
||||
if (this.html !== this._renderedHtml) {
|
||||
this.setHtml();
|
||||
|
||||
@@ -18,7 +18,7 @@ import { AngularDisposable } from 'sql/base/browser/lifecycle';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
|
||||
@Component({
|
||||
template: '',
|
||||
@@ -33,7 +33,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
public readonly onMessage: Event<string> = this._onMessage.event;
|
||||
|
||||
private _onMessageDisposable: IDisposable;
|
||||
private _webview: WebviewElement;
|
||||
private _webview: ElectronWebviewBasedWebview;
|
||||
private _html: string;
|
||||
|
||||
constructor(
|
||||
@@ -100,7 +100,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
this._onMessageDisposable.dispose();
|
||||
}
|
||||
|
||||
this._webview = this.instantiationService.createInstance(WebviewElement,
|
||||
this._webview = this.instantiationService.createInstance(ElectronWebviewBasedWebview,
|
||||
{},
|
||||
{
|
||||
allowScripts: true
|
||||
|
||||
@@ -16,7 +16,7 @@ import { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
|
||||
interface IWebviewWidgetConfig {
|
||||
id: string;
|
||||
@@ -31,7 +31,7 @@ const selector = 'webview-widget';
|
||||
export class WebviewWidget extends DashboardWidget implements IDashboardWidget, OnInit, IDashboardWebview {
|
||||
|
||||
private _id: string;
|
||||
private _webview: WebviewElement;
|
||||
private _webview: ElectronWebviewBasedWebview;
|
||||
private _html: string;
|
||||
private _onMessage = new Emitter<string>();
|
||||
public readonly onMessage: Event<string> = this._onMessage.event;
|
||||
@@ -99,7 +99,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
this._onMessageDisposable.dispose();
|
||||
}
|
||||
|
||||
this._webview = this.instantiationService.createInstance(WebviewElement,
|
||||
this._webview = this.instantiationService.createInstance(ElectronWebviewBasedWebview,
|
||||
{},
|
||||
{
|
||||
allowScripts: true,
|
||||
|
||||
@@ -5,17 +5,13 @@
|
||||
|
||||
import 'vs/css!./media/connectionViewletPanel';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IExtensionTipsService, IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/views/panelViewlet';
|
||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { ServerTreeView } from 'sql/workbench/parts/objectExplorer/browser/serverTreeView';
|
||||
import {
|
||||
@@ -23,12 +19,10 @@ import {
|
||||
AddServerAction, AddServerGroupAction
|
||||
} from 'sql/workbench/parts/objectExplorer/browser/connectionTreeAction';
|
||||
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/common/objectExplorerService';
|
||||
import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||
|
||||
export class ConnectionViewletPanel extends ViewletPanel {
|
||||
|
||||
private _root: HTMLElement;
|
||||
private _toDisposeViewlet: IDisposable[] = [];
|
||||
private _serverTreeView: ServerTreeView;
|
||||
private _addServerAction: IAction;
|
||||
private _addServerGroupAction: IAction;
|
||||
@@ -36,17 +30,11 @@ export class ConnectionViewletPanel extends ViewletPanel {
|
||||
|
||||
constructor(
|
||||
private options: IViewletViewOptions,
|
||||
@INotificationService protected notificationService: INotificationService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IInstantiationService protected instantiationService: IInstantiationService,
|
||||
@IThemeService private themeService: IThemeService,
|
||||
@IExtensionsWorkbenchService protected extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@IExtensionTipsService protected tipsService: IExtensionTipsService,
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IWorkspaceContextService protected contextService: IWorkspaceContextService,
|
||||
@IExtensionManagementServerService protected extensionManagementServerService: IExtensionManagementServerService,
|
||||
@IObjectExplorerService private objectExplorerService: IObjectExplorerService
|
||||
@IObjectExplorerService private readonly objectExplorerService: IObjectExplorerService
|
||||
) {
|
||||
super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: options.title }, keybindingService, contextMenuService, configurationService);
|
||||
this._addServerAction = this.instantiationService.createInstance(AddServerAction,
|
||||
|
||||
@@ -16,7 +16,7 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService
|
||||
import { localize } from 'vs/nls';
|
||||
import { IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
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';
|
||||
@@ -27,7 +27,7 @@ export class WebViewDialog extends Modal {
|
||||
private _okButton: Button;
|
||||
private _okLabel: string;
|
||||
private _closeLabel: string;
|
||||
private _webview: WebviewElement;
|
||||
private _webview: ElectronWebviewBasedWebview;
|
||||
private _html: string;
|
||||
private _headerTitle: string;
|
||||
|
||||
@@ -87,7 +87,7 @@ export class WebViewDialog extends Modal {
|
||||
protected renderBody(container: HTMLElement) {
|
||||
this._body = DOM.append(container, DOM.$('div.webview-dialog'));
|
||||
|
||||
this._webview = this._instantiationService.createInstance(WebviewElement,
|
||||
this._webview = this._instantiationService.createInstance(ElectronWebviewBasedWebview,
|
||||
{},
|
||||
{
|
||||
allowScripts: true
|
||||
|
||||
Reference in New Issue
Block a user