mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 09:35:40 -05:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
@@ -12,7 +12,7 @@ import { SplitView } from 'sql/base/browser/ui/splitview/splitview';
|
||||
import { List } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { IListService, ListService } from 'vs/platform/list/browser/listService';
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { attachListStyler } from 'vs/platform/theme/common/styler';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IAccountManagementService } from 'sql/services/accountManagement/interfaces';
|
||||
import { AccountProviderAddedEventParams, UpdateAccountListEventParams } from 'sql/services/accountManagement/eventTypes';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import 'vs/css!./media/accountPicker';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { List } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { IDropdownOptions } from 'vs/base/browser/ui/dropdown/dropdown';
|
||||
import { IListEvent } from 'vs/base/browser/ui/list/list';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import * as sqlops from 'sqlops';
|
||||
|
||||
import { IAccountPickerService } from 'sql/parts/accountManagement/common/interfaces';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
import * as sqlops from 'sqlops';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import { IAccountManagementService } from 'sql/services/accountManagement/interfaces';
|
||||
import { UpdateAccountListEventParams } from 'sql/services/accountManagement/eventTypes';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Builder, $ } from 'vs/base/browser/builder';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { attachInputBoxStyler } from 'vs/platform/theme/common/styler';
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { localize } from 'vs/nls';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
@@ -14,7 +14,7 @@ import { Action } from 'vs/base/common/actions';
|
||||
import { error } from 'sql/base/common/log';
|
||||
import { IAccountManagementService } from 'sql/services/accountManagement/interfaces';
|
||||
import { IErrorMessageService } from 'sql/parts/connection/common/connectionManagement';
|
||||
import { IConfirmationService, IConfirmation } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { IDialogService, IConfirmation } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
|
||||
@@ -81,7 +81,7 @@ export class RemoveAccountAction extends Action {
|
||||
|
||||
constructor(
|
||||
private _account: sqlops.Account,
|
||||
@IConfirmationService private _confirmationService: IConfirmationService,
|
||||
@IDialogService private _dialogService: IDialogService,
|
||||
@INotificationService private _notificationService: INotificationService,
|
||||
@IErrorMessageService private _errorMessageService: IErrorMessageService,
|
||||
@IAccountManagementService private _accountManagementService: IAccountManagementService
|
||||
@@ -100,7 +100,7 @@ export class RemoveAccountAction extends Action {
|
||||
type: 'question'
|
||||
};
|
||||
|
||||
return this._confirmationService.confirm(confirm).then(result => {
|
||||
return this._dialogService.confirm(confirm).then(result => {
|
||||
if (!result) {
|
||||
return TPromise.as(false);
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import Event from 'vs/base/common/event';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import * as sqlops from 'sqlops';
|
||||
|
||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'vs/css!./media/firewallRuleDialog';
|
||||
import { Builder, $ } from 'vs/base/browser/builder';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { localize } from 'vs/nls';
|
||||
import { buttonBackground } from 'vs/platform/theme/common/colorRegistry';
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'vs/css!sql/parts/query/editor/media/queryEditor';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Dimension, Builder } from 'vs/base/browser/builder';
|
||||
import { EditorOptions } from 'vs/workbench/common/editor';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
@@ -37,9 +37,9 @@ export class CreateLoginEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to create the editor in the parent builder.
|
||||
* Called to create the editor in the parent element.
|
||||
*/
|
||||
public createEditor(parent: Builder): void {
|
||||
public createEditor(parent: HTMLElement): void {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,7 +52,7 @@ export class CreateLoginEditor extends BaseEditor {
|
||||
* Updates the internal variable keeping track of the editor's size, and re-calculates the sash position.
|
||||
* To be called when the container of this editor changes size.
|
||||
*/
|
||||
public layout(dimension: Dimension): void {
|
||||
public layout(dimension: DOM.Dimension): void {
|
||||
}
|
||||
|
||||
public setInput(input: CreateLoginInput, options: EditorOptions): TPromise<void> {
|
||||
@@ -63,7 +63,7 @@ export class CreateLoginEditor extends BaseEditor {
|
||||
if (!input.hasInitialized) {
|
||||
this.bootstrapAngular(input);
|
||||
}
|
||||
this.revealElementWithTagName(input.uniqueSelector, this.getContainer().getHTMLElement());
|
||||
this.revealElementWithTagName(input.uniqueSelector, this.getContainer());
|
||||
|
||||
return super.setInput(input, options);
|
||||
}
|
||||
@@ -100,7 +100,7 @@ export class CreateLoginEditor extends BaseEditor {
|
||||
};
|
||||
let uniqueSelector = this.instantiationService.invokeFunction(bootstrapAngular,
|
||||
CreateLoginModule,
|
||||
this.getContainer().getHTMLElement(),
|
||||
this.getContainer(),
|
||||
CREATELOGIN_SELECTOR,
|
||||
params);
|
||||
input.setUniqueSelector(uniqueSelector);
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
import nls = require('vs/nls');
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen';
|
||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
||||
import { INotificationService, INotificationActions } from 'vs/platform/notification/common/notification';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { IConfirmationService, IChoiceService, IConfirmation, IConfirmationResult, Choice } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { IDialogService, IConfirmation, IConfirmationResult } from 'vs/platform/dialogs/common/dialogs';
|
||||
|
||||
/**
|
||||
* Workbench action to clear the recent connnections list
|
||||
@@ -34,7 +34,7 @@ export class ClearRecentConnectionsAction extends Action {
|
||||
@IConnectionManagementService private _connectionManagementService: IConnectionManagementService,
|
||||
@INotificationService private _notificationService: INotificationService,
|
||||
@IQuickOpenService private _quickOpenService: IQuickOpenService,
|
||||
@IConfirmationService private _confirmationService: IConfirmationService,
|
||||
@IDialogService private _dialogService: IDialogService,
|
||||
) {
|
||||
super(id, label, ClearRecentConnectionsAction.ICON);
|
||||
this.enabled = true;
|
||||
@@ -47,7 +47,7 @@ export class ClearRecentConnectionsAction extends Action {
|
||||
public run(): TPromise<void> {
|
||||
if (this._useConfirmationMessage) {
|
||||
return this.promptConfirmationMessage().then(result => {
|
||||
if (result) {
|
||||
if (result.confirmed) {
|
||||
this._connectionManagementService.clearRecentConnectionsList();
|
||||
this._onRecentConnectionsRemoved.fire();
|
||||
}
|
||||
@@ -84,7 +84,7 @@ export class ClearRecentConnectionsAction extends Action {
|
||||
});
|
||||
}
|
||||
|
||||
private promptConfirmationMessage(): TPromise<boolean> {
|
||||
private promptConfirmationMessage(): TPromise<IConfirmationResult> {
|
||||
let confirm: IConfirmation = {
|
||||
message: nls.localize('clearRecentConnectionMessage', 'Are you sure you want to delete all the connections from the list?'),
|
||||
primaryButton: nls.localize('connectionDialog.yes', 'Yes'),
|
||||
@@ -92,8 +92,8 @@ export class ClearRecentConnectionsAction extends Action {
|
||||
type: 'question'
|
||||
};
|
||||
|
||||
return new TPromise<boolean>((resolve, reject) => {
|
||||
this._confirmationService.confirm(confirm).then((confirmed) => {
|
||||
return new TPromise<IConfirmationResult>((resolve, reject) => {
|
||||
this._dialogService.confirm(confirm).then((confirmed) => {
|
||||
resolve(confirmed);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import { IViewlet } from 'vs/workbench/common/viewlet';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import Event from 'vs/base/common/event';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import * as sqlops from 'sqlops';
|
||||
|
||||
@@ -51,7 +51,7 @@ import { ConnectionProfileGroup, IConnectionProfileGroup } from './connectionPro
|
||||
import { ConfigurationEditingService } from 'vs/workbench/services/configuration/node/configurationEditingService';
|
||||
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
||||
import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService';
|
||||
import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel';
|
||||
import { EditorPart } from 'vs/workbench/browser/parts/editor/editorPart';
|
||||
|
||||
@@ -22,7 +22,6 @@ import { entries } from 'sql/base/common/objects';
|
||||
import * as sqlops from 'sqlops';
|
||||
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import { withElementById } from 'vs/base/browser/builder';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
@@ -306,7 +305,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
||||
|
||||
private doShowDialog(params: INewConnectionParams): TPromise<void> {
|
||||
if (!this._connectionDialog) {
|
||||
let container = withElementById(this._partService.getWorkbenchElementId()).getHTMLElement().parentElement;
|
||||
let container = document.getElementById(this._partService.getWorkbenchElementId()).parentElement;
|
||||
this._container = container;
|
||||
this._connectionDialog = this._instantiationService.createInstance(ConnectionDialogWidget, this._providerTypes, this._providerNameToDisplayNameMap[this._model.providerName]);
|
||||
this._connectionDialog.onCancel(() => {
|
||||
|
||||
@@ -24,7 +24,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IWorkbenchThemeService, IColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { contrastBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Builder, $ } from 'vs/base/browser/builder';
|
||||
import { ICancelableEvent } from 'vs/base/parts/tree/browser/treeDefaults';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
@@ -36,7 +36,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import * as styler from 'vs/platform/theme/common/styler';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { DialogService } from 'vs/workbench/services/dialogs/electron-browser/dialogs';
|
||||
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
|
||||
export interface OnShowUIResponse {
|
||||
@@ -266,7 +265,7 @@ export class ConnectionDialogWidget extends Modal {
|
||||
recentTitle.innerHtml(recentHistoryLabel);
|
||||
});
|
||||
container.div({ class: 'connection-history-actions' }, (actionsContainer) => {
|
||||
this._actionbar = this._register(new ActionBar(actionsContainer, { animated: false }));
|
||||
this._actionbar = this._register(new ActionBar(actionsContainer.getHTMLElement(), { animated: false }));
|
||||
let clearAction = this._instantiationService.createInstance(ClearRecentConnectionsAction, ClearRecentConnectionsAction.ID, ClearRecentConnectionsAction.LABEL);
|
||||
clearAction.useConfirmationMessage = true;
|
||||
clearAction.onRecentConnectionsRemoved(() => this.open(false));
|
||||
|
||||
@@ -15,7 +15,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
||||
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import mouse = require('vs/base/browser/mouseEvent');
|
||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||
|
||||
@@ -129,7 +129,7 @@ export class RecentConnectionTreeController extends DefaultController {
|
||||
getActions: () => this.actionProvider.getActions(tree, element),
|
||||
onHide: (wasCancelled?: boolean) => {
|
||||
if (wasCancelled) {
|
||||
tree.DOMFocus();
|
||||
tree.domFocus();
|
||||
}
|
||||
},
|
||||
getActionsContext: () => (actionContext)
|
||||
|
||||
@@ -8,7 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import Event from 'vs/base/common/event';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
|
||||
import { IAngularEventingService, AngularEventType, IAngularEvent } from 'sql/services/angularEventing/angularEventingService';
|
||||
import { INewDashboardTabDialogService } from 'sql/parts/dashboard/newDashboardTabDialog/interface';
|
||||
|
||||
@@ -35,7 +35,7 @@ import { IColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeS
|
||||
import * as colors from 'vs/platform/theme/common/colorRegistry';
|
||||
import * as themeColors from 'vs/workbench/common/theme';
|
||||
import * as objects from 'vs/base/common/objects';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { OnDestroy } from '@angular/core';
|
||||
|
||||
import Event from 'vs/base/common/event';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
|
||||
import { AngularDisposable } from 'sql/base/common/lifecycle';
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'vs/css!./dashboardControlHostContainer';
|
||||
|
||||
import { Component, forwardRef, Input, AfterContentInit, ViewChild, OnChanges } from '@angular/core';
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import { DashboardTab } from 'sql/parts/dashboard/common/interfaces';
|
||||
import { TabConfig } from 'sql/parts/dashboard/common/dashboardWidget';
|
||||
|
||||
@@ -11,7 +11,7 @@ import { TabConfig } from 'sql/parts/dashboard/common/dashboardWidget';
|
||||
import { DashboardTab } from 'sql/parts/dashboard/common/interfaces';
|
||||
import { TabChild } from 'sql/base/browser/ui/panel/tab.component';
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -21,7 +21,7 @@ import { TabChild } from 'sql/base/browser/ui/panel/tab.component';
|
||||
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import * as objects from 'vs/base/common/objects';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
export interface GridCellConfig {
|
||||
id?: string;
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'vs/css!./dashboardWebviewContainer';
|
||||
|
||||
import { Component, forwardRef, Input, AfterContentInit, ViewChild } from '@angular/core';
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import { DashboardTab } from 'sql/parts/dashboard/common/interfaces';
|
||||
import { TabConfig } from 'sql/parts/dashboard/common/dashboardWidget';
|
||||
|
||||
@@ -18,7 +18,7 @@ import { GRID_CONTAINER } from 'sql/parts/dashboard/containers/dashboardGridCont
|
||||
import * as dashboardHelper from 'sql/parts/dashboard/common/dashboardHelper';
|
||||
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'vs/css!./dashboardWebviewContainer';
|
||||
|
||||
import { Component, forwardRef, Input, AfterContentInit, ViewChild } from '@angular/core';
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import { DashboardTab } from 'sql/parts/dashboard/common/interfaces';
|
||||
import { TabConfig } from 'sql/parts/dashboard/common/dashboardWidget';
|
||||
|
||||
@@ -19,7 +19,7 @@ import { TabChild } from 'sql/base/browser/ui/panel/tab.component';
|
||||
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import * as objects from 'vs/base/common/objects';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
@Component({
|
||||
selector: 'dashboard-widget-container',
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'vs/css!./controlHostContent';
|
||||
|
||||
import { Component, forwardRef, Input, OnInit, Inject, ChangeDetectorRef, ElementRef, ViewChild } from '@angular/core';
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Parts } from 'vs/workbench/services/part/common/partService';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ import 'vs/css!./webviewContent';
|
||||
|
||||
import { Component, forwardRef, Input, OnInit, Inject, ChangeDetectorRef, ElementRef } from '@angular/core';
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Webview } from 'vs/workbench/parts/html/browser/webview';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Parts, IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||
@@ -15,6 +14,7 @@ import { memoize } from 'vs/base/common/decorators';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { WebviewElement } from 'vs/workbench/parts/webview/electron-browser/webviewElement';
|
||||
|
||||
import { TabConfig } from 'sql/parts/dashboard/common/dashboardWidget';
|
||||
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
||||
@@ -37,7 +37,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
public readonly onMessage: Event<string> = this._onMessage.event;
|
||||
|
||||
private _onMessageDisposable: IDisposable;
|
||||
private _webview: Webview;
|
||||
private _webview: WebviewElement;
|
||||
private _html: string;
|
||||
|
||||
constructor(
|
||||
@@ -108,7 +108,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
this._onMessageDisposable.dispose();
|
||||
}
|
||||
|
||||
this._webview = new Webview(this._el.nativeElement,
|
||||
this._webview = new WebviewElement(
|
||||
this.partService.getContainer(Parts.EDITOR_PART),
|
||||
this.themeService,
|
||||
this.environmentService,
|
||||
@@ -120,7 +120,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
enableWrappedPostMessage: true
|
||||
}
|
||||
);
|
||||
|
||||
this._webview.mountTo(this._el.nativeElement);
|
||||
|
||||
this._onMessageDisposable = this._webview.onMessage(e => {
|
||||
this._onMessage.fire(e);
|
||||
|
||||
@@ -17,7 +17,7 @@ import { subscriptionToDisposable, AngularDisposable } from 'sql/base/common/lif
|
||||
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import * as objects from 'vs/base/common/objects';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement';
|
||||
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
|
||||
import { getContentHeight, addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Dimension, Builder, $ } from 'vs/base/browser/builder';
|
||||
import { $ } from 'vs/base/browser/builder';
|
||||
import { EditorOptions } from 'vs/workbench/common/editor';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
@@ -46,9 +46,9 @@ export class DashboardEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to create the editor in the parent builder.
|
||||
* Called to create the editor in the parent element.
|
||||
*/
|
||||
public createEditor(parent: Builder): void {
|
||||
public createEditor(parent: HTMLElement): void {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,7 +70,7 @@ export class DashboardEditor extends BaseEditor {
|
||||
* Updates the internal variable keeping track of the editor's size, and re-calculates the sash position.
|
||||
* To be called when the container of this editor changes size.
|
||||
*/
|
||||
public layout(dimension: Dimension): void {
|
||||
public layout(dimension: DOM.Dimension): void {
|
||||
}
|
||||
|
||||
public setInput(input: DashboardInput, options: EditorOptions): TPromise<void> {
|
||||
@@ -78,7 +78,7 @@ export class DashboardEditor extends BaseEditor {
|
||||
return TPromise.as(undefined);
|
||||
}
|
||||
|
||||
const parentElement = this.getContainer().getHTMLElement();
|
||||
const parentElement = this.getContainer();
|
||||
|
||||
super.setInput(input, options);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import * as DOM from 'vs/base/browser/dom';
|
||||
import { List } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { IListService, ListService } from 'vs/platform/list/browser/listService';
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { attachListStyler } from 'vs/platform/theme/common/styler';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import { IDashboardTab } from 'sql/platform/dashboard/common/dashboardRegistry';
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configur
|
||||
import { ConfigurationEditingService, IConfigurationValue } from 'vs/workbench/services/configuration/node/configurationEditingService';
|
||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import * as nls from 'vs/nls';
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { Component, Input, Inject, ChangeDetectorRef, forwardRef, ElementRef, OnInit } from '@angular/core';
|
||||
|
||||
import { getContentHeight, getContentWidth } from 'vs/base/browser/dom';
|
||||
import { Dimension } from 'vs/base/browser/builder';
|
||||
import { getContentHeight, getContentWidth, Dimension } from 'vs/base/browser/dom';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
|
||||
import { Component, Inject, forwardRef, ChangeDetectorRef, OnInit, ViewChild, ElementRef } from '@angular/core';
|
||||
|
||||
import { Webview } from 'vs/workbench/parts/html/browser/webview';
|
||||
import { Parts, IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { memoize } from 'vs/base/common/decorators';
|
||||
|
||||
@@ -20,6 +19,7 @@ import * as sqlops from 'sqlops';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { WebviewElement } from 'vs/workbench/parts/webview/electron-browser/webviewElement';
|
||||
|
||||
interface IWebviewWidgetConfig {
|
||||
id: string;
|
||||
@@ -34,7 +34,7 @@ const selector = 'webview-widget';
|
||||
export class WebviewWidget extends DashboardWidget implements IDashboardWidget, OnInit, IDashboardWebview {
|
||||
|
||||
private _id: string;
|
||||
private _webview: Webview;
|
||||
private _webview: WebviewElement;
|
||||
private _html: string;
|
||||
private _onMessage = new Emitter<string>();
|
||||
public readonly onMessage: Event<string> = this._onMessage.event;
|
||||
@@ -105,8 +105,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
if (this._onMessageDisposable) {
|
||||
this._onMessageDisposable.dispose();
|
||||
}
|
||||
this._webview = new Webview(
|
||||
this._el.nativeElement,
|
||||
this._webview = new WebviewElement(
|
||||
this.partService.getContainer(Parts.EDITOR_PART),
|
||||
this.themeService,
|
||||
this.environmentService,
|
||||
@@ -118,6 +117,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
enableWrappedPostMessage: true
|
||||
}
|
||||
);
|
||||
this._webview.mountTo(this._el.nativeElement);
|
||||
this._onMessageDisposable = this._webview.onMessage(e => {
|
||||
this._onMessage.fire(e);
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import Event from 'vs/base/common/event';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import * as sqlops from 'sqlops';
|
||||
|
||||
import { IDashboardComponentParams } from 'sql/services/bootstrap/bootstrapParams';
|
||||
|
||||
@@ -13,7 +13,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IBackupService, TaskExecutionMode, IBackupUiService } from 'sql/parts/disasterRecovery/backup/common/backupService';
|
||||
import { BackupDialog } from 'sql/parts/disasterRecovery/backup/backupDialog';
|
||||
import { OptionsDialog } from 'sql/base/browser/ui/modal/optionsDialog';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IDashboardComponentParams } from 'sql/services/bootstrap/bootstrapParams';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
|
||||
@@ -42,7 +42,7 @@ export const tripleDES = 'Triple DES';
|
||||
export const serverCertificate = "Server Certificate";
|
||||
export const asymmetricKey = "Asymmetric Key";
|
||||
|
||||
export const fileFiltersSet: [ {label: string, filters: string[]} ] = [
|
||||
export const fileFiltersSet: {label: string, filters: string[]}[] = [
|
||||
{ label: localize('backup.filterBackupFiles', "Backup Files"), filters: ['*.bak', '*.trn', '*.log'] },
|
||||
{ label: localize('backup.allFiles', "All Files"), filters: ['*'] }
|
||||
];
|
||||
@@ -7,7 +7,7 @@
|
||||
import 'vs/css!./media/restoreDialog';
|
||||
import { Builder, $ } from 'vs/base/browser/builder';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { Widget } from 'vs/base/browser/ui/widget';
|
||||
import { MessageType, IInputOptions } from 'vs/base/browser/ui/inputbox/inputBox';
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as sqlops from 'sqlops';
|
||||
import * as DialogHelper from 'sql/base/browser/ui/modal/dialogHelper';
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
export interface RestoreOptionsElement {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { EditorInput, EditorModel, ConfirmResult, EncodingMode } from 'vs/workbe
|
||||
import { IConnectionManagementService, IConnectableInput, INewConnectionParams } from 'sql/parts/connection/common/connectionManagement';
|
||||
import { IQueryModelService } from 'sql/parts/query/execution/queryModel';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { EditSessionReadyParams, ISelectionData } from 'sqlops';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import nls = require('vs/nls');
|
||||
|
||||
@@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import * as nls from 'vs/nls';
|
||||
import { Builder, Dimension, withElementById } from 'vs/base/browser/builder';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
|
||||
import { EditorOptions, EditorInput } from 'vs/workbench/common/editor';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
@@ -58,7 +58,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
private readonly _minEditorSize: number = 220;
|
||||
|
||||
private _sash: IFlexibleSash;
|
||||
private _dimension: Dimension;
|
||||
private _dimension: DOM.Dimension;
|
||||
|
||||
private _resultsEditor: EditDataResultsEditor;
|
||||
private _resultsEditorContainer: HTMLElement;
|
||||
@@ -142,10 +142,10 @@ export class EditDataEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to create the editor in the parent builder.
|
||||
* Called to create the editor in the parent element.
|
||||
*/
|
||||
public createEditor(parent: Builder): void {
|
||||
const parentElement = parent.getHTMLElement();
|
||||
public createEditor(parent: HTMLElement): void {
|
||||
const parentElement = parent;
|
||||
DOM.addClass(parentElement, 'side-by-side-editor');
|
||||
this._createTaskbar(parentElement);
|
||||
}
|
||||
@@ -197,7 +197,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
* Updates the internal variable keeping track of the editor's size, and re-calculates the sash position.
|
||||
* To be called when the container of this editor changes size.
|
||||
*/
|
||||
public layout(dimension: Dimension): void {
|
||||
public layout(dimension: DOM.Dimension): void {
|
||||
this._dimension = dimension;
|
||||
|
||||
if (this._sash) {
|
||||
@@ -274,7 +274,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
let editor = descriptor.instantiate(this._instantiationService);
|
||||
editor.create(new Builder(container));
|
||||
editor.create(container);
|
||||
editor.setVisible(this.isVisible(), this.position);
|
||||
return TPromise.as(editor);
|
||||
}
|
||||
@@ -287,7 +287,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
private _createResultsEditorContainer() {
|
||||
this._createSash();
|
||||
|
||||
const parentElement = this.getContainer().getHTMLElement();
|
||||
const parentElement = this.getContainer();
|
||||
let input = <EditDataInput>this.input;
|
||||
|
||||
if (!input.results.container) {
|
||||
@@ -305,7 +305,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
*/
|
||||
private _createSash(): void {
|
||||
if (!this._sash) {
|
||||
let parentElement: HTMLElement = this.getContainer().getHTMLElement();
|
||||
let parentElement: HTMLElement = this.getContainer();
|
||||
|
||||
this._sash = this._register(new HorizontalFlexibleSash(parentElement, this._minEditorSize));
|
||||
this._setSashDimension();
|
||||
@@ -320,7 +320,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
* Appends the HTML for the SQL editor. Creates new HTML every time.
|
||||
*/
|
||||
private _createSqlEditorContainer() {
|
||||
const parentElement = this.getContainer().getHTMLElement();
|
||||
const parentElement = this.getContainer();
|
||||
this._sqlEditorContainer = DOM.append(parentElement, DOM.$('.details-editor-container'));
|
||||
this._sqlEditorContainer.style.position = 'absolute';
|
||||
}
|
||||
@@ -382,7 +382,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
this._resultsEditor = null;
|
||||
}
|
||||
|
||||
let thisEditorParent: HTMLElement = this.getContainer().getHTMLElement();
|
||||
let thisEditorParent: HTMLElement = this.getContainer();
|
||||
|
||||
if (this._sqlEditorContainer) {
|
||||
let sqlEditorParent: HTMLElement = this._sqlEditorContainer.parentElement;
|
||||
@@ -420,7 +420,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
|
||||
private _doLayoutHorizontal(): void {
|
||||
let splitPointTop: number = this._sash.getSplitPoint();
|
||||
let parent: ClientRect = this.getContainer().getHTMLElement().getBoundingClientRect();
|
||||
let parent: ClientRect = this.getContainer().getBoundingClientRect();
|
||||
|
||||
let sqlEditorHeight: number;
|
||||
let sqlEditorTop: number;
|
||||
@@ -431,7 +431,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
|
||||
this._resultsEditorContainer.hidden = false;
|
||||
|
||||
let titleBar = withElementById('workbench.parts.titlebar');
|
||||
let titleBar = document.getElementById('workbench.parts.titlebar');
|
||||
if (this.queryPaneEnabled()) {
|
||||
this._sqlEditorContainer.hidden = false;
|
||||
|
||||
@@ -442,7 +442,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
resultsEditorHeight = parent.bottom - resultsEditorTop;
|
||||
|
||||
if (titleBar) {
|
||||
sqlEditorHeight += DOM.getContentHeight(titleBar.getHTMLElement());
|
||||
sqlEditorHeight += DOM.getContentHeight(titleBar);
|
||||
}
|
||||
} else {
|
||||
this._sqlEditorContainer.hidden = true;
|
||||
@@ -454,7 +454,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
resultsEditorHeight = parent.bottom - resultsEditorTop;
|
||||
|
||||
if (titleBar) {
|
||||
resultsEditorHeight += DOM.getContentHeight(titleBar.getHTMLElement());
|
||||
resultsEditorHeight += DOM.getContentHeight(titleBar);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -466,8 +466,8 @@ export class EditDataEditor extends BaseEditor {
|
||||
this._resultsEditorContainer.style.width = `${this._dimension.width}px`;
|
||||
this._resultsEditorContainer.style.top = `${resultsEditorTop}px`;
|
||||
|
||||
this._sqlEditor.layout(new Dimension(this._dimension.width, sqlEditorHeight));
|
||||
this._resultsEditor.layout(new Dimension(this._dimension.width, resultsEditorHeight));
|
||||
this._sqlEditor.layout(new DOM.Dimension(this._dimension.width, sqlEditorHeight));
|
||||
this._resultsEditor.layout(new DOM.Dimension(this._dimension.width, resultsEditorHeight));
|
||||
}
|
||||
|
||||
private _doLayoutSql() {
|
||||
@@ -492,7 +492,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
this._sqlEditorContainer.style.height = `${sqlEditorHeight}px`;
|
||||
this._sqlEditorContainer.style.width = `${this._dimension.width}px`;
|
||||
|
||||
this._sqlEditor.layout(new Dimension(this._dimension.width, sqlEditorHeight));
|
||||
this._sqlEditor.layout(new DOM.Dimension(this._dimension.width, sqlEditorHeight));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Dimension, Builder } from 'vs/base/browser/builder';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import { EditorOptions } from 'vs/workbench/common/editor';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { getZoomLevel } from 'vs/base/browser/browser';
|
||||
@@ -13,7 +14,6 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
import { IQueryModelService } from 'sql/parts/query/execution/queryModel';
|
||||
@@ -52,14 +52,14 @@ export class EditDataResultsEditor extends BaseEditor {
|
||||
return this._input;
|
||||
}
|
||||
|
||||
public createEditor(parent: Builder): void {
|
||||
public createEditor(parent: HTMLElement): void {
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
public layout(dimension: Dimension): void {
|
||||
public layout(dimension: DOM.Dimension): void {
|
||||
}
|
||||
|
||||
public setInput(input: EditDataResultsInput, options: EditorOptions): TPromise<void> {
|
||||
@@ -73,9 +73,9 @@ export class EditDataResultsEditor extends BaseEditor {
|
||||
|
||||
private _applySettings() {
|
||||
if (this.input && this.input.container) {
|
||||
Configuration.applyFontInfoSlow(this.getContainer().getHTMLElement(), this._rawOptions);
|
||||
Configuration.applyFontInfoSlow(this.getContainer(), this._rawOptions);
|
||||
if (!this.input.css) {
|
||||
this.input.css = dom.createStyleSheet(this.input.container);
|
||||
this.input.css = DOM.createStyleSheet(this.input.container);
|
||||
}
|
||||
let cssRuleText = '';
|
||||
if (types.isNumber(this._rawOptions.cellPadding)) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import 'vs/css!vs/workbench/parts/extensions/browser/media/extensionEditor';
|
||||
import 'vs/css!vs/workbench/parts/extensions/electron-browser/media/extensionEditor';
|
||||
|
||||
|
||||
import { IExtensionManifest } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
|
||||
@@ -12,7 +12,7 @@ import { FileNode } from 'sql/parts/fileBrowser/common/fileNode';
|
||||
import { IFileBrowserService } from 'sql/parts/fileBrowser/common/interfaces';
|
||||
import * as Constants from 'sql/common/constants';
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import * as sqlops from 'sqlops';
|
||||
import { FileBrowserTree } from 'sql/parts/fileBrowser/common/fileBrowserTree';
|
||||
import { FileNode } from 'sql/parts/fileBrowser/common/fileNode';
|
||||
import Event from 'vs/base/common/event';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export const IFileBrowserDialogController = createDecorator<IFileBrowserDialogController>('fileBrowserDialogService');
|
||||
@@ -19,7 +19,7 @@ export interface IFileBrowserDialogController {
|
||||
*/
|
||||
showDialog(ownerUri: string,
|
||||
expandPath: string,
|
||||
fileFilters: [{ label: string, filters: string[] }],
|
||||
fileFilters: { label: string, filters: string[] }[],
|
||||
fileValidationServiceType: string,
|
||||
isWide: boolean,
|
||||
handleOnOk: (path: string) => void): void;
|
||||
|
||||
@@ -31,7 +31,7 @@ export class FileBrowserController extends treedefaults.DefaultController {
|
||||
event.preventDefault(); // we cannot preventDefault onMouseDown because this would break DND otherwise
|
||||
}
|
||||
event.stopPropagation();
|
||||
tree.DOMFocus();
|
||||
tree.domFocus();
|
||||
tree.setSelection([element], payload);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -22,7 +22,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { MessageType } from 'vs/base/browser/ui/inputbox/inputBox';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
|
||||
@@ -11,6 +11,7 @@ import URI from 'vs/base/common/uri';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { FileLabel } from 'vs/workbench/browser/labels';
|
||||
import { IFileTemplateData } from 'vs/workbench/parts/files/electron-browser/views/explorerViewer';
|
||||
import { empty as EmptyDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
/**
|
||||
* Renders the tree items.
|
||||
@@ -43,8 +44,9 @@ export class FileBrowserRenderer implements IRenderer {
|
||||
* Render template in a dom element based on template id
|
||||
*/
|
||||
public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): IFileTemplateData {
|
||||
const elementDisposable = EmptyDisposable;
|
||||
const label = this.instantiationService.createInstance(FileLabel, container, void 0);
|
||||
return { label, container };
|
||||
return { elementDisposable, label, container };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,7 +45,7 @@ export class FileBrowserTreeView {
|
||||
this._toDispose.push(this._tree.onDidChangeSelection((event) => this.onSelected(event)));
|
||||
this._toDispose.push(this._fileBrowserService.onExpandFolder(fileNode => this._tree.refresh(fileNode)));
|
||||
this._toDispose.push(attachListStyler(this._tree, this._themeService));
|
||||
this._tree.DOMFocus();
|
||||
this._tree.domFocus();
|
||||
}
|
||||
|
||||
if (rootNode) {
|
||||
@@ -91,7 +91,7 @@ export class FileBrowserTreeView {
|
||||
let targetsToExpand: any[];
|
||||
|
||||
// Focus
|
||||
this._tree.DOMFocus();
|
||||
this._tree.domFocus();
|
||||
|
||||
if (this._tree) {
|
||||
let selection = this._tree.getSelection();
|
||||
|
||||
@@ -7,7 +7,7 @@ import { IInsightsDialogModel, ListResource } from './interfaces';
|
||||
import { IInsightsConfigDetails, IInsightsLabel } from 'sql/parts/dashboard/widgets/insights/interfaces';
|
||||
import { Conditional } from 'sql/parts/dashboard/common/interfaces';
|
||||
|
||||
import Event, { Emitter, debounceEvent } from 'vs/base/common/event';
|
||||
import { Event, Emitter, debounceEvent } from 'vs/base/common/event';
|
||||
|
||||
export class InsightsDialogModel implements IInsightsDialogModel {
|
||||
private _rows: string[][];
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import Event from 'vs/base/common/event';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
import { IInsightsConfigDetails, IInsightsConfig } from 'sql/parts/dashboard/widgets/insights/interfaces';
|
||||
|
||||
@@ -25,7 +25,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { OEAction } from 'sql/parts/objectExplorer/viewlet/objectExplorerActions';
|
||||
import { Builder, $, withElementById } from 'vs/base/browser/builder';
|
||||
import { $ } from 'vs/base/browser/builder';
|
||||
import { AgentJobHistoryInfo } from 'sqlops';
|
||||
import { Agent } from 'vs/base/node/request';
|
||||
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
|
||||
@@ -24,7 +24,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { OEAction } from 'sql/parts/objectExplorer/viewlet/objectExplorerActions';
|
||||
import { Builder, $, withElementById } from 'vs/base/browser/builder';
|
||||
import { AgentJobHistoryInfo } from 'sqlops';
|
||||
import { Agent } from 'vs/base/node/request';
|
||||
import { AgentJobUtilities } from 'sql/parts/jobManagement/common/agentJobUtilities';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
|
||||
@@ -15,7 +15,7 @@ import { IComponent, IComponentDescriptor, IModelStore, IComponentEventArgs, Com
|
||||
import { FlexLayout, FlexItemLayout } from 'sqlops';
|
||||
import { ComponentHostDirective } from 'sql/parts/dashboard/common/componentHost.directive';
|
||||
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { ModelComponentWrapper } from 'sql/parts/modelComponents/modelComponentWrapper.component';
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import { attachEditableDropdownStyler , attachSelectBoxStyler} from 'sql/common/
|
||||
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { attachListStyler } from 'vs/platform/theme/common/styler';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -18,7 +18,7 @@ import { IInputOptions, MessageType } from 'vs/base/browser/ui/inputbox/inputBox
|
||||
import { attachInputBoxStyler, attachListStyler } from 'vs/platform/theme/common/styler';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { InjectionToken } from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,7 +9,6 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
import { Dimension } from 'vs/workbench/services/part/common/partService';
|
||||
import { EditorOptions } from 'vs/workbench/common/editor';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { Position } from 'vs/platform/editor/common/editor';
|
||||
@@ -31,10 +30,10 @@ export class ModelViewEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to create the editor in the parent builder.
|
||||
* Called to create the editor in the parent element.
|
||||
*/
|
||||
public createEditor(parent: Builder): void {
|
||||
this._editorFrame = parent.getHTMLElement();
|
||||
public createEditor(parent: HTMLElement): void {
|
||||
this._editorFrame = parent;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,7 +92,7 @@ export class ModelViewEditor extends BaseEditor {
|
||||
* Updates the internal variable keeping track of the editor's size, and re-calculates the sash position.
|
||||
* To be called when the container of this editor changes size.
|
||||
*/
|
||||
public layout(dimension: Dimension): void {
|
||||
public layout(dimension: DOM.Dimension): void {
|
||||
if (this.input instanceof ModelViewInput) {
|
||||
if (this.input.container && this.input.dialogPane) {
|
||||
this.doUpdateContainer();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import { Component, forwardRef, Input, OnInit, Inject, ChangeDetectorRef, ElementRef } from '@angular/core';
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Parts } from 'vs/workbench/services/part/common/partService';
|
||||
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import {
|
||||
Component, Input, Inject, ChangeDetectorRef, forwardRef, ComponentFactoryResolver,
|
||||
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList, AfterViewInit
|
||||
Component, Input, Inject, ChangeDetectorRef, forwardRef, ViewChild, ElementRef, OnDestroy, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
@@ -18,10 +17,7 @@ import { TableDataView } from 'sql/base/browser/ui/table/tableDataView';
|
||||
import { attachTableStyler } from 'sql/common/theme/styler';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Dimension } from 'vs/base/browser/builder';
|
||||
import * as nls from 'vs/nls';
|
||||
import { getContentHeight, getContentWidth } from 'vs/base/browser/dom';
|
||||
import { getContentHeight, getContentWidth, Dimension } from 'vs/base/browser/dom';
|
||||
import { RowSelectionModel } from 'sql/base/browser/ui/table/plugins/rowSelectionModel.plugin';
|
||||
|
||||
@Component({
|
||||
@@ -40,9 +36,7 @@ export default class TableComponent extends ComponentBase implements IComponent,
|
||||
@ViewChild('table', { read: ElementRef }) private _inputContainer: ElementRef;
|
||||
constructor(
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
|
||||
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
|
||||
@Inject(IContextViewService) private contextViewService: IContextViewService
|
||||
) {
|
||||
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService) {
|
||||
super(changeRef);
|
||||
}
|
||||
|
||||
@@ -140,7 +134,7 @@ export default class TableComponent extends ComponentBase implements IComponent,
|
||||
this._changeRef.detectChanges();
|
||||
}
|
||||
|
||||
public setLayout(layout: any): void {
|
||||
public setLayout(): void {
|
||||
// TODO allow configuring the look and feel
|
||||
this.layout();
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
|
||||
@@ -16,7 +16,7 @@ import { IModelView } from 'sql/services/model/modelViewService';
|
||||
import { Extensions, IComponentRegistry } from 'sql/platform/dashboard/common/modelComponentRegistry';
|
||||
import { AngularDisposable } from 'sql/base/common/lifecycle';
|
||||
import { ModelStore } from 'sql/parts/modelComponents/modelStore';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
const componentRegistry = <IComponentRegistry>Registry.as(Extensions.ComponentContribution);
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Webview } from 'vs/workbench/parts/html/browser/webview';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||
import { Parts, IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import { CommonServiceInterface } from 'sql/services/common/commonServiceInterface.service';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { WebviewElement } from 'vs/workbench/parts/webview/electron-browser/webviewElement';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -29,7 +29,7 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
@Input() descriptor: IComponentDescriptor;
|
||||
@Input() modelStore: IModelStore;
|
||||
|
||||
private _webview: Webview;
|
||||
private _webview: WebviewElement;
|
||||
private _onMessage = new Emitter<any>();
|
||||
private _renderedHtml: string;
|
||||
|
||||
@@ -54,7 +54,7 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
}
|
||||
|
||||
private _createWebview(): void {
|
||||
this._webview = this._register(new Webview(this._el.nativeElement,
|
||||
this._webview = this._register(new WebviewElement(
|
||||
this.partService.getContainer(Parts.EDITOR_PART),
|
||||
this.themeService,
|
||||
this.environmentService,
|
||||
@@ -66,7 +66,7 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
enableWrappedPostMessage: true
|
||||
}
|
||||
));
|
||||
|
||||
this._webview.mountTo(this._el.nativeElement);
|
||||
|
||||
this._register(this._webview.onMessage(e => {
|
||||
this._onEventEmitter.fire({
|
||||
|
||||
@@ -11,7 +11,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as nls from 'vs/nls';
|
||||
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
||||
|
||||
@@ -14,7 +14,7 @@ import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { attachInputBoxStyler, attachCheckboxStyler } from 'vs/platform/theme/common/styler';
|
||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
'use strict';
|
||||
|
||||
import 'vs/css!./media/connectionViewlet';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { ThrottledDelayer } from 'vs/base/common/async';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Builder, Dimension } from 'vs/base/browser/builder';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import { Viewlet } from 'vs/workbench/browser/viewlet';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { toggleClass } from 'vs/base/browser/dom';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { attachInputBoxStyler } from 'vs/platform/theme/common/styler';
|
||||
@@ -81,11 +81,12 @@ export class ConnectionViewlet extends Viewlet implements IConnectionsViewlet {
|
||||
});
|
||||
}
|
||||
|
||||
public create(parent: Builder): TPromise<void> {
|
||||
public create(parent: HTMLElement): TPromise<void> {
|
||||
return new TPromise<void>((resolve) => {
|
||||
super.create(parent);
|
||||
this._root = parent.getHTMLElement();
|
||||
parent.div({ class: 'server-explorer-viewlet' }, (viewletContainer) => {
|
||||
this._root = parent;
|
||||
let parentBuilder = new Builder(parent);
|
||||
parentBuilder.div({ class: 'server-explorer-viewlet' }, (viewletContainer) => {
|
||||
this._viewletContainer = viewletContainer;
|
||||
viewletContainer.div({ class: 'search-box' }, (searchBoxContainer) => {
|
||||
this._searchBoxContainer = searchBoxContainer;
|
||||
@@ -147,10 +148,10 @@ export class ConnectionViewlet extends Viewlet implements IConnectionsViewlet {
|
||||
super.focus();
|
||||
}
|
||||
|
||||
public layout({ height, width }: Dimension): void {
|
||||
public layout({ height, width }: DOM.Dimension): void {
|
||||
this._searchBox.layout();
|
||||
this._serverTreeView.layout(height - 36); // account for search box
|
||||
toggleClass(this._root, 'narrow', width <= 350);
|
||||
DOM.toggleClass(this._root, 'narrow', width <= 350);
|
||||
}
|
||||
|
||||
public getOptimalWidth(): number {
|
||||
|
||||
@@ -103,7 +103,7 @@ export class ServerTreeController extends treedefaults.DefaultController {
|
||||
getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id),
|
||||
onHide: (wasCancelled?: boolean) => {
|
||||
if (wasCancelled) {
|
||||
tree.DOMFocus();
|
||||
tree.domFocus();
|
||||
}
|
||||
},
|
||||
getActionsContext: () => (actionContext)
|
||||
|
||||
@@ -27,7 +27,7 @@ import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||
import { ICapabilitiesService } from 'sql/services/capabilities/capabilitiesService';
|
||||
import { Button } from 'sql/base/browser/ui/button/button';
|
||||
import { attachButtonStyler } from 'sql/common/theme/styler';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { TreeNode, TreeItemCollapsibleState } from 'sql/parts/objectExplorer/common/treeNode';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { SERVER_GROUP_CONFIG, SERVER_GROUP_AUTOEXPAND_CONFIG } from 'sql/parts/objectExplorer/serverGroupDialog/serverGroup.contribution';
|
||||
|
||||
@@ -63,7 +63,7 @@ export class TreeUpdateUtils {
|
||||
let targetsToExpand: any[];
|
||||
|
||||
// Focus
|
||||
tree.DOMFocus();
|
||||
tree.domFocus();
|
||||
|
||||
if (tree) {
|
||||
let selection = tree.getSelection();
|
||||
|
||||
@@ -22,7 +22,7 @@ import * as DOM from 'vs/base/browser/dom';
|
||||
import { IDataSource, ITree, IRenderer } from 'vs/base/parts/tree/browser/tree';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { attachListStyler } from 'vs/platform/theme/common/styler';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
|
||||
@@ -21,11 +21,12 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IEditorAction } from 'vs/editor/common/editorCommon';
|
||||
import { IOverlayWidget } from 'vs/editor/browser/editorBrowser';
|
||||
import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/findState';
|
||||
import { Dimension, Builder } from 'vs/base/browser/builder';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Dimension } from 'vs/base/browser/dom';
|
||||
|
||||
export class ProfilerTableEditor extends BaseEditor implements IProfilerController, ITableController {
|
||||
|
||||
@@ -57,15 +58,15 @@ export class ProfilerTableEditor extends BaseEditor implements IProfilerControll
|
||||
this._actionMap[ACTION_IDS.FIND_PREVIOUS] = this._instantiationService.createInstance(ProfilerFindPrevious, this);
|
||||
}
|
||||
|
||||
public createEditor(parent: Builder): void {
|
||||
public createEditor(parent: HTMLElement): void {
|
||||
|
||||
this._overlay = document.createElement('div');
|
||||
this._overlay.className = 'overlayWidgets';
|
||||
this._overlay.style.width = '100%';
|
||||
this._overlay.style.zIndex = '4';
|
||||
parent.getHTMLElement().appendChild(this._overlay);
|
||||
parent.appendChild(this._overlay);
|
||||
|
||||
this._profilerTable = new Table(parent.getHTMLElement());
|
||||
this._profilerTable = new Table(parent);
|
||||
this._profilerTable.setSelectionModel(new RowSelectionModel());
|
||||
attachTableStyler(this._profilerTable, this._themeService);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
|
||||
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
import { Dimension, Builder } from 'vs/base/browser/builder';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { EditorOptions } from 'vs/workbench/common/editor';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
@@ -138,13 +138,13 @@ export class ProfilerEditor extends BaseEditor {
|
||||
this._profilerEditorContextKey = CONTEXT_PROFILER_EDITOR.bindTo(this._contextKeyService);
|
||||
}
|
||||
|
||||
protected createEditor(parent: Builder): void {
|
||||
protected createEditor(parent: HTMLElement): void {
|
||||
// test backend
|
||||
//this._profilerService.registerProvider('default', this._instantiationService.createInstance(ProfilerTestBackend));
|
||||
|
||||
this._container = document.createElement('div');
|
||||
this._container.className = 'carbon-profiler';
|
||||
parent.append(this._container);
|
||||
parent.appendChild(this._container);
|
||||
|
||||
this._createHeader();
|
||||
|
||||
@@ -159,7 +159,7 @@ export class ProfilerEditor extends BaseEditor {
|
||||
300,
|
||||
tableContainer,
|
||||
() => this._profilerTableEditor.focus(),
|
||||
size => this._profilerTableEditor.layout(new Dimension(parseFloat(DOM.getComputedStyle(this._body).width), size)),
|
||||
size => this._profilerTableEditor.layout(new DOM.Dimension(parseFloat(DOM.getComputedStyle(this._body).width), size)),
|
||||
{}
|
||||
));
|
||||
|
||||
@@ -167,7 +167,7 @@ export class ProfilerEditor extends BaseEditor {
|
||||
300,
|
||||
paneContainer,
|
||||
() => this._tabbedPanel.focus(),
|
||||
size => this._tabbedPanel.layout(new Dimension(DOM.getTotalWidth(this._body), size)),
|
||||
size => this._tabbedPanel.layout(new DOM.Dimension(DOM.getTotalWidth(this._body), size)),
|
||||
{ minimumSize: 35 }
|
||||
);
|
||||
this._panelView.headerSize = 35;
|
||||
@@ -222,7 +222,7 @@ export class ProfilerEditor extends BaseEditor {
|
||||
profilerTableContainer.style.overflow = 'hidden';
|
||||
profilerTableContainer.style.position = 'relative';
|
||||
this._profilerTableEditor = this._instantiationService.createInstance(ProfilerTableEditor);
|
||||
this._profilerTableEditor.createEditor(new Builder(profilerTableContainer));
|
||||
this._profilerTableEditor.createEditor(profilerTableContainer);
|
||||
this._profilerTableEditor.onSelectedRowsChanged((e, args) => {
|
||||
let data = this.input.data.getItem(args.rows[0]);
|
||||
if (data) {
|
||||
@@ -302,7 +302,7 @@ export class ProfilerEditor extends BaseEditor {
|
||||
this._editor = this._instantiationService.createInstance(ProfilerResourceEditor);
|
||||
let editorContainer = document.createElement('div');
|
||||
editorContainer.className = 'profiler-editor';
|
||||
this._editor.create(new Builder(editorContainer));
|
||||
this._editor.create(editorContainer);
|
||||
this._editor.setVisible(true);
|
||||
this._editorInput = this._instantiationService.createInstance(UntitledEditorInput, URI.from({ scheme: Schemas.untitled }), false, 'sql', '', '');
|
||||
this._editor.setInput(this._editorInput, undefined);
|
||||
@@ -410,7 +410,7 @@ export class ProfilerEditor extends BaseEditor {
|
||||
}
|
||||
}
|
||||
|
||||
public layout(dimension: Dimension): void {
|
||||
public layout(dimension: DOM.Dimension): void {
|
||||
this._container.style.width = dimension.width + 'px';
|
||||
this._container.style.height = dimension.height + 'px';
|
||||
this._body.style.width = dimension.width + 'px';
|
||||
|
||||
@@ -14,7 +14,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { EditorInput } from 'vs/workbench/common/editor';
|
||||
import { IEditorModel } from 'vs/platform/editor/common/editor';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { IEditorOptions } from 'vs/editor/common/config/editorOptions';
|
||||
import * as nls from 'vs/nls';
|
||||
import { Dimension, Builder } from 'vs/base/browser/builder';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { ResourceEditorModel } from 'vs/workbench/common/editor/resourceEditorModel';
|
||||
@@ -56,8 +56,8 @@ export class ProfilerResourceEditor extends BaseTextEditor {
|
||||
super(ProfilerResourceEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService, editorGroupService);
|
||||
}
|
||||
|
||||
public createEditorControl(parent: Builder, configuration: IEditorOptions): editorCommon.IEditor {
|
||||
return this.instantiationService.createInstance(ProfilerResourceCodeEditor, parent.getHTMLElement(), configuration);
|
||||
public createEditorControl(parent: HTMLElement, configuration: IEditorOptions): editorCommon.IEditor {
|
||||
return this.instantiationService.createInstance(ProfilerResourceCodeEditor, parent, configuration);
|
||||
}
|
||||
|
||||
protected getConfigurationOverrides(): IEditorOptions {
|
||||
@@ -90,7 +90,7 @@ export class ProfilerResourceEditor extends BaseTextEditor {
|
||||
return nls.localize('profilerTextEditorAriaLabel', 'Profiler editor for event text. Readonly');
|
||||
}
|
||||
|
||||
public layout(dimension: Dimension) {
|
||||
public layout(dimension: DOM.Dimension) {
|
||||
this.getControl().layout(dimension);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorIn
|
||||
import { QueryResultsInput } from 'sql/parts/query/common/queryResultsInput';
|
||||
import { IQueryModelService } from 'sql/parts/query/execution/queryModel';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { ISelectionData, ExecutionPlanOptions } from 'sqlops';
|
||||
import { IQueryEditorService } from 'sql/parts/query/common/queryEditorService';
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'vs/css!sql/parts/query/editor/media/queryEditor';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { Builder, Dimension, withElementById } from 'vs/base/browser/builder';
|
||||
|
||||
import { EditorInput, EditorOptions } from 'vs/workbench/common/editor';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
@@ -65,7 +64,7 @@ export class QueryEditor extends BaseEditor {
|
||||
private _sash: IFlexibleSash;
|
||||
private _editorTopOffset: number;
|
||||
private _orientation: Orientation;
|
||||
private _dimension: Dimension;
|
||||
private _dimension: DOM.Dimension;
|
||||
|
||||
private _resultsEditor: QueryResultsEditor;
|
||||
private _resultsEditorContainer: HTMLElement;
|
||||
@@ -137,10 +136,10 @@ export class QueryEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to create the editor in the parent builder.
|
||||
* Called to create the editor in the parent element.
|
||||
*/
|
||||
public createEditor(parent: Builder): void {
|
||||
const parentElement = parent.getHTMLElement();
|
||||
public createEditor(parent: HTMLElement): void {
|
||||
const parentElement = parent;
|
||||
DOM.addClass(parentElement, 'side-by-side-editor');
|
||||
this._createTaskbar(parentElement);
|
||||
}
|
||||
@@ -244,7 +243,7 @@ export class QueryEditor extends BaseEditor {
|
||||
* Updates the internal variable keeping track of the editor's size, and re-calculates the sash position.
|
||||
* To be called when the container of this editor changes size.
|
||||
*/
|
||||
public layout(dimension: Dimension): void {
|
||||
public layout(dimension: DOM.Dimension): void {
|
||||
this._dimension = dimension;
|
||||
|
||||
if (this._sash) {
|
||||
@@ -301,7 +300,7 @@ export class QueryEditor extends BaseEditor {
|
||||
|
||||
this._createEditor(<QueryResultsInput>input.results, this._resultsEditorContainer)
|
||||
.then(result => {
|
||||
this._onResultsEditorCreated(<QueryResultsEditor>result, input.results, this.options);
|
||||
this._onResultsEditorCreated(<any>result, input.results, this.options);
|
||||
this.resultsEditorVisibility = true;
|
||||
this.hideQueryResultsView = false;
|
||||
this._doLayout(true);
|
||||
@@ -571,7 +570,7 @@ export class QueryEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
let editor = descriptor.instantiate(this._instantiationService);
|
||||
editor.create(new Builder(container));
|
||||
editor.create(container);
|
||||
editor.setVisible(this.isVisible(), this.position);
|
||||
return TPromise.as(editor);
|
||||
}
|
||||
@@ -596,7 +595,7 @@ export class QueryEditor extends BaseEditor {
|
||||
* Appends the HTML for the SQL editor. Creates new HTML every time.
|
||||
*/
|
||||
private _createSqlEditorContainer() {
|
||||
const parentElement = this.getContainer().getHTMLElement();
|
||||
const parentElement = this.getContainer();
|
||||
this._sqlEditorContainer = DOM.append(parentElement, DOM.$('.details-editor-container'));
|
||||
this._sqlEditorContainer.style.position = 'absolute';
|
||||
}
|
||||
@@ -609,7 +608,7 @@ export class QueryEditor extends BaseEditor {
|
||||
private _createResultsEditorContainer() {
|
||||
this._createSash();
|
||||
|
||||
const parentElement = this.getContainer().getHTMLElement();
|
||||
const parentElement = this.getContainer();
|
||||
let input = <QueryInput>this.input;
|
||||
|
||||
if (!input.results.container) {
|
||||
@@ -632,7 +631,7 @@ export class QueryEditor extends BaseEditor {
|
||||
*/
|
||||
private _createSash(): void {
|
||||
if (!this._sash) {
|
||||
let parentElement: HTMLElement = this.getContainer().getHTMLElement();
|
||||
let parentElement: HTMLElement = this.getContainer();
|
||||
|
||||
if (this._orientation === Orientation.HORIZONTAL) {
|
||||
this._sash = this._register(new HorizontalFlexibleSash(parentElement, this._minEditorSize));
|
||||
@@ -655,7 +654,7 @@ export class QueryEditor extends BaseEditor {
|
||||
if (this._orientation === Orientation.HORIZONTAL) {
|
||||
this._sash.setDimenesion(this._dimension);
|
||||
} else {
|
||||
this._sash.setDimenesion(new Dimension(this._dimension.width, this._dimension.height - this.getTaskBarHeight()));
|
||||
this._sash.setDimenesion(new DOM.Dimension(this._dimension.width, this._dimension.height - this.getTaskBarHeight()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -692,13 +691,13 @@ export class QueryEditor extends BaseEditor {
|
||||
|
||||
private _doLayoutHorizontal(): void {
|
||||
let splitPointTop: number = this._sash.getSplitPoint();
|
||||
let parent: ClientRect = this.getContainer().getHTMLElement().getBoundingClientRect();
|
||||
let parent: ClientRect = this.getContainer().getBoundingClientRect();
|
||||
|
||||
let sqlEditorHeight = splitPointTop - (parent.top + this.getTaskBarHeight());
|
||||
|
||||
let titleBar = withElementById('workbench.parts.titlebar');
|
||||
let titleBar = document.getElementById('workbench.parts.titlebar');
|
||||
if (titleBar) {
|
||||
sqlEditorHeight += DOM.getContentHeight(titleBar.getHTMLElement());
|
||||
sqlEditorHeight += DOM.getContentHeight(titleBar);
|
||||
}
|
||||
|
||||
let queryResultsEditorHeight = parent.bottom - splitPointTop;
|
||||
@@ -711,13 +710,13 @@ export class QueryEditor extends BaseEditor {
|
||||
this._resultsEditorContainer.style.width = `${this._dimension.width}px`;
|
||||
this._resultsEditorContainer.style.top = `${splitPointTop}px`;
|
||||
|
||||
this._sqlEditor.layout(new Dimension(this._dimension.width, sqlEditorHeight));
|
||||
this._resultsEditor.layout(new Dimension(this._dimension.width, queryResultsEditorHeight));
|
||||
this._sqlEditor.layout(new DOM.Dimension(this._dimension.width, sqlEditorHeight));
|
||||
this._resultsEditor.layout(new DOM.Dimension(this._dimension.width, queryResultsEditorHeight));
|
||||
}
|
||||
|
||||
private _doLayoutVertical(): void {
|
||||
let splitPointLeft: number = this._sash.getSplitPoint();
|
||||
let parent: ClientRect = this.getContainer().getHTMLElement().getBoundingClientRect();
|
||||
let parent: ClientRect = this.getContainer().getBoundingClientRect();
|
||||
|
||||
let sqlEditorWidth = splitPointLeft;
|
||||
let queryResultsEditorWidth = parent.width - splitPointLeft;
|
||||
@@ -732,8 +731,8 @@ export class QueryEditor extends BaseEditor {
|
||||
this._resultsEditorContainer.style.height = `${this._dimension.height - taskbarHeight}px`;
|
||||
this._resultsEditorContainer.style.left = `${splitPointLeft}px`;
|
||||
|
||||
this._sqlEditor.layout(new Dimension(sqlEditorWidth, this._dimension.height - taskbarHeight));
|
||||
this._resultsEditor.layout(new Dimension(queryResultsEditorWidth, this._dimension.height - taskbarHeight));
|
||||
this._sqlEditor.layout(new DOM.Dimension(sqlEditorWidth, this._dimension.height - taskbarHeight));
|
||||
this._resultsEditor.layout(new DOM.Dimension(queryResultsEditorWidth, this._dimension.height - taskbarHeight));
|
||||
}
|
||||
|
||||
private _doLayoutSql() {
|
||||
@@ -745,7 +744,7 @@ export class QueryEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
if (this._dimension) {
|
||||
this._sqlEditor.layout(new Dimension(this._dimension.width, this._dimension.height - this.getTaskBarHeight()));
|
||||
this._sqlEditor.layout(new DOM.Dimension(this._dimension.width, this._dimension.height - this.getTaskBarHeight()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -769,7 +768,7 @@ export class QueryEditor extends BaseEditor {
|
||||
this._resultsEditor = null;
|
||||
}
|
||||
|
||||
let thisEditorParent: HTMLElement = this.getContainer().getHTMLElement();
|
||||
let thisEditorParent: HTMLElement = this.getContainer();
|
||||
|
||||
if (this._sqlEditorContainer) {
|
||||
let sqlEditorParent: HTMLElement = this._sqlEditorContainer.parentElement;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Builder, Dimension } from 'vs/base/browser/builder';
|
||||
import { Builder } from 'vs/base/browser/builder';
|
||||
import { EditorOptions } from 'vs/workbench/common/editor';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
@@ -16,7 +16,7 @@ import { BareFontInfo } from 'vs/editor/common/config/fontInfo';
|
||||
import { getZoomLevel } from 'vs/base/browser/browser';
|
||||
import { Configuration } from 'vs/editor/browser/config/configuration';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
import { QueryResultsInput } from 'sql/parts/query/common/queryResultsInput';
|
||||
@@ -120,7 +120,7 @@ export class QueryResultsEditor extends BaseEditor {
|
||||
private applySettings() {
|
||||
if (this.input && this.input.container) {
|
||||
if (!this.input.css) {
|
||||
this.input.css = dom.createStyleSheet(this.input.container);
|
||||
this.input.css = DOM.createStyleSheet(this.input.container);
|
||||
}
|
||||
let cssRuleText = '';
|
||||
if (types.isNumber(this._rawOptions.cellPadding)) {
|
||||
@@ -134,10 +134,10 @@ export class QueryResultsEditor extends BaseEditor {
|
||||
}
|
||||
}
|
||||
|
||||
createEditor(parent: Builder): void {
|
||||
createEditor(parent: HTMLElement): void {
|
||||
}
|
||||
|
||||
layout(dimension: Dimension): void {
|
||||
layout(dimension: DOM.Dimension): void {
|
||||
}
|
||||
|
||||
setInput(input: QueryResultsInput, options: EditorOptions): TPromise<void> {
|
||||
@@ -172,7 +172,7 @@ export class QueryResultsEditor extends BaseEditor {
|
||||
let params: IQueryComponentParams = { dataService: dataService };
|
||||
this._instantiationService.invokeFunction(bootstrapAngular,
|
||||
QueryOutputModule,
|
||||
this.getContainer().getHTMLElement(),
|
||||
this.getContainer(),
|
||||
QUERY_OUTPUT_SELECTOR,
|
||||
params,
|
||||
input);
|
||||
|
||||
@@ -7,7 +7,7 @@ import QueryRunner from 'sql/parts/query/execution/queryRunner';
|
||||
import { DataService } from 'sql/parts/grid/services/dataService';
|
||||
import { ISlickRange } from 'angular2-slickgrid';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import Event from 'vs/base/common/event';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { QueryInput } from 'sql/parts/query/common/queryInput';
|
||||
import {
|
||||
ISelectionData,
|
||||
|
||||
@@ -21,7 +21,7 @@ import * as nls from 'vs/nls';
|
||||
import * as statusbar from 'vs/workbench/browser/parts/statusbar/statusbar';
|
||||
import * as platform from 'vs/platform/registry/common/platform';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
@@ -245,7 +245,7 @@ export class QueryEditorService implements IQueryEditorService {
|
||||
let index: number = group.indexOf(editor.input);
|
||||
let position: Position = editor.position;
|
||||
let options: IQueryEditorOptions = editor.options ? editor.options : {};
|
||||
options.index = index;
|
||||
options = Object.assign(options, { index: index });
|
||||
options.pinned = group.isPinned(index);
|
||||
|
||||
// Return a promise that will resovle when the old editor has been replaced by a new editor
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { Dimension } from 'vs/base/browser/dom';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { Dimension } from 'vs/base/browser/builder';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IHorizontalSashLayoutProvider, IVerticalSashLayoutProvider,
|
||||
ISashEvent, Orientation, VSash, Sash } from 'vs/base/browser/ui/sash/sash';
|
||||
// There is no need to import the sash CSS - 'vs/base/browser/ui/sash/sash' already includes it
|
||||
|
||||
@@ -150,7 +150,7 @@ export class PlanXmlParser {
|
||||
|
||||
this.doc = this.parser.parseFromString(planXml, 'application/xml');
|
||||
this.planXml = planXml;
|
||||
let queryPlanNode = this.findChildren(this.doc.childNodes[0], 'QueryPlan');
|
||||
let queryPlanNode = this.findChildren(this.doc.children[0], 'QueryPlan');
|
||||
if (queryPlanNode && queryPlanNode.length > 0) {
|
||||
this.root = new PlanNode();
|
||||
let ops = this.createPlanNodes(queryPlanNode[0], 'RelOp', this.root);
|
||||
@@ -192,25 +192,25 @@ export class PlanXmlParser {
|
||||
return list;
|
||||
}
|
||||
|
||||
private findChildren(node: Node, elementName: string, untilNode: string = undefined): Node[] {
|
||||
let nodes: Node[] = [];
|
||||
if (node === undefined) {
|
||||
private findChildren(element: Element, elementName: string, untilNode: string = undefined): Element[] {
|
||||
let elements: Element[] = [];
|
||||
if (element === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
for (var index = 0; index < node.childNodes.length; index++) {
|
||||
if (node.childNodes[index].nodeName.toLocaleLowerCase() === elementName.toLocaleLowerCase()) {
|
||||
nodes = nodes.concat(node.childNodes[index]);
|
||||
for (var index = 0; index < element.childNodes.length; index++) {
|
||||
if (element.childNodes[index].nodeName.toLocaleLowerCase() === elementName.toLocaleLowerCase()) {
|
||||
elements = elements.concat(element.children[index]);
|
||||
}
|
||||
}
|
||||
if (nodes.length > 0) {
|
||||
return nodes;
|
||||
if (elements.length > 0) {
|
||||
return elements;
|
||||
}
|
||||
for (var index = 0; index < node.childNodes.length; index++) {
|
||||
if (untilNode && node.childNodes[index].nodeName === untilNode) {
|
||||
for (var index = 0; index < element.childNodes.length; index++) {
|
||||
if (untilNode && element.childNodes[index].nodeName === untilNode) {
|
||||
continue;
|
||||
}
|
||||
let result = this.findChildren(node.childNodes[index], elementName, untilNode);
|
||||
let result = this.findChildren(element.children[index], elementName, untilNode);
|
||||
if (result !== undefined) {
|
||||
return result;
|
||||
}
|
||||
@@ -219,10 +219,10 @@ export class PlanXmlParser {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
private createPlanNodes(node: Node, elementName: string, root: PlanNode): PlanNode[] {
|
||||
private createPlanNodes(element: Element, elementName: string, root: PlanNode): PlanNode[] {
|
||||
let nodePlans: PlanNode[] = [];
|
||||
|
||||
let children = this.findChildren(node, elementName);
|
||||
let children = this.findChildren(element, elementName);
|
||||
if (children) {
|
||||
for (var index = 0; index < children.length; index++) {
|
||||
let childNode = children[index];
|
||||
@@ -249,38 +249,38 @@ export class PlanXmlParser {
|
||||
return nodePlans;
|
||||
}
|
||||
|
||||
private convertToPlanNode(node: Node): PlanNode {
|
||||
private convertToPlanNode(element: Element): PlanNode {
|
||||
let planNode = new PlanNode();
|
||||
planNode.id = this.findAttribute(node.attributes, 'NodeId');
|
||||
planNode.logicalOp = this.findAttribute(node.attributes, 'LogicalOp');
|
||||
planNode.physicalOp = this.findAttribute(node.attributes, 'PhysicalOp');
|
||||
planNode.subtreeCost = +this.findAttribute(node.attributes, 'EstimatedTotalSubtreeCost');
|
||||
planNode.estimateRows = this.findAttribute(node.attributes, 'EstimateRows');
|
||||
planNode.estimateCpu = this.findAttribute(node.attributes, 'EstimateCPU');
|
||||
planNode.estimateIo = this.findAttribute(node.attributes, 'EstimateIO');
|
||||
planNode.estimateRebinds = this.findAttribute(node.attributes, 'EstimateRebinds');
|
||||
planNode.estimateRewinds = this.findAttribute(node.attributes, 'EstimateRewinds');
|
||||
planNode.parallel = this.findAttribute(node.attributes, 'Parallel') === '1';
|
||||
planNode.partitioned = this.findAttribute(node.attributes, 'Partitioned') === '1';
|
||||
planNode.id = this.findAttribute(element.attributes, 'NodeId');
|
||||
planNode.logicalOp = this.findAttribute(element.attributes, 'LogicalOp');
|
||||
planNode.physicalOp = this.findAttribute(element.attributes, 'PhysicalOp');
|
||||
planNode.subtreeCost = +this.findAttribute(element.attributes, 'EstimatedTotalSubtreeCost');
|
||||
planNode.estimateRows = this.findAttribute(element.attributes, 'EstimateRows');
|
||||
planNode.estimateCpu = this.findAttribute(element.attributes, 'EstimateCPU');
|
||||
planNode.estimateIo = this.findAttribute(element.attributes, 'EstimateIO');
|
||||
planNode.estimateRebinds = this.findAttribute(element.attributes, 'EstimateRebinds');
|
||||
planNode.estimateRewinds = this.findAttribute(element.attributes, 'EstimateRewinds');
|
||||
planNode.parallel = this.findAttribute(element.attributes, 'Parallel') === '1';
|
||||
planNode.partitioned = this.findAttribute(element.attributes, 'Partitioned') === '1';
|
||||
return planNode;
|
||||
}
|
||||
|
||||
private convertToRuntimeInfo(node: Node): RuntimePerThread {
|
||||
private convertToRuntimeInfo(element: Element): RuntimePerThread {
|
||||
let runtimeNode = new RuntimePerThread();
|
||||
runtimeNode.actualExecutionMode = this.findAttribute(node.attributes, 'ActualExecutionMode');
|
||||
runtimeNode.actualExecutions = +this.findAttribute(node.attributes, 'ActualExecutions');
|
||||
runtimeNode.actualRow = +this.findAttribute(node.attributes, 'ActualRows');
|
||||
runtimeNode.threadId = +this.findAttribute(node.attributes, 'Thread');
|
||||
runtimeNode.actualExecutionMode = this.findAttribute(element.attributes, 'ActualExecutionMode');
|
||||
runtimeNode.actualExecutions = +this.findAttribute(element.attributes, 'ActualExecutions');
|
||||
runtimeNode.actualRow = +this.findAttribute(element.attributes, 'ActualRows');
|
||||
runtimeNode.threadId = +this.findAttribute(element.attributes, 'Thread');
|
||||
return runtimeNode;
|
||||
}
|
||||
|
||||
private convertToObject(node: Node): IndexObject {
|
||||
private convertToObject(element: Element): IndexObject {
|
||||
let objectNode = new IndexObject();
|
||||
objectNode.database = this.findAttribute(node.attributes, 'Database');
|
||||
objectNode.index = this.findAttribute(node.attributes, 'Index');
|
||||
objectNode.indexKind = this.findAttribute(node.attributes, 'IndexKind');
|
||||
objectNode.schema = this.findAttribute(node.attributes, 'Schema');
|
||||
objectNode.table = this.findAttribute(node.attributes, 'Table');
|
||||
objectNode.database = this.findAttribute(element.attributes, 'Database');
|
||||
objectNode.index = this.findAttribute(element.attributes, 'Index');
|
||||
objectNode.indexKind = this.findAttribute(element.attributes, 'IndexKind');
|
||||
objectNode.schema = this.findAttribute(element.attributes, 'Schema');
|
||||
objectNode.table = this.findAttribute(element.attributes, 'Table');
|
||||
return objectNode;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
import 'vs/css!sql/parts/query/editor/media/queryEditor';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Dimension, Builder } from 'vs/base/browser/builder';
|
||||
import { EditorOptions } from 'vs/workbench/common/editor';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
@@ -41,11 +40,11 @@ export class QueryPlanEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to create the editor in the parent builder.
|
||||
* Called to create the editor in the parent element.
|
||||
*/
|
||||
public createEditor(parent: Builder): void {
|
||||
public createEditor(parent: HTMLElement): void {
|
||||
//Enable scrollbars when drawing area is larger than viewport
|
||||
parent.overflow('auto');
|
||||
parent.style.overflow = 'auto';
|
||||
//Set background of parent to white (same as .qp-root from src\sql\parts\grid\load\css\qp.css)
|
||||
//This is because the bottom-most tooltips can extend past the drawing area, which causes the
|
||||
//scrolling area to have gaps on the bottom and left. So if the colors aren't matched then
|
||||
@@ -54,7 +53,7 @@ export class QueryPlanEditor extends BaseEditor {
|
||||
//during the load - but changing the background color was the simplest and least error prone
|
||||
//(plus it's probable that we won't be using this control in the future anyways if development)
|
||||
//continues on the Query plan feature
|
||||
parent.background('#fff');
|
||||
parent.style.background = '#fff';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,7 +66,7 @@ export class QueryPlanEditor extends BaseEditor {
|
||||
* Updates the internal variable keeping track of the editor's size, and re-calculates the sash position.
|
||||
* To be called when the container of this editor changes size.
|
||||
*/
|
||||
public layout(dimension: Dimension): void {
|
||||
public layout(dimension: DOM.Dimension): void {
|
||||
}
|
||||
|
||||
public setInput(input: QueryPlanInput, options: EditorOptions): TPromise<void> {
|
||||
@@ -78,7 +77,7 @@ export class QueryPlanEditor extends BaseEditor {
|
||||
if (!input.hasInitialized) {
|
||||
this.bootstrapAngular(input);
|
||||
}
|
||||
this.revealElementWithTagName(input.uniqueSelector, this.getContainer().getHTMLElement());
|
||||
this.revealElementWithTagName(input.uniqueSelector, this.getContainer());
|
||||
|
||||
return super.setInput(input, options);
|
||||
}
|
||||
@@ -114,7 +113,7 @@ export class QueryPlanEditor extends BaseEditor {
|
||||
|
||||
let uniqueSelector = this.instantiationService.invokeFunction(bootstrapAngular,
|
||||
QueryPlanModule,
|
||||
this.getContainer().getHTMLElement(),
|
||||
this.getContainer(),
|
||||
QUERYPLAN_SELECTOR,
|
||||
params);
|
||||
input.setUniqueSelector(uniqueSelector);
|
||||
|
||||
@@ -8,12 +8,12 @@ import * as sqlops from 'sqlops';
|
||||
import { TaskNode, TaskStatus, TaskExecutionMode } from 'sql/parts/taskHistory/common/taskNode';
|
||||
import { IQueryEditorService } from 'sql/parts/query/common/queryEditorService';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { localize } from 'vs/nls';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IChoiceService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||
|
||||
export const SERVICE_ID = 'taskHistoryService';
|
||||
export const ITaskService = createDecorator<ITaskService>(SERVICE_ID);
|
||||
@@ -51,7 +51,7 @@ export class TaskService implements ITaskService {
|
||||
|
||||
constructor(
|
||||
@ILifecycleService lifecycleService: ILifecycleService,
|
||||
@IChoiceService private choiceService: IChoiceService,
|
||||
@IDialogService private dialogService: IDialogService,
|
||||
@IQueryEditorService private queryEditorService: IQueryEditorService
|
||||
) {
|
||||
this._taskQueue = new TaskNode('Root', undefined, undefined);
|
||||
@@ -134,7 +134,7 @@ export class TaskService implements ITaskService {
|
||||
return new TPromise<boolean>((resolve, reject) => {
|
||||
let numOfInprogressTasks = this.getNumberOfInProgressTasks();
|
||||
if (numOfInprogressTasks > 0) {
|
||||
this.choiceService.choose(Severity.Warning, message, options, 0, false).done(choice => {
|
||||
this.dialogService.show(Severity.Warning, message, options).done(choice => {
|
||||
switch (choice) {
|
||||
case 0:
|
||||
let timeoutId: number;
|
||||
|
||||
@@ -73,7 +73,7 @@ export class TaskHistoryController extends treedefaults.DefaultController {
|
||||
getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id),
|
||||
onHide: (wasCancelled?: boolean) => {
|
||||
if (wasCancelled) {
|
||||
tree.DOMFocus();
|
||||
tree.domFocus();
|
||||
}
|
||||
},
|
||||
getActionsContext: () => (element)
|
||||
|
||||
@@ -107,7 +107,7 @@ export class TaskHistoryView {
|
||||
let targetsToExpand: any[];
|
||||
|
||||
// Focus
|
||||
this._tree.DOMFocus();
|
||||
this._tree.domFocus();
|
||||
|
||||
if (this._tree) {
|
||||
let selection = this._tree.getSelection();
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
import 'vs/css!sql/media/icons/common-icons';
|
||||
import 'vs/css!./media/taskHistoryViewlet';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Builder, Dimension } from 'vs/base/browser/builder';
|
||||
import { Viewlet } from 'vs/workbench/browser/viewlet';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
import { toggleClass } from 'vs/base/browser/dom';
|
||||
import { toggleClass, Dimension } from 'vs/base/browser/dom';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -52,11 +51,11 @@ export class TaskHistoryViewlet extends Viewlet {
|
||||
});
|
||||
}
|
||||
|
||||
public create(parent: Builder): TPromise<void> {
|
||||
public create(parent: HTMLElement): TPromise<void> {
|
||||
super.create(parent);
|
||||
this._root = parent.getHTMLElement();
|
||||
this._root = parent;
|
||||
this._taskHistoryView = this._instantiationService.createInstance(TaskHistoryView);
|
||||
this._taskHistoryView.renderBody(parent.getHTMLElement());
|
||||
this._taskHistoryView.renderBody(parent);
|
||||
|
||||
return TPromise.as(null);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import 'vs/css!sql/parts/query/editor/media/queryEditor';
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Dimension, Builder } from 'vs/base/browser/builder';
|
||||
import { Dimension } from 'vs/base/browser/dom';
|
||||
import { EditorOptions } from 'vs/workbench/common/editor';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
@@ -32,9 +32,9 @@ export class TaskDialogEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to create the editor in the parent builder.
|
||||
* Called to create the editor in the parent element.
|
||||
*/
|
||||
public createEditor(parent: Builder): void {
|
||||
public createEditor(parent: HTMLElement): void {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,7 +58,7 @@ export class TaskDialogEditor extends BaseEditor {
|
||||
if (!input.hasInitialized) {
|
||||
this.bootstrapAngular(input);
|
||||
}
|
||||
this.revealElementWithTagName(input.uniqueSelector, this.getContainer().getHTMLElement());
|
||||
this.revealElementWithTagName(input.uniqueSelector, this.getContainer());
|
||||
|
||||
return super.setInput(input, options);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ export class TaskDialogEditor extends BaseEditor {
|
||||
};
|
||||
let uniqueSelector = this.instantiationService.invokeFunction(bootstrapAngular,
|
||||
TaskDialogModule,
|
||||
this.getContainer().getHTMLElement(),
|
||||
this.getContainer(),
|
||||
TASKDIALOG_SELECTOR,
|
||||
params);
|
||||
input.setUniqueSelector(uniqueSelector);
|
||||
|
||||
Reference in New Issue
Block a user