Skip to content

Commit

Permalink
Fix more build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kburtram committed Mar 31, 2018
1 parent df3e792 commit d977448
Show file tree
Hide file tree
Showing 42 changed files with 111 additions and 96 deletions.
4 changes: 2 additions & 2 deletions src/sql/base/browser/ui/dropdownList/dropdownList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ export class DropdownList extends Dropdown {
if (_action) {
let button = new Button(_contentContainer);
button.label = _action.label;
this.toDispose.push(DOM.addDisposableListener(button.getElement(), DOM.EventType.CLICK, () => {
this.toDispose.push(DOM.addDisposableListener(button.element, DOM.EventType.CLICK, () => {
this._action.run();
this.hide();
}));
this.toDispose.push(DOM.addDisposableListener(button.getElement(), DOM.EventType.KEY_DOWN, (e: KeyboardEvent) => {
this.toDispose.push(DOM.addDisposableListener(button.element, DOM.EventType.KEY_DOWN, (e: KeyboardEvent) => {
let event = new StandardKeyboardEvent(e);
if (event.equals(KeyCode.Enter)) {
e.stopPropagation();
Expand Down
10 changes: 8 additions & 2 deletions src/sql/base/browser/ui/listBox/listBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { IContextViewProvider, AnchorAlignment } from 'vs/base/browser/ui/contextview/contextview';
import { RenderOptions, renderFormattedText, renderText } from 'vs/base/browser/htmlContentRenderer';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';

const $ = dom.$;

Expand Down Expand Up @@ -50,8 +51,13 @@ export class ListBox extends SelectBox {
private contextViewProvider: IContextViewProvider;
private isValid: boolean;

constructor(options: string[], selectedOption: string, contextViewProvider: IContextViewProvider, private _clipboardService: IClipboardService) {
super(options, 0);
constructor(
options: string[],
selectedOption: string,
contextViewProvider: IContextViewProvider,
private _clipboardService: IClipboardService) {

super(options, 0, contextViewProvider);
this.contextViewProvider = contextViewProvider;
this.isValid = true;
this.selectElement.multiple = true;
Expand Down
2 changes: 1 addition & 1 deletion src/sql/base/browser/ui/modal/dialogHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function appendRowLink(container: Builder, label: string, labelClass: str
});
});

return new Builder(rowButton.getElement());
return new Builder(rowButton.element);
}

export function appendInputSelectBox(container: Builder, selectBox: SelectBox): SelectBox {
Expand Down
15 changes: 9 additions & 6 deletions src/sql/base/browser/ui/modal/webViewDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { localize } from 'vs/nls';
import WebView from 'vs/workbench/parts/html/browser/webview';
import { Webview } from 'vs/workbench/parts/html/browser/webview';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IDisposable, toDisposable } from 'vs/base/common/lifecycle';
Expand All @@ -29,7 +29,7 @@ export class WebViewDialog extends Modal {
private _okButton: Button;
private _okLabel: string;
private _closeLabel: string;
private _webview: WebView;
private _webview: Webview;
private _html: string;
private _headerTitle: string;

Expand Down Expand Up @@ -89,14 +89,17 @@ export class WebViewDialog extends Modal {
protected renderBody(container: HTMLElement) {
new Builder(container).div({ 'class': 'webview-dialog' }, (bodyBuilder) => {
this._body = bodyBuilder.getHTMLElement();
this._webview = new WebView(this._body, this._webViewPartService.getContainer(Parts.EDITOR_PART),
this._webview = new Webview(
this._body,
this._webViewPartService.getContainer(Parts.EDITOR_PART),
this._themeService,
this._environmentService,
this._contextViewService,
undefined,
undefined,
{
allowScripts: true,
enableWrappedPostMessage: true,
hideFind: true
enableWrappedPostMessage: true
}
);

Expand Down Expand Up @@ -130,7 +133,7 @@ export class WebViewDialog extends Modal {
}

private updateDialogBody(): void {
this._webview.contents = [this.html];
this._webview.contents = this.html;
}

/* espace key */
Expand Down
2 changes: 1 addition & 1 deletion src/sql/base/browser/ui/selectBox/selectBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class SelectBox extends vsSelectBox {
private element: HTMLElement;

constructor(options: string[], selectedOption: string, container?: HTMLElement, contextViewProvider?: IContextViewProvider) {
super(options, 0);
super(options, 0, contextViewProvider);
this._optionsDictionary = new Array();
for (var i = 0; i < options.length; i++) {
this._optionsDictionary[options[i]] = i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Component, Inject, forwardRef, ChangeDetectorRef, OnInit, ViewChild, ElementRef } from '@angular/core';

import Webview from 'vs/workbench/parts/html/browser/webview';
import { Webview } from 'vs/workbench/parts/html/browser/webview';
import { Parts } from 'vs/workbench/services/part/common/partService';
import Event, { Emitter } from 'vs/base/common/event';
import { IDisposable } from 'vs/base/common/lifecycle';
Expand Down Expand Up @@ -58,7 +58,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
public setHtml(html: string): void {
this._html = html;
if (this._webview) {
this._webview.contents = [html];
this._webview.contents = html;
this._webview.layout();
}
}
Expand Down Expand Up @@ -96,23 +96,25 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
if (this._onMessageDisposable) {
this._onMessageDisposable.dispose();
}
this._webview = new Webview(this._el.nativeElement,
this._webview = new Webview(
this._el.nativeElement,
this._dashboardService.partService.getContainer(Parts.EDITOR_PART),
this._dashboardService.themeService,
this._dashboardService.environmentService,
this._dashboardService.contextViewService,
undefined,
undefined,
{
allowScripts: true,
enableWrappedPostMessage: true,
hideFind: true
enableWrappedPostMessage: true
}
);
this._onMessageDisposable = this._webview.onMessage(e => {
this._onMessage.fire(e);
});
this._webview.style(this._dashboardService.themeService.getTheme());
if (this._html) {
this._webview.contents = [this._html];
this._webview.contents = this._html;
}
this._webview.layout();
}
Expand Down
4 changes: 2 additions & 2 deletions src/sql/parts/profiler/editor/profilerEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiati
import { ProfilerResourceEditor } from './profilerResourceEditor';
import { SplitView, View, Orientation, IViewOptions } from 'sql/base/browser/ui/splitview/splitview';
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { IModel } from 'vs/editor/common/editorCommon';
import { ITextModel } from 'vs/editor/common/model';
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput';
import URI from 'vs/base/common/uri';
Expand Down Expand Up @@ -97,7 +97,7 @@ export interface IDetailData {
export class ProfilerEditor extends BaseEditor {
public static ID: string = 'workbench.editor.profiler';
private _editor: ProfilerResourceEditor;
private _editorModel: IModel;
private _editorModel: ITextModel;
private _editorInput: UntitledEditorInput;
private _splitView: SplitView;
private _container: HTMLElement;
Expand Down
8 changes: 4 additions & 4 deletions src/sql/parts/query/services/queryEditorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { sqlModeId, untitledFilePrefix, getSupportedInputResource } from 'sql/pa
import * as TaskUtilities from 'sql/workbench/common/taskUtilities';

import { IMode } from 'vs/editor/common/modes';
import { IModel } from 'vs/editor/common/editorCommon';
import { ITextModel } from 'vs/editor/common/model';
import { IEditor, IEditorInput, Position } from 'vs/platform/editor/common/editor';
import { CodeEditor } from 'vs/editor/browser/codeEditor';
import { IEditorGroup } from 'vs/workbench/common/editor';
Expand Down Expand Up @@ -193,7 +193,7 @@ export class QueryEditorService implements IQueryEditorService {
* In all other cases (when SQL is involved in the language change and the editor is not dirty),
* returns a promise that will resolve when the old editor has been replaced by a new editor.
*/
public static sqlLanguageModeCheck(model: IModel, mode: IMode, editor: IEditor): Promise<IModel> {
public static sqlLanguageModeCheck(model: ITextModel, mode: IMode, editor: IEditor): Promise<ITextModel> {
if (!model || !mode || !editor) {
return Promise.resolve(undefined);
}
Expand Down Expand Up @@ -233,7 +233,7 @@ export class QueryEditorService implements IQueryEditorService {
options.pinned = group.isPinned(index);

// Return a promise that will resovle when the old editor has been replaced by a new editor
return new Promise<IModel>((resolve, reject) => {
return new Promise<ITextModel>((resolve, reject) => {
let newEditorInput = QueryEditorService._getNewEditorInput(changingToSql, editor.input, uri);

// Override queryEditorCheck to not open this file in a QueryEditor
Expand Down Expand Up @@ -345,7 +345,7 @@ export class QueryEditorService implements IQueryEditorService {
/**
* Handle all cleanup actions that need to wait until the editor is fully open.
*/
private static _onEditorOpened(editor: IEditor, uri: string, position: Position, isPinned: boolean): IModel {
private static _onEditorOpened(editor: IEditor, uri: string, position: Position, isPinned: boolean): ITextModel {

// Reset the editor pin state
// TODO: change this so it happens automatically in openEditor in sqlLanguageModeCheck. Performing this here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class ConnectionViewlet extends Viewlet implements IConnectionsViewlet {
@IViewletService private viewletService: IViewletService,
@IMessageService private messageService: IMessageService,
@IObjectExplorerService private objectExplorerService: IObjectExplorerService,
@IPartService partService: IPartService,
@IPartService partService: IPartService
) {

super(VIEWLET_ID, partService, telemetryService, _themeService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class MainThreadDashboard implements MainThreadDashboardShape {
context: IExtHostContext,
@IDashboardService private _dashboardService: IDashboardService
) {
this._proxy = context.get(SqlExtHostContext.ExtHostDashboard);
this._proxy = context.getProxy(SqlExtHostContext.ExtHostDashboard);
_dashboardService.onDidChangeToDashboard(e => {
this._proxy.$onDidChangeToDashboard(e);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class MainThreadModalDialog implements MainThreadModalDialogShape {
@IWorkbenchEditorService private readonly _editorService: IWorkbenchEditorService,
@IInstantiationService private readonly _instantiationService: IInstantiationService
) {
this._proxy = context.get(SqlExtHostContext.ExtHostModalDialogs);
this._proxy = context.getProxy(SqlExtHostContext.ExtHostModalDialogs);
}

dispose(): void {
Expand Down
2 changes: 1 addition & 1 deletion src/sql/workbench/api/electron-browser/mainThreadTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class MainThreadTasks implements MainThreadTasksShape {
constructor(
extHostContext: IExtHostContext
) {
this._proxy = extHostContext.get(SqlExtHostContext.ExtHostTasks);
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostTasks);
}

dispose() {
Expand Down
6 changes: 3 additions & 3 deletions src/sql/workbench/api/node/extHostAccountManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@

import * as sqlops from 'sqlops';
import { TPromise } from 'vs/base/common/winjs.base';
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
import { Disposable } from 'vs/workbench/api/node/extHostTypes';
import {
ExtHostAccountManagementShape,
MainThreadAccountManagementShape,
SqlMainContext,
} from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';

export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
private _handlePool: number = 0;
private _proxy: MainThreadAccountManagementShape;
private _providers: { [handle: number]: AccountProviderWithMetadata } = {};

constructor(threadService: IThreadService) {
constructor(mainContext: IMainContext) {
super();
this._proxy = threadService.get(SqlMainContext.MainThreadAccountManagement);
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadAccountManagement);
}

// PUBLIC METHODS //////////////////////////////////////////////////////
Expand Down
6 changes: 3 additions & 3 deletions src/sql/workbench/api/node/extHostConnectionManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
*--------------------------------------------------------------------------------------------*/
'use strict';

import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
import { ExtHostConnectionManagementShape, SqlMainContext, MainThreadConnectionManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import * as sqlops from 'sqlops';

export class ExtHostConnectionManagement extends ExtHostConnectionManagementShape {

private _proxy: MainThreadConnectionManagementShape;

constructor(
threadService: IThreadService
mainContext: IMainContext
) {
super();
this._proxy = threadService.get(SqlMainContext.MainThreadConnectionManagement);
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadConnectionManagement);
}

public $getActiveConnections(): Thenable<sqlops.connection.Connection[]> {
Expand Down
6 changes: 3 additions & 3 deletions src/sql/workbench/api/node/extHostCredentialManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'use strict';

import { TPromise } from 'vs/base/common/winjs.base';
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { SqlMainContext, MainThreadCredentialManagementShape, ExtHostCredentialManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import * as vscode from 'vscode';
import * as sqlops from 'sqlops';
Expand Down Expand Up @@ -41,12 +41,12 @@ export class ExtHostCredentialManagement extends ExtHostCredentialManagementShap
private _registrationPromise: Promise<void>;
private _registrationPromiseResolve;

constructor(threadService: IThreadService) {
constructor(mainContext: IMainContext) {
super();

let self = this;

this._proxy = threadService.get(SqlMainContext.MainThreadCredentialManagement);
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadCredentialManagement);

// Create a promise to resolve when a credential provider has been registered.
// HACK: this gives us a deferred promise
Expand Down
6 changes: 3 additions & 3 deletions src/sql/workbench/api/node/extHostDashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';

import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import Event, { Emitter } from 'vs/base/common/event';

import * as sqlops from 'sqlops';
Expand All @@ -20,8 +20,8 @@ export class ExtHostDashboard implements ExtHostDashboardShape {

private _proxy: MainThreadDashboardShape;

constructor(threadService: IThreadService) {
this._proxy = threadService.get(SqlMainContext.MainThreadDashboard);
constructor(mainContext: IMainContext) {
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadDashboard);
}

$onDidOpenDashboard(dashboard: sqlops.DashboardDocument) {
Expand Down
2 changes: 1 addition & 1 deletion src/sql/workbench/api/node/extHostDashboardWebview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class ExtHostDashboardWebviews implements ExtHostDashboardWebviewsShape {
constructor(
mainContext: IMainContext
) {
this._proxy = mainContext.get(SqlMainContext.MainThreadDashboardWebview);
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadDashboardWebview);
}

$onMessage(handle: number, message: any): void {
Expand Down
6 changes: 3 additions & 3 deletions src/sql/workbench/api/node/extHostDataProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'use strict';

import Event, { Emitter } from 'vs/base/common/event';
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { SqlMainContext, MainThreadDataProtocolShape, ExtHostDataProtocolShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import * as vscode from 'vscode';
import * as sqlops from 'sqlops';
Expand All @@ -23,10 +23,10 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
private _adapter = new Map<number, sqlops.DataProvider>();

constructor(
threadService: IThreadService
mainContext: IMainContext
) {
super();
this._proxy = threadService.get(SqlMainContext.MainThreadDataProtocol);
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadDataProtocol);
}

private _createDisposable(handle: number): Disposable {
Expand Down
2 changes: 1 addition & 1 deletion src/sql/workbench/api/node/extHostModalDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class ExtHostModalDialogs implements ExtHostModalDialogsShape {
constructor(
mainContext: IMainContext
) {
this._proxy = mainContext.get(SqlMainContext.MainThreadModalDialog);
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadModalDialog);
}

createDialog(
Expand Down
6 changes: 3 additions & 3 deletions src/sql/workbench/api/node/extHostObjectExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';

import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { ExtHostObjectExplorerShape, SqlMainContext, MainThreadObjectExplorerShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import * as sqlops from 'sqlops';
import * as vscode from 'vscode';
Expand All @@ -14,9 +14,9 @@ export class ExtHostObjectExplorer implements ExtHostObjectExplorerShape {
private _proxy: MainThreadObjectExplorerShape;

constructor(
threadService: IThreadService
mainContext: IMainContext
) {
this._proxy = threadService.get(SqlMainContext.MainThreadObjectExplorer);
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadObjectExplorer);
}

public $getNode(connectionId: string, nodePath?: string): Thenable<sqlops.objectexplorer.ObjectExplorerNode> {
Expand Down
Loading

0 comments on commit d977448

Please sign in to comment.