mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -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:
@@ -10,34 +10,34 @@ import * as sqlops from 'sqlops';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import { AccountProviderStub, AccountManagementTestService } from 'sqltest/stubs/accountManagementStubs';
|
||||
import { ExtHostAccountManagement } from 'sql/workbench/api/node/extHostAccountManagement';
|
||||
import { TestThreadService } from 'vs/workbench/test/electron-browser/api/testThreadService';
|
||||
import { TestRPCProtocol } from 'vs/workbench/test/electron-browser/api/testRPCProtocol';
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { IRPCProtocol } from 'vs/workbench/services/extensions/node/proxyIdentifier';
|
||||
import { SqlMainContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import { MainThreadAccountManagement } from 'sql/workbench/api/node/mainThreadAccountManagement';
|
||||
import { IAccountManagementService } from 'sql/services/accountManagement/interfaces';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
const IThreadService = createDecorator<IThreadService>('threadService');
|
||||
const IRPCProtocol = createDecorator<IRPCProtocol>('rpcProtocol');
|
||||
|
||||
// SUITE STATE /////////////////////////////////////////////////////////////
|
||||
let instantiationService: TestInstantiationService;
|
||||
let mockAccountMetadata: sqlops.AccountProviderMetadata;
|
||||
let mockAccount: sqlops.Account;
|
||||
let threadService: TestThreadService;
|
||||
let threadService: TestRPCProtocol;
|
||||
|
||||
// TESTS ///////////////////////////////////////////////////////////////////
|
||||
suite('ExtHostAccountManagement', () => {
|
||||
suiteSetup(() => {
|
||||
threadService = new TestThreadService();
|
||||
threadService = new TestRPCProtocol();
|
||||
const accountMgmtStub = new AccountManagementTestService();
|
||||
|
||||
instantiationService = new TestInstantiationService();
|
||||
instantiationService.stub(IThreadService, threadService);
|
||||
instantiationService.stub(IRPCProtocol, threadService);
|
||||
instantiationService.stub(IAccountManagementService, accountMgmtStub);
|
||||
|
||||
const accountMgmtService = instantiationService.createInstance(MainThreadAccountManagement);
|
||||
threadService.setTestInstance(SqlMainContext.MainThreadAccountManagement, accountMgmtService);
|
||||
threadService.set(SqlMainContext.MainThreadAccountManagement, accountMgmtService);
|
||||
|
||||
mockAccountMetadata = {
|
||||
args: {},
|
||||
|
||||
@@ -6,36 +6,36 @@
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { TestThreadService } from 'vs/workbench/test/electron-browser/api/testThreadService';
|
||||
import { TestRPCProtocol } from 'vs/workbench/test/electron-browser/api/testRPCProtocol';
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
import { ExtHostCredentialManagement } from 'sql/workbench/api/node/extHostCredentialManagement';
|
||||
import { SqlMainContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { IRPCProtocol } from 'vs/workbench/services/extensions/node/proxyIdentifier';
|
||||
import { MainThreadCredentialManagement } from 'sql/workbench/api/node/mainThreadCredentialManagement';
|
||||
import { CredentialsTestProvider, CredentialsTestService } from 'sqltest/stubs/credentialsTestStubs';
|
||||
import { ICredentialsService } from 'sql/services/credentials/credentialsService';
|
||||
import { Credential, CredentialProvider } from 'sqlops';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
const IThreadService = createDecorator<IThreadService>('threadService');
|
||||
const IRPCProtocol = createDecorator<IRPCProtocol>('rpcProtocol');
|
||||
|
||||
// SUITE STATE /////////////////////////////////////////////////////////////
|
||||
let credentialServiceStub: CredentialsTestService;
|
||||
let instantiationService: TestInstantiationService;
|
||||
let threadService: TestThreadService;
|
||||
let threadService: TestRPCProtocol;
|
||||
|
||||
// TESTS ///////////////////////////////////////////////////////////////////
|
||||
suite('ExtHostCredentialManagement', () => {
|
||||
suiteSetup(() => {
|
||||
threadService = new TestThreadService();
|
||||
threadService = new TestRPCProtocol();
|
||||
credentialServiceStub = new CredentialsTestService();
|
||||
|
||||
instantiationService = new TestInstantiationService();
|
||||
instantiationService.stub(IThreadService, threadService);
|
||||
instantiationService.stub(IRPCProtocol, threadService);
|
||||
instantiationService.stub(ICredentialsService, credentialServiceStub);
|
||||
|
||||
const credentialService = instantiationService.createInstance(MainThreadCredentialManagement);
|
||||
threadService.setTestInstance(SqlMainContext.MainThreadCredentialManagement, credentialService);
|
||||
threadService.set(SqlMainContext.MainThreadCredentialManagement, credentialService);
|
||||
});
|
||||
|
||||
test('Construct ExtHostCredentialManagement', () => {
|
||||
|
||||
@@ -10,12 +10,12 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/
|
||||
import { setUnexpectedErrorHandler, errorHandler } from 'vs/base/common/errors';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import * as EditorCommon from 'vs/editor/common/editorCommon';
|
||||
import { Model as EditorModel } from 'vs/editor/common/model/model';
|
||||
import { TestThreadService } from 'vs/workbench/test/electron-browser/api/testThreadService';
|
||||
import { TextModel as EditorModel } from 'vs/editor/common/model/textModel';
|
||||
import { TestRPCProtocol } from 'vs/workbench/test/electron-browser/api/testRPCProtocol';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IMarkerService } from 'vs/platform/markers/common/markers';
|
||||
import { MarkerService } from 'vs/platform/markers/common/markerService';
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
import { IRPCProtocol } from 'vs/workbench/services/extensions/node/proxyIdentifier';
|
||||
import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands';
|
||||
import { MainThreadCommands } from 'vs/workbench/api/electron-browser/mainThreadCommands';
|
||||
import { IHeapService } from 'vs/workbench/api/electron-browser/mainThreadHeapService';
|
||||
@@ -31,9 +31,9 @@ import * as sqlops from 'sqlops';
|
||||
import { ExtHostDataProtocol } from 'sql/workbench/api/node/extHostDataProtocol';
|
||||
import { SqlExtHostContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
|
||||
const IThreadService = createDecorator<IThreadService>('threadService');
|
||||
const IRPCProtocol = createDecorator<IRPCProtocol>('rpcProtocol');
|
||||
|
||||
const model: EditorCommon.IModel = EditorModel.createFromString(
|
||||
const model = EditorModel.createFromString(
|
||||
[
|
||||
'This is the first line',
|
||||
'This is the second line',
|
||||
@@ -45,7 +45,7 @@ const model: EditorCommon.IModel = EditorModel.createFromString(
|
||||
|
||||
let extHost: ExtHostDataProtocol;
|
||||
let disposables: vscode.Disposable[] = [];
|
||||
let threadService: TestThreadService;
|
||||
let threadService: TestRPCProtocol;
|
||||
let originalErrorHandler: (e: any) => any;
|
||||
|
||||
suite('ExtHostDataProtocol', function () {
|
||||
|
||||
Reference in New Issue
Block a user