mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-04-02 10:00:29 -04:00
Refresh master with initial release/0.24 snapshot (#332)
* Initial port of release/0.24 source code * Fix additional headers * Fix a typo in launch.json
This commit is contained in:
@@ -14,11 +14,31 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
||||
export class AccountManagementTestService implements IAccountManagementService {
|
||||
_serviceBrand: any;
|
||||
|
||||
public get addAccountProviderEvent(): Event<AccountProviderAddedEventParams> {return () => {return undefined;};}
|
||||
public get removeAccountProviderEvent(): Event<data.AccountProviderMetadata> {return () => {return undefined;};}
|
||||
public get updateAccountListEvent(): Event<UpdateAccountListEventParams> {return () => {return undefined;};}
|
||||
public get addAccountProviderEvent(): Event<AccountProviderAddedEventParams> { return () => { return undefined; }; }
|
||||
public get removeAccountProviderEvent(): Event<data.AccountProviderMetadata> { return () => { return undefined; }; }
|
||||
public get updateAccountListEvent(): Event<UpdateAccountListEventParams> { return () => { return undefined; }; }
|
||||
|
||||
addAccount(providerId: string): Thenable<data.Account> {
|
||||
accountUpdated(account: data.Account): Thenable<void> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
addAccount(providerId: string): Thenable<void> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
beginAutoOAuthDeviceCode(title: string, message: string, userCode: string, uri: string): Thenable<void> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
cancelAutoOAuthDeviceCode(providerId: string): void {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
endAutoOAuthDeviceCode(): void {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
copyUserCodeAndOpenBrowser(userCode: string, uri: string): void {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -38,11 +58,11 @@ export class AccountManagementTestService implements IAccountManagementService {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
openAccountListDialog(): TPromise<any> {
|
||||
refreshAccount(account: data.Account): Thenable<data.Account> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
performOAuthAuthorization(url: string, silent: boolean): Thenable<string> {
|
||||
openAccountListDialog(): TPromise<any> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -60,6 +80,10 @@ export class AccountManagementTestService implements IAccountManagementService {
|
||||
}
|
||||
|
||||
export class AccountProviderStub implements data.AccountProvider {
|
||||
autoOAuthCancelled(): Thenable<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
clear(account: data.AccountKey): Thenable<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
'use strict';
|
||||
|
||||
import {
|
||||
IConnectionDialogService, IConnectionManagementService, INewConnectionParams
|
||||
IConnectionDialogService, IConnectionManagementService, INewConnectionParams, IConnectionResult
|
||||
} from 'sql/parts/connection/common/connectionManagement';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||
@@ -14,7 +14,7 @@ export class ConnectionDialogTestService implements IConnectionDialogService {
|
||||
_serviceBrand: any;
|
||||
|
||||
public showDialog(connectionManagementService: IConnectionManagementService,
|
||||
params: INewConnectionParams, model: IConnectionProfile, error?: string): TPromise<void> {
|
||||
params: INewConnectionParams, model: IConnectionProfile, connectionResult?: IConnectionResult): TPromise<void> {
|
||||
let none: void;
|
||||
return TPromise.as(none);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
|
||||
}
|
||||
|
||||
showConnectionDialog(params?: INewConnectionParams, model?: IConnectionProfile, error?: string): Promise<void> {
|
||||
showConnectionDialog(params?: INewConnectionParams, model?: IConnectionProfile, connectionResult?: IConnectionResult): Promise<void> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -83,6 +83,10 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
return;
|
||||
}
|
||||
|
||||
public clearRecentConnection(connectionProfile: ConnectionProfile): void {
|
||||
return;
|
||||
}
|
||||
|
||||
getUnsavedConnections(): ConnectionProfile[] {
|
||||
return [];
|
||||
}
|
||||
@@ -141,7 +145,7 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
|
||||
connect(connection: IConnectionProfile, uri: string, options?: IConnectionCompletionOptions, callbacks?: IConnectionCallbacks): Promise<IConnectionResult> {
|
||||
return new Promise<IConnectionResult>((resolve, reject) => {
|
||||
resolve({ connected: true, errorMessage: undefined, errorCode: undefined });
|
||||
resolve({ connected: true, errorMessage: undefined, errorCode: undefined, callStack: undefined });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -5,13 +5,12 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ServiceIdentifier, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Position, IEditorInput } from 'vs/platform/editor/common/editor';
|
||||
import { IEditorStacksModel, IEditorGroup, EditorInput } from 'vs/workbench/common/editor';
|
||||
import { IEditorStacksModel, IEditorGroup, EditorInput, IEditorOpeningEvent } from 'vs/workbench/common/editor';
|
||||
import Event from 'vs/base/common/event';
|
||||
import { ITabOptions, GroupArrangement, GroupOrientation } from 'vs/workbench/services/group/common/groupService';
|
||||
import { IEditorGroupService, IMoveOptions } from 'vs/workbench/services/group/common/groupService';
|
||||
import { EditorGroup } from "vs/workbench/common/editor/editorStacksModel";
|
||||
import { IEditorTabOptions, GroupArrangement, GroupOrientation, IEditorGroupService, IMoveOptions } from 'vs/workbench/services/group/common/groupService';
|
||||
import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel';
|
||||
|
||||
export class EditorGroupTestService implements IEditorGroupService {
|
||||
_serviceBrand: ServiceIdentifier<any>;
|
||||
@@ -21,6 +20,14 @@ export class EditorGroupTestService implements IEditorGroupService {
|
||||
*/
|
||||
onEditorsChanged: Event<void>;
|
||||
|
||||
onEditorOpening: Event<IEditorOpeningEvent>;
|
||||
|
||||
onEditorGroupMoved: Event<void>;
|
||||
|
||||
invokeWithinEditorContext<T>(fn: (accessor: ServicesAccessor) => T): T {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted when opening an editor fails.
|
||||
*/
|
||||
@@ -39,7 +46,7 @@ export class EditorGroupTestService implements IEditorGroupService {
|
||||
/**
|
||||
* Emitted when tab options changed.
|
||||
*/
|
||||
onTabOptionsChanged: Event<ITabOptions>;
|
||||
onTabOptionsChanged: Event<IEditorTabOptions>;
|
||||
|
||||
/**
|
||||
* Keyboard focus the editor group at the provided position.
|
||||
@@ -108,7 +115,7 @@ export class EditorGroupTestService implements IEditorGroupService {
|
||||
/**
|
||||
* Returns true if tabs are shown, false otherwise.
|
||||
*/
|
||||
getTabOptions(): ITabOptions {
|
||||
getTabOptions(): IEditorTabOptions {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
'use strict';
|
||||
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { IConfirmation, IMessageService, IMessageWithAction } from 'vs/platform/message/common/message';
|
||||
import { IConfirmation, IMessageService, IMessageWithAction, IConfirmationResult } from 'vs/platform/message/common/message';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
|
||||
export class MessageServiceStub implements IMessageService{
|
||||
_serviceBrand: any;
|
||||
@@ -24,7 +25,14 @@ export class MessageServiceStub implements IMessageService{
|
||||
return undefined;
|
||||
}
|
||||
|
||||
confirm(confirmation: IConfirmation): boolean {
|
||||
confirm(confirmation: IConfirmation): TPromise<IConfirmationResult> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask the user for confirmation.
|
||||
*/
|
||||
confirmSync(confirmation: IConfirmation): boolean {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
32
src/sqltest/stubs/resourceProviderServiceStub.ts
Normal file
32
src/sqltest/stubs/resourceProviderServiceStub.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as data from 'data';
|
||||
import { IHandleFirewallRuleResult, IResourceProviderService } from 'sql/parts/accountManagement/common/interfaces';
|
||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||
|
||||
export class ResourceProviderStub implements IResourceProviderService {
|
||||
_serviceBrand: any;
|
||||
|
||||
registerProvider(providerId: string, provider: data.ResourceProvider) {
|
||||
|
||||
}
|
||||
|
||||
unregisterProvider(ProviderId: string) {
|
||||
|
||||
}
|
||||
|
||||
createFirewallRule(selectedAccount: data.Account, firewallruleInfo: data.FirewallRuleInfo, resourceProviderId: string): Promise<data.CreateFirewallRuleResponse> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
handleFirewallRule(errorCode: number, errorMessage: string, connectionTypeId: string): Promise<IHandleFirewallRuleResult> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
showFirewallRuleDialog(connection: IConnectionProfile, ipAddress: string, resourceProviderId: string): Promise<boolean> {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { ISqlOAuthService } from 'sql/common/sqlOAuthService';
|
||||
|
||||
export class SqlOAuthTestService implements ISqlOAuthService {
|
||||
_serviceBrand: any;
|
||||
|
||||
performOAuthAuthorization(eventId: string, url: string, silent: boolean): void {
|
||||
}
|
||||
|
||||
registerOAuthCallback(handler: (event, args) => void): void {
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import { IEditorService, IEditor, IEditorInput, IEditorOptions, ITextEditorOptio
|
||||
from 'vs/platform/editor/common/editor';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
import { EditorInput, EditorOptions, IFileEditorInput, TextEditorOptions, IEditorRegistry, Extensions, SideBySideEditorInput } from 'vs/workbench/common/editor';
|
||||
import { EditorInput, EditorOptions, IFileEditorInput, TextEditorOptions, Extensions, SideBySideEditorInput } from 'vs/workbench/common/editor';
|
||||
|
||||
export class WorkbenchEditorTestService implements IWorkbenchEditorService {
|
||||
_serviceBrand: ServiceIdentifier<any>;
|
||||
|
||||
@@ -5,76 +5,60 @@
|
||||
'use strict';
|
||||
|
||||
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
||||
import {
|
||||
IConfigurationValue, IConfigurationData, IConfigurationKeys,
|
||||
IConfigurationServiceEvent, IConfigurationValues } from 'vs/platform/configuration/common/configuration';
|
||||
import { IConfigurationData, IConfigurationOverrides, ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import { IConfigurationValue } from 'vs/workbench/services/configuration/node/configurationEditingService';
|
||||
import { IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import Event from 'vs/base/common/event';
|
||||
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
|
||||
|
||||
export class WorkspaceConfigurationTestService implements IWorkspaceConfigurationService {
|
||||
_serviceBrand: any;
|
||||
|
||||
onDidChangeConfiguration: Event<IConfigurationChangeEvent>;
|
||||
|
||||
getConfigurationData<T>(): IConfigurationData<T> {
|
||||
return undefined;
|
||||
getConfigurationData(): IConfigurationData { return undefined; }
|
||||
|
||||
getConfiguration<T>(): T
|
||||
getConfiguration<T>(section: string): T
|
||||
getConfiguration<T>(overrides: IConfigurationOverrides): T
|
||||
getConfiguration<T>(section: string, overrides: IConfigurationOverrides): T
|
||||
getConfiguration(arg1?: any, arg2?: any): any {
|
||||
return TPromise.as(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns untrusted configuration keys for the current workspace.
|
||||
*/
|
||||
getUnsupportedWorkspaceKeys(): string[] {
|
||||
return [];
|
||||
getValue<T>(key: string, overrides?: IConfigurationOverrides): T { return undefined; }
|
||||
|
||||
updateValue(key: string, value: any): TPromise<void>
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides): TPromise<void>
|
||||
updateValue(key: string, value: any, target: ConfigurationTarget): TPromise<void>
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides, target: ConfigurationTarget): TPromise<void>
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides, target: ConfigurationTarget, donotNotifyError: boolean): TPromise<void>
|
||||
updateValue(key: string, value: any, arg3?: any, arg4?: any, donotNotifyError?: any): TPromise<void> {
|
||||
return TPromise.as(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns iff the workspace has configuration or not.
|
||||
*/
|
||||
hasWorkspaceConfiguration(): boolean {
|
||||
return true;
|
||||
reloadConfiguration(folder?: IWorkspaceFolder, key?: string): TPromise<void> {
|
||||
return TPromise.as(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns untrusted configuration keys for the current workspace.
|
||||
*/
|
||||
getUntrustedConfigurations(): string[] {
|
||||
return [];
|
||||
}
|
||||
inspect<T>(key: string): {
|
||||
default: T,
|
||||
user: T,
|
||||
workspace: T,
|
||||
workspaceFolder: T,
|
||||
memory?: T,
|
||||
value: T,
|
||||
} { return undefined; }
|
||||
|
||||
/**
|
||||
* Returns if the user explicitly configured to not trust the current workspace.
|
||||
*/
|
||||
isExplicitlyUntrusted(): boolean {
|
||||
return true;
|
||||
}
|
||||
keys(): {
|
||||
default: string[];
|
||||
user: string[];
|
||||
workspace: string[];
|
||||
workspaceFolder: string[];
|
||||
memory?: string[];
|
||||
} { return undefined; }
|
||||
|
||||
/**
|
||||
* Override for the IConfigurationService#lookup() method that adds information about workspace settings.
|
||||
*/
|
||||
lookup<T>(key: string): IConfigurationValue<T> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
getConfiguration<T>(section?: string): T {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
reloadConfiguration<T>(section?: string): TPromise<T> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override for the IConfigurationService#keys() method that adds information about workspace settings.
|
||||
*/
|
||||
keys(): IConfigurationKeys {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the defined values of configurations in the different scopes.
|
||||
*/
|
||||
values(): IConfigurationValues {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
onDidUpdateConfiguration: Event<IConfigurationServiceEvent>;
|
||||
}
|
||||
getUnsupportedWorkspaceKeys(): string[] { return undefined; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user