mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-11 12:01:38 -04: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:
@@ -1,7 +1,7 @@
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
|
||||
@@ -17,7 +17,7 @@ export class MainThreadDashboard implements MainThreadDashboardShape {
|
||||
context: IExtHostContext,
|
||||
@IDashboardService private _dashboardService: IDashboardService
|
||||
) {
|
||||
this._proxy = context.get(SqlExtHostContext.ExtHostDashboard);
|
||||
this._proxy = context.getProxy(SqlExtHostContext.ExtHostDashboard);
|
||||
_dashboardService.onDidChangeToDashboard(e => {
|
||||
this._proxy.$onDidChangeToDashboard(e);
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
import { WebViewDialog } from 'sql/base/browser/ui/modal/webViewDialog';
|
||||
@@ -22,7 +22,7 @@ export class MainThreadModalDialog implements MainThreadModalDialogShape {
|
||||
@IWorkbenchEditorService private readonly _editorService: IWorkbenchEditorService,
|
||||
@IInstantiationService private readonly _instantiationService: IInstantiationService
|
||||
) {
|
||||
this._proxy = context.get(SqlExtHostContext.ExtHostModalDialogs);
|
||||
this._proxy = context.getProxy(SqlExtHostContext.ExtHostModalDialogs);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
|
||||
@@ -32,7 +32,7 @@ export class MainThreadTasks implements MainThreadTasksShape {
|
||||
constructor(
|
||||
extHostContext: IExtHostContext
|
||||
) {
|
||||
this._proxy = extHostContext.get(SqlExtHostContext.ExtHostTasks);
|
||||
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostTasks);
|
||||
}
|
||||
|
||||
dispose() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@@ -7,22 +7,22 @@
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { Disposable } from 'vs/workbench/api/node/extHostTypes';
|
||||
import {
|
||||
ExtHostAccountManagementShape,
|
||||
MainThreadAccountManagementShape,
|
||||
SqlMainContext,
|
||||
} from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
|
||||
export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
|
||||
private _handlePool: number = 0;
|
||||
private _proxy: MainThreadAccountManagementShape;
|
||||
private _providers: { [handle: number]: AccountProviderWithMetadata } = {};
|
||||
|
||||
constructor(threadService: IThreadService) {
|
||||
constructor(mainContext: IMainContext) {
|
||||
super();
|
||||
this._proxy = threadService.get(SqlMainContext.MainThreadAccountManagement);
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadAccountManagement);
|
||||
}
|
||||
|
||||
// PUBLIC METHODS //////////////////////////////////////////////////////
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { ExtHostConnectionManagementShape, SqlMainContext, MainThreadConnectionManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import * as sqlops from 'sqlops';
|
||||
|
||||
export class ExtHostConnectionManagement extends ExtHostConnectionManagementShape {
|
||||
@@ -13,10 +13,10 @@ export class ExtHostConnectionManagement extends ExtHostConnectionManagementShap
|
||||
private _proxy: MainThreadConnectionManagementShape;
|
||||
|
||||
constructor(
|
||||
threadService: IThreadService
|
||||
mainContext: IMainContext
|
||||
) {
|
||||
super();
|
||||
this._proxy = threadService.get(SqlMainContext.MainThreadConnectionManagement);
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadConnectionManagement);
|
||||
}
|
||||
|
||||
public $getActiveConnections(): Thenable<sqlops.connection.Connection[]> {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
'use strict';
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import { SqlMainContext, MainThreadCredentialManagementShape, ExtHostCredentialManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import * as vscode from 'vscode';
|
||||
import * as sqlops from 'sqlops';
|
||||
@@ -41,12 +41,12 @@ export class ExtHostCredentialManagement extends ExtHostCredentialManagementShap
|
||||
private _registrationPromise: Promise<void>;
|
||||
private _registrationPromiseResolve;
|
||||
|
||||
constructor(threadService: IThreadService) {
|
||||
constructor(mainContext: IMainContext) {
|
||||
super();
|
||||
|
||||
let self = this;
|
||||
|
||||
this._proxy = threadService.get(SqlMainContext.MainThreadCredentialManagement);
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadCredentialManagement);
|
||||
|
||||
// Create a promise to resolve when a credential provider has been registered.
|
||||
// HACK: this gives us a deferred promise
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
@@ -20,8 +20,8 @@ export class ExtHostDashboard implements ExtHostDashboardShape {
|
||||
|
||||
private _proxy: MainThreadDashboardShape;
|
||||
|
||||
constructor(threadService: IThreadService) {
|
||||
this._proxy = threadService.get(SqlMainContext.MainThreadDashboard);
|
||||
constructor(mainContext: IMainContext) {
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadDashboard);
|
||||
}
|
||||
|
||||
$onDidOpenDashboard(dashboard: sqlops.DashboardDocument) {
|
||||
|
||||
@@ -67,7 +67,7 @@ export class ExtHostDashboardWebviews implements ExtHostDashboardWebviewsShape {
|
||||
constructor(
|
||||
mainContext: IMainContext
|
||||
) {
|
||||
this._proxy = mainContext.get(SqlMainContext.MainThreadDashboardWebview);
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadDashboardWebview);
|
||||
}
|
||||
|
||||
$onMessage(handle: number, message: any): void {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
'use strict';
|
||||
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import { SqlMainContext, MainThreadDataProtocolShape, ExtHostDataProtocolShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import * as vscode from 'vscode';
|
||||
import * as sqlops from 'sqlops';
|
||||
@@ -23,10 +23,10 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
private _adapter = new Map<number, sqlops.DataProvider>();
|
||||
|
||||
constructor(
|
||||
threadService: IThreadService
|
||||
mainContext: IMainContext
|
||||
) {
|
||||
super();
|
||||
this._proxy = threadService.get(SqlMainContext.MainThreadDataProtocol);
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadDataProtocol);
|
||||
}
|
||||
|
||||
private _createDisposable(handle: number): Disposable {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
@@ -92,7 +92,7 @@ export class ExtHostModalDialogs implements ExtHostModalDialogsShape {
|
||||
constructor(
|
||||
mainContext: IMainContext
|
||||
) {
|
||||
this._proxy = mainContext.get(SqlMainContext.MainThreadModalDialog);
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadModalDialog);
|
||||
}
|
||||
|
||||
createDialog(
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import { ExtHostObjectExplorerShape, SqlMainContext, MainThreadObjectExplorerShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as vscode from 'vscode';
|
||||
@@ -14,9 +14,9 @@ export class ExtHostObjectExplorer implements ExtHostObjectExplorerShape {
|
||||
private _proxy: MainThreadObjectExplorerShape;
|
||||
|
||||
constructor(
|
||||
threadService: IThreadService
|
||||
mainContext: IMainContext
|
||||
) {
|
||||
this._proxy = threadService.get(SqlMainContext.MainThreadObjectExplorer);
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadObjectExplorer);
|
||||
}
|
||||
|
||||
public $getNode(connectionId: string, nodePath?: string): Thenable<sqlops.objectexplorer.ObjectExplorerNode> {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import { Disposable } from 'vs/workbench/api/node/extHostTypes';
|
||||
import {
|
||||
ExtHostResourceProviderShape,
|
||||
@@ -20,9 +20,9 @@ export class ExtHostResourceProvider extends ExtHostResourceProviderShape {
|
||||
private _proxy: MainThreadResourceProviderShape;
|
||||
private _providers: { [handle: number]: ResourceProviderWithMetadata } = {};
|
||||
|
||||
constructor(threadService: IThreadService) {
|
||||
constructor(mainContext: IMainContext) {
|
||||
super();
|
||||
this._proxy = threadService.get(SqlMainContext.MainThreadResourceProvider);
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadResourceProvider);
|
||||
}
|
||||
|
||||
// PUBLIC METHODS //////////////////////////////////////////////////////
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
'use strict';
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import { SqlMainContext, MainThreadSerializationProviderShape, ExtHostSerializationProviderShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import * as vscode from 'vscode';
|
||||
import * as sqlops from 'sqlops';
|
||||
@@ -53,10 +53,10 @@ export class ExtHostSerializationProvider extends ExtHostSerializationProviderSh
|
||||
}
|
||||
|
||||
constructor(
|
||||
threadService: IThreadService
|
||||
mainContext: IMainContext
|
||||
) {
|
||||
super();
|
||||
this._proxy = threadService.get(SqlMainContext.MainThreadSerializationProvider);
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadSerializationProvider);
|
||||
}
|
||||
|
||||
public $registerSerializationProvider(provider: sqlops.SerializationProvider): vscode.Disposable {
|
||||
|
||||
@@ -29,7 +29,7 @@ export class ExtHostTasks implements ExtHostTasksShape {
|
||||
mainContext: IMainContext,
|
||||
private logService: ILogService
|
||||
) {
|
||||
this._proxy = mainContext.get(SqlMainContext.MainThreadTasks);
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadTasks);
|
||||
}
|
||||
|
||||
registerTask(id: string, callback: sqlops.tasks.ITaskHandler, thisArg?: any, description?: ITaskHandlerDescription): extHostTypes.Disposable {
|
||||
|
||||
@@ -29,7 +29,7 @@ export class MainThreadAccountManagement implements MainThreadAccountManagementS
|
||||
) {
|
||||
this._providerMetadata = {};
|
||||
if (extHostContext) {
|
||||
this._proxy = extHostContext.get(SqlExtHostContext.ExtHostAccountManagement);
|
||||
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostAccountManagement);
|
||||
}
|
||||
this._toDispose = [];
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ export class MainThreadConnectionManagement implements MainThreadConnectionManag
|
||||
@IWorkbenchEditorService private _workbenchEditorService: IWorkbenchEditorService
|
||||
) {
|
||||
if (extHostContext) {
|
||||
this._proxy = extHostContext.get(SqlExtHostContext.ExtHostConnectionManagement);
|
||||
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostConnectionManagement);
|
||||
}
|
||||
this._toDispose = [];
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ export class MainThreadCredentialManagement implements MainThreadCredentialManag
|
||||
@ICredentialsService private credentialService: ICredentialsService
|
||||
) {
|
||||
if (extHostContext) {
|
||||
this._proxy = extHostContext.get(SqlExtHostContext.ExtHostCredentialManagement);
|
||||
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostCredentialManagement);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export class MainThreadDashboardWebview implements MainThreadDashboardWebviewSha
|
||||
context: IExtHostContext,
|
||||
@IDashboardWebviewService webviewService: IDashboardWebviewService
|
||||
) {
|
||||
this._proxy = context.get(SqlExtHostContext.ExtHostDashboardWebviews);
|
||||
this._proxy = context.getProxy(SqlExtHostContext.ExtHostDashboardWebviews);
|
||||
webviewService.onRegisteredWebview(e => {
|
||||
if (this.knownWidgets.includes(e.id)) {
|
||||
let handle = MainThreadDashboardWebview._handlePool++;
|
||||
|
||||
@@ -27,7 +27,6 @@ import { ISerializationService } from 'sql/services/serialization/serializationS
|
||||
import { IFileBrowserService } from 'sql/parts/fileBrowser/common/interfaces';
|
||||
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
|
||||
import { IMessageService } from 'vs/platform/message/common/message';
|
||||
import severity from 'vs/base/common/severity';
|
||||
|
||||
/**
|
||||
@@ -57,11 +56,10 @@ export class MainThreadDataProtocol implements MainThreadDataProtocolShape {
|
||||
@ITaskService private _taskService: ITaskService,
|
||||
@IProfilerService private _profilerService: IProfilerService,
|
||||
@ISerializationService private _serializationService: ISerializationService,
|
||||
@IFileBrowserService private _fileBrowserService: IFileBrowserService,
|
||||
@IMessageService private _messageService: IMessageService
|
||||
@IFileBrowserService private _fileBrowserService: IFileBrowserService
|
||||
) {
|
||||
if (extHostContext) {
|
||||
this._proxy = extHostContext.get(SqlExtHostContext.ExtHostDataProtocol);
|
||||
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostDataProtocol);
|
||||
}
|
||||
if (this._connectionManagementService) {
|
||||
this._connectionManagementService.onLanguageFlavorChanged(e => this._proxy.$languageFlavorChanged(e), this, this._toDispose);
|
||||
|
||||
@@ -29,7 +29,7 @@ export class MainThreadObjectExplorer implements MainThreadObjectExplorerShape {
|
||||
@IWorkbenchEditorService private _workbenchEditorService: IWorkbenchEditorService
|
||||
) {
|
||||
if (extHostContext) {
|
||||
this._proxy = extHostContext.get(SqlExtHostContext.ExtHostObjectExplorer);
|
||||
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostObjectExplorer);
|
||||
}
|
||||
this._toDispose = [];
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export class MainThreadResourceProvider implements MainThreadResourceProviderSha
|
||||
) {
|
||||
this._providerMetadata = {};
|
||||
if (extHostContext) {
|
||||
this._proxy = extHostContext.get(SqlExtHostContext.ExtHostResourceProvider);
|
||||
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostResourceProvider);
|
||||
}
|
||||
this._toDispose = [];
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export class MainThreadSerializationProvider implements MainThreadSerializationP
|
||||
|
||||
) {
|
||||
if (extHostContext) {
|
||||
this._proxy = extHostContext.get(SqlExtHostContext.ExtHostSerializationProvider);
|
||||
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostSerializationProvider);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
import * as extHostApi from 'vs/workbench/api/node/extHost.api.impl';
|
||||
import { TrieMap } from 'sql/base/common/map';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IInitData } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import { IInitData, IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService';
|
||||
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
||||
import { IExtensionDescription } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { realpath } from 'fs';
|
||||
import * as extHostTypes from 'vs/workbench/api/node/extHostTypes';
|
||||
|
||||
@@ -21,17 +21,16 @@ import { ExtHostCredentialManagement } from 'sql/workbench/api/node/extHostCrede
|
||||
import { ExtHostDataProtocol } from 'sql/workbench/api/node/extHostDataProtocol';
|
||||
import { ExtHostSerializationProvider } from 'sql/workbench/api/node/extHostSerializationProvider';
|
||||
import { ExtHostResourceProvider } from 'sql/workbench/api/node/extHostResourceProvider';
|
||||
import { ExtHostThreadService } from 'vs/workbench/services/thread/node/extHostThreadService';
|
||||
import * as sqlExtHostTypes from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace';
|
||||
import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration';
|
||||
import { ExtHostModalDialogs } from 'sql/workbench/api/node/extHostModalDialog';
|
||||
import { ExtHostTasks } from 'sql/workbench/api/node/extHostTasks';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { ExtHostDashboardWebviews } from 'sql/workbench/api/node/extHostDashboardWebview';
|
||||
import { ExtHostConnectionManagement } from 'sql/workbench/api/node/extHostConnectionManagement';
|
||||
import { ExtHostDashboard } from 'sql/workbench/api/node/extHostDashboard';
|
||||
import { ExtHostObjectExplorer } from 'sql/workbench/api/node/extHostObjectExplorer';
|
||||
import { ExtHostLogService } from 'vs/workbench/api/node/extHostLogService';
|
||||
|
||||
export interface ISqlExtensionApiFactory {
|
||||
vsCodeFactory(extension: IExtensionDescription): typeof vscode;
|
||||
@@ -43,26 +42,26 @@ export interface ISqlExtensionApiFactory {
|
||||
*/
|
||||
export function createApiFactory(
|
||||
initData: IInitData,
|
||||
threadService: ExtHostThreadService,
|
||||
rpcProtocol: IExtHostContext,
|
||||
extHostWorkspace: ExtHostWorkspace,
|
||||
extHostConfiguration: ExtHostConfiguration,
|
||||
extensionService: ExtHostExtensionService,
|
||||
logService: ILogService
|
||||
logService: ExtHostLogService
|
||||
): ISqlExtensionApiFactory {
|
||||
let vsCodeFactory = extHostApi.createApiFactory(initData, threadService, extHostWorkspace, extHostConfiguration, extensionService, logService);
|
||||
let vsCodeFactory = extHostApi.createApiFactory(initData, rpcProtocol, extHostWorkspace, extHostConfiguration, extensionService, logService);
|
||||
|
||||
// Addressable instances
|
||||
const extHostAccountManagement = threadService.set(SqlExtHostContext.ExtHostAccountManagement, new ExtHostAccountManagement(threadService));
|
||||
const extHostConnectionManagement = threadService.set(SqlExtHostContext.ExtHostConnectionManagement, new ExtHostConnectionManagement(threadService));
|
||||
const extHostCredentialManagement = threadService.set(SqlExtHostContext.ExtHostCredentialManagement, new ExtHostCredentialManagement(threadService));
|
||||
const extHostDataProvider = threadService.set(SqlExtHostContext.ExtHostDataProtocol, new ExtHostDataProtocol(threadService));
|
||||
const extHostObjectExplorer = threadService.set(SqlExtHostContext.ExtHostObjectExplorer, new ExtHostObjectExplorer(threadService));
|
||||
const extHostSerializationProvider = threadService.set(SqlExtHostContext.ExtHostSerializationProvider, new ExtHostSerializationProvider(threadService));
|
||||
const extHostResourceProvider = threadService.set(SqlExtHostContext.ExtHostResourceProvider, new ExtHostResourceProvider(threadService));
|
||||
const extHostModalDialogs = threadService.set(SqlExtHostContext.ExtHostModalDialogs, new ExtHostModalDialogs(threadService));
|
||||
const extHostTasks = threadService.set(SqlExtHostContext.ExtHostTasks, new ExtHostTasks(threadService, logService));
|
||||
const extHostWebviewWidgets = threadService.set(SqlExtHostContext.ExtHostDashboardWebviews, new ExtHostDashboardWebviews(threadService));
|
||||
const extHostDashboard = threadService.set(SqlExtHostContext.ExtHostDashboard, new ExtHostDashboard(threadService));
|
||||
const extHostAccountManagement = rpcProtocol.set(SqlExtHostContext.ExtHostAccountManagement, new ExtHostAccountManagement(rpcProtocol));
|
||||
const extHostConnectionManagement = rpcProtocol.set(SqlExtHostContext.ExtHostConnectionManagement, new ExtHostConnectionManagement(rpcProtocol));
|
||||
const extHostCredentialManagement = rpcProtocol.set(SqlExtHostContext.ExtHostCredentialManagement, new ExtHostCredentialManagement(rpcProtocol));
|
||||
const extHostDataProvider = rpcProtocol.set(SqlExtHostContext.ExtHostDataProtocol, new ExtHostDataProtocol(rpcProtocol));
|
||||
const extHostObjectExplorer = rpcProtocol.set(SqlExtHostContext.ExtHostObjectExplorer, new ExtHostObjectExplorer(rpcProtocol));
|
||||
const extHostSerializationProvider = rpcProtocol.set(SqlExtHostContext.ExtHostSerializationProvider, new ExtHostSerializationProvider(rpcProtocol));
|
||||
const extHostResourceProvider = rpcProtocol.set(SqlExtHostContext.ExtHostResourceProvider, new ExtHostResourceProvider(rpcProtocol));
|
||||
const extHostModalDialogs = rpcProtocol.set(SqlExtHostContext.ExtHostModalDialogs, new ExtHostModalDialogs(rpcProtocol));
|
||||
const extHostTasks = rpcProtocol.set(SqlExtHostContext.ExtHostTasks, new ExtHostTasks(rpcProtocol, logService));
|
||||
const extHostWebviewWidgets = rpcProtocol.set(SqlExtHostContext.ExtHostDashboardWebviews, new ExtHostDashboardWebviews(rpcProtocol));
|
||||
const extHostDashboard = rpcProtocol.set(SqlExtHostContext.ExtHostDashboard, new ExtHostDashboard(rpcProtocol));
|
||||
|
||||
return {
|
||||
vsCodeFactory: vsCodeFactory,
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
import {
|
||||
createMainContextProxyIdentifier as createMainId,
|
||||
createExtHostContextProxyIdentifier as createExtId,
|
||||
ProxyIdentifier
|
||||
} from 'vs/workbench/services/thread/common/threadService';
|
||||
ProxyIdentifier, IRPCProtocol } from 'vs/workbench/services/extensions/node/proxyIdentifier';
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
|
||||
@@ -48,7 +48,11 @@ export class NewQueryAction extends Task {
|
||||
public static ICON = 'new-query';
|
||||
|
||||
constructor() {
|
||||
super({ id: NewQueryAction.ID, title: NewQueryAction.LABEL, iconClass: NewQueryAction.ICON });
|
||||
super({
|
||||
id: NewQueryAction.ID,
|
||||
title: NewQueryAction.LABEL,
|
||||
iconPath: { dark: NewQueryAction.ICON, light: NewQueryAction.ICON }
|
||||
});
|
||||
}
|
||||
|
||||
public runTask(accessor: ServicesAccessor, profile: IConnectionProfile): TPromise<void> {
|
||||
@@ -285,7 +289,11 @@ export class BackupAction extends Task {
|
||||
public static readonly ICON = Constants.BackupFeatureName;
|
||||
|
||||
constructor() {
|
||||
super({ id: BackupAction.ID, title: BackupAction.LABEL, iconClass: BackupAction.ICON });
|
||||
super({
|
||||
id: BackupAction.ID,
|
||||
title: BackupAction.LABEL,
|
||||
iconPath: { dark: BackupAction.ICON, light: BackupAction.ICON }
|
||||
});
|
||||
}
|
||||
|
||||
runTask(accessor: ServicesAccessor, profile: IConnectionProfile): TPromise<void> {
|
||||
@@ -311,7 +319,11 @@ export class RestoreAction extends Task {
|
||||
public static readonly ICON = Constants.RestoreFeatureName;
|
||||
|
||||
constructor() {
|
||||
super({ id: RestoreAction.ID, title: RestoreAction.LABEL, iconClass: RestoreAction.ICON });
|
||||
super({
|
||||
id: RestoreAction.ID,
|
||||
title: RestoreAction.LABEL,
|
||||
iconPath: { dark: RestoreAction.ICON, light: RestoreAction.ICON }
|
||||
});
|
||||
}
|
||||
|
||||
runTask(accessor: ServicesAccessor, profile: IConnectionProfile): TPromise<void> {
|
||||
@@ -406,7 +418,11 @@ export class ConfigureDashboardAction extends Task {
|
||||
private static readonly configHelpUri = 'https://aka.ms/sqldashboardconfig';
|
||||
|
||||
constructor() {
|
||||
super({ id: ConfigureDashboardAction.ID, title: ConfigureDashboardAction.LABEL, iconClass: ConfigureDashboardAction.ICON });
|
||||
super({
|
||||
id: ConfigureDashboardAction.ID,
|
||||
title: ConfigureDashboardAction.LABEL,
|
||||
iconPath: { dark: ConfigureDashboardAction.ICON, light: ConfigureDashboardAction.ICON }
|
||||
});
|
||||
}
|
||||
|
||||
runTask(accessor: ServicesAccessor): TPromise<void> {
|
||||
|
||||
@@ -75,7 +75,7 @@ export class ErrorMessageDialog extends Modal {
|
||||
let copyButtonLabel = localize('copyDetails', 'Copy details');
|
||||
this._copyButton = this.addFooterButton(copyButtonLabel, () => this._clipboardService.writeText(this._messageDetails), 'left');
|
||||
this._copyButton.icon = 'icon scriptToClipboard';
|
||||
this._copyButton.getElement().title = copyButtonLabel;
|
||||
this._copyButton.element.title = copyButtonLabel;
|
||||
this._register(attachButtonStyler(this._copyButton, this._themeService, { buttonBackground: SIDE_BAR_BACKGROUND, buttonHoverBackground: SIDE_BAR_BACKGROUND }));
|
||||
}
|
||||
|
||||
@@ -144,9 +144,9 @@ export class ErrorMessageDialog extends Modal {
|
||||
this.title = headerTitle;
|
||||
this._messageDetails = messageDetails;
|
||||
if (this._messageDetails) {
|
||||
this._copyButton.getElement().style.visibility = 'visible';
|
||||
this._copyButton.element.style.visibility = 'visible';
|
||||
} else {
|
||||
this._copyButton.getElement().style.visibility = 'hidden';
|
||||
this._copyButton.element.style.visibility = 'hidden';
|
||||
}
|
||||
this.resetActions();
|
||||
if (actions && actions.length > 0) {
|
||||
@@ -154,7 +154,7 @@ export class ErrorMessageDialog extends Modal {
|
||||
this._actions.push(actions[i]);
|
||||
let button = this._actionButtons[i];
|
||||
button.label = actions[i].label;
|
||||
button.getElement().style.visibility = 'visible';
|
||||
button.element.style.visibility = 'visible';
|
||||
}
|
||||
this._okButton.label = this._closeLabel;
|
||||
} else {
|
||||
@@ -169,7 +169,7 @@ export class ErrorMessageDialog extends Modal {
|
||||
private resetActions(): void {
|
||||
this._actions = [];
|
||||
for(let actionButton of this._actionButtons) {
|
||||
actionButton.getElement().style.visibility = 'hidden';
|
||||
actionButton.element.style.visibility = 'hidden';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
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 Event, { Emitter } from 'vs/base/common/event';
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
import nls = require('vs/nls');
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { IMessageService, CloseAction, Severity } from 'vs/platform/message/common/message';
|
||||
import pkg from 'vs/platform/node/package';
|
||||
import product from 'vs/platform/node/product';
|
||||
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
@@ -19,6 +18,8 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { AbstractShowReleaseNotesAction, loadReleaseNotes } from 'vs/workbench/parts/update/electron-browser/update';
|
||||
import { INotification, INotificationService, INotificationActions } from 'vs/platform/notification/common/notification';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
|
||||
export class OpenGettingStartedInBrowserAction extends Action {
|
||||
|
||||
@@ -57,7 +58,7 @@ export class ProductContribution implements IWorkbenchContribution {
|
||||
constructor(
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IMessageService messageService: IMessageService,
|
||||
@INotificationService notificationService: INotificationService,
|
||||
@IWorkbenchEditorService editorService: IWorkbenchEditorService
|
||||
) {
|
||||
const lastVersion = storageService.get(ProductContribution.KEY, StorageScope.GLOBAL, '');
|
||||
@@ -67,12 +68,16 @@ export class ProductContribution implements IWorkbenchContribution {
|
||||
instantiationService.invokeFunction(loadReleaseNotes, pkg.version).then(
|
||||
text => editorService.openEditor(instantiationService.createInstance(ReleaseNotesInput, pkg.version, text), { pinned: true }),
|
||||
() => {
|
||||
messageService.show(Severity.Info, {
|
||||
message: nls.localize('read the release notes', "Welcome to {0} March Public Preview! Would you like to view the Getting Started Guide?", product.nameLong, pkg.version),
|
||||
actions: [
|
||||
instantiationService.createInstance(OpenGettingStartedInBrowserAction),
|
||||
CloseAction
|
||||
const actions: INotificationActions = {
|
||||
primary: [
|
||||
instantiationService.createInstance(OpenGettingStartedInBrowserAction)
|
||||
]
|
||||
};
|
||||
|
||||
notificationService.notify({
|
||||
severity: Severity.Info,
|
||||
message: nls.localize('read the release notes', "Welcome to {0} March Public Preview! Would you like to view the Getting Started Guide?", product.nameLong, pkg.version),
|
||||
actions
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user