mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge VS Code 1.21 source code (#1067)
* Initial VS Code 1.21 file copy with patches * A few more merges * Post npm install * Fix batch of build breaks * Fix more build breaks * Fix more build errors * Fix more build breaks * Runtime fixes 1 * Get connection dialog working with some todos * Fix a few packaging issues * Copy several node_modules to package build to fix loader issues * Fix breaks from master * A few more fixes * Make tests pass * First pass of license header updates * Second pass of license header updates * Fix restore dialog issues * Remove add additional themes menu items * fix select box issues where the list doesn't show up * formatting * Fix editor dispose issue * Copy over node modules to correct location on all platforms
This commit is contained in:
@@ -5,10 +5,8 @@
|
||||
import * as types from 'vs/base/common/types';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { Severity } from 'vs/platform/message/common/message';
|
||||
import { error } from 'sql/base/common/log';
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
import { WidgetConfig } from 'sql/parts/dashboard/common/dashboardWidget';
|
||||
import { Extensions, IInsightRegistry } from 'sql/platform/dashboard/common/insightRegistry';
|
||||
import { ConnectionManagementInfo } from 'sql/parts/connection/common/connectionManagementInfo';
|
||||
|
||||
@@ -27,7 +27,6 @@ import { AngularDisposable } from 'sql/base/common/lifecycle';
|
||||
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import * as types from 'vs/base/common/types';
|
||||
import { Severity } from 'vs/platform/message/common/message';
|
||||
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import * as nls from 'vs/nls';
|
||||
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
|
||||
@@ -39,6 +38,7 @@ import * as objects from 'vs/base/common/objects';
|
||||
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';
|
||||
|
||||
const dashboardRegistry = Registry.as<IDashboardRegistry>(DashboardExtensions.DashboardContributions);
|
||||
|
||||
@@ -97,7 +97,10 @@ export abstract class DashboardPage extends AngularDisposable {
|
||||
protected init() {
|
||||
this.dashboardService.dashboardContextKey.set(this.context);
|
||||
if (!this.dashboardService.connectionManagementService.connectionInfo) {
|
||||
this.dashboardService.messageService.show(Severity.Warning, nls.localize('missingConnectionInfo', 'No connection information could be found for this dashboard'));
|
||||
this.dashboardService.notificationService.notify({
|
||||
severity: Severity.Error,
|
||||
message: nls.localize('missingConnectionInfo', 'No connection information could be found for this dashboard')
|
||||
});
|
||||
} else {
|
||||
let tempWidgets = this.dashboardService.getSettings<Array<WidgetConfig>>([this.context, 'widgets'].join('.'));
|
||||
this._widgetConfigLocation = 'default';
|
||||
|
||||
@@ -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 { IExtensionPointUser, ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry';
|
||||
import { IExtensionPointUser, ExtensionsRegistry } from 'vs/workbench/services/extensions/common/extensionsRegistry';
|
||||
import { IJSONSchema } from 'vs/base/common/jsonSchema';
|
||||
import { localize } from 'vs/nls';
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
@@ -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 { IExtensionPointUser, ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry';
|
||||
import { IExtensionPointUser, ExtensionsRegistry } from 'vs/workbench/services/extensions/common/extensionsRegistry';
|
||||
import { IJSONSchema } from 'vs/base/common/jsonSchema';
|
||||
import { localize } from 'vs/nls';
|
||||
import { join } from 'path';
|
||||
|
||||
@@ -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 { IExtensionPointUser } from 'vs/platform/extensions/common/extensionsRegistry';
|
||||
import { IExtensionPointUser } from 'vs/workbench/services/extensions/common/extensionsRegistry';
|
||||
import { IJSONSchema } from 'vs/base/common/jsonSchema';
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
|
||||
@@ -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 { IExtensionPointUser } from 'vs/platform/extensions/common/extensionsRegistry';
|
||||
import { IExtensionPointUser } from 'vs/workbench/services/extensions/common/extensionsRegistry';
|
||||
import { IJSONSchema } from 'vs/base/common/jsonSchema';
|
||||
import * as nls from 'vs/nls';
|
||||
import { join } from 'path';
|
||||
|
||||
@@ -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 { IExtensionPointUser } from 'vs/platform/extensions/common/extensionsRegistry';
|
||||
import { IExtensionPointUser } from 'vs/workbench/services/extensions/common/extensionsRegistry';
|
||||
import { IJSONSchema } from 'vs/base/common/jsonSchema';
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
|
||||
@@ -7,7 +7,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 { Webview } from 'vs/workbench/parts/html/browser/webview';
|
||||
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';
|
||||
@@ -80,7 +80,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
public setHtml(html: string): void {
|
||||
this._html = html;
|
||||
if (this._webview) {
|
||||
this._webview.contents = [html];
|
||||
this._webview.contents = html;
|
||||
this._webview.layout();
|
||||
}
|
||||
}
|
||||
@@ -102,21 +102,24 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
|
||||
this._webview = new Webview(this._el.nativeElement,
|
||||
this._dashboardService.partService.getContainer(Parts.EDITOR_PART),
|
||||
this._dashboardService.themeService,
|
||||
this._dashboardService.environmentService,
|
||||
this._dashboardService.contextViewService,
|
||||
undefined,
|
||||
undefined,
|
||||
{
|
||||
allowScripts: true,
|
||||
enableWrappedPostMessage: true,
|
||||
hideFind: true
|
||||
enableWrappedPostMessage: true
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
this._onMessageDisposable = this._webview.onMessage(e => {
|
||||
this._onMessage.fire(e);
|
||||
});
|
||||
this._webview.style(this._dashboardService.themeService.getTheme());
|
||||
if (this._html) {
|
||||
this._webview.contents = [this._html];
|
||||
this._webview.contents = this._html;
|
||||
}
|
||||
this._webview.layout();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import { ConfigurationEditingService, IConfigurationValue } from 'vs/workbench/services/configuration/node/configurationEditingService';
|
||||
import { IMessageService } from 'vs/platform/message/common/message';
|
||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
@@ -46,6 +45,8 @@ import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
import { deepClone } from 'vs/base/common/objects';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IContextKeyService, RawContextKey, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
|
||||
const DASHBOARD_SETTINGS = 'dashboard';
|
||||
|
||||
@@ -131,7 +132,7 @@ export class DashboardServiceInterface extends AngularDisposable {
|
||||
private _configService = this._bootstrapService.configurationService;
|
||||
private _insightsDialogService = this._bootstrapService.insightsDialogService;
|
||||
private _contextViewService = this._bootstrapService.contextViewService;
|
||||
private _messageService = this._bootstrapService.messageService;
|
||||
private _notificationService = this._bootstrapService.notificationService;
|
||||
private _workspaceContextService = this._bootstrapService.workspaceContextService;
|
||||
private _storageService = this._bootstrapService.storageService;
|
||||
private _capabilitiesService = this._bootstrapService.capabilitiesService;
|
||||
@@ -140,6 +141,7 @@ export class DashboardServiceInterface extends AngularDisposable {
|
||||
private _dashboardWebviewService = this._bootstrapService.dashboardWebviewService;
|
||||
private _partService = this._bootstrapService.partService;
|
||||
private _angularEventingService = this._bootstrapService.angularEventingService;
|
||||
private _environmentService = this._bootstrapService.environmentService;
|
||||
|
||||
/* Special Services */
|
||||
private _metadataService: SingleConnectionMetadataService;
|
||||
@@ -177,8 +179,8 @@ export class DashboardServiceInterface extends AngularDisposable {
|
||||
super();
|
||||
}
|
||||
|
||||
public get messageService(): IMessageService {
|
||||
return this._messageService;
|
||||
public get notificationService(): INotificationService {
|
||||
return this._notificationService;
|
||||
}
|
||||
|
||||
public get configurationEditingService(): ConfigurationEditingService {
|
||||
@@ -229,6 +231,10 @@ export class DashboardServiceInterface extends AngularDisposable {
|
||||
return this._queryManagementService;
|
||||
}
|
||||
|
||||
public get environmentService(): IEnvironmentService {
|
||||
return this._environmentService;
|
||||
}
|
||||
|
||||
public get contextViewService(): IContextViewService {
|
||||
return this._contextViewService;
|
||||
}
|
||||
@@ -329,11 +335,17 @@ export class DashboardServiceInterface extends AngularDisposable {
|
||||
this._router.navigate(['database-dashboard']);
|
||||
}
|
||||
} else {
|
||||
this.messageService.show(Severity.Error, nls.localize('dashboard.changeDatabaseFailure', "Failed to change database"));
|
||||
this._notificationService.notify({
|
||||
severity: Severity.Error,
|
||||
message: nls.localize('dashboard.changeDatabaseFailure', "Failed to change database")
|
||||
});
|
||||
}
|
||||
},
|
||||
() => {
|
||||
this.messageService.show(Severity.Error, nls.localize('dashboard.changeDatabaseFailure', "Failed to change database"));
|
||||
this._notificationService.notify({
|
||||
severity: Severity.Error,
|
||||
message: nls.localize('dashboard.changeDatabaseFailure', "Failed to change database")
|
||||
});
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Extensions as InsightExtensions, IInsightRegistry } from 'sql/platform/
|
||||
import { IInsightsConfig } from './interfaces';
|
||||
import { insightsContribution, insightsSchema } from 'sql/parts/dashboard/widgets/insights/insightsWidgetSchemas';
|
||||
|
||||
import { IExtensionPointUser, ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry';
|
||||
import { IExtensionPointUser, ExtensionsRegistry } from 'vs/workbench/services/extensions/common/extensionsRegistry';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
|
||||
const insightRegistry = Registry.as<IInsightRegistry>(InsightExtensions.InsightContribution);
|
||||
|
||||
@@ -127,8 +127,10 @@ export class TasksWidget extends DashboardWidget implements IDashboardWidget, On
|
||||
let label = $('div').safeInnerHtml(types.isString(action.title) ? action.title : action.title.value);
|
||||
let tile = $('div.task-tile').style('height', this._size + 'px').style('width', this._size + 'px');
|
||||
let innerTile = $('div');
|
||||
if (action.iconClass) {
|
||||
let icon = $('span.icon').addClass(action.iconClass);
|
||||
|
||||
// @SQLTODO - iconPath shouldn't be used as a CSS class
|
||||
if (action.iconPath && action.iconPath.dark) {
|
||||
let icon = $('span.icon').addClass(action.iconPath.dark);
|
||||
innerTile.append(icon);
|
||||
}
|
||||
innerTile.append(label);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { Component, Inject, forwardRef, ChangeDetectorRef, OnInit, ViewChild, ElementRef } from '@angular/core';
|
||||
|
||||
import Webview from 'vs/workbench/parts/html/browser/webview';
|
||||
import { Webview } from 'vs/workbench/parts/html/browser/webview';
|
||||
import { Parts } from 'vs/workbench/services/part/common/partService';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
@@ -58,7 +58,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
public setHtml(html: string): void {
|
||||
this._html = html;
|
||||
if (this._webview) {
|
||||
this._webview.contents = [html];
|
||||
this._webview.contents = html;
|
||||
this._webview.layout();
|
||||
}
|
||||
}
|
||||
@@ -96,15 +96,17 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
if (this._onMessageDisposable) {
|
||||
this._onMessageDisposable.dispose();
|
||||
}
|
||||
this._webview = new Webview(this._el.nativeElement,
|
||||
this._webview = new Webview(
|
||||
this._el.nativeElement,
|
||||
this._dashboardService.partService.getContainer(Parts.EDITOR_PART),
|
||||
this._dashboardService.themeService,
|
||||
this._dashboardService.environmentService,
|
||||
this._dashboardService.contextViewService,
|
||||
undefined,
|
||||
undefined,
|
||||
{
|
||||
allowScripts: true,
|
||||
enableWrappedPostMessage: true,
|
||||
hideFind: true
|
||||
enableWrappedPostMessage: true
|
||||
}
|
||||
);
|
||||
this._onMessageDisposable = this._webview.onMessage(e => {
|
||||
@@ -112,7 +114,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
});
|
||||
this._webview.style(this._dashboardService.themeService.getTheme());
|
||||
if (this._html) {
|
||||
this._webview.contents = [this._html];
|
||||
this._webview.contents = this._html;
|
||||
}
|
||||
this._webview.layout();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user