mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Merge branch 'ads-main-vscode-2020-07-15T23-51-12' into main
This commit is contained in:
@@ -31,7 +31,7 @@ import { TestCapabilitiesService } from 'sql/platform/capabilities/test/common/t
|
||||
import { UNSAVED_GROUP_ID, mssqlProviderName } from 'sql/platform/connection/common/constants';
|
||||
import { $ } from 'vs/base/browser/dom';
|
||||
import { OEManageConnectionAction } from 'sql/workbench/contrib/dashboard/browser/dashboardActions';
|
||||
import { IViewsService, IView, ViewContainerLocation, ViewContainer } from 'vs/workbench/common/views';
|
||||
import { IViewsService, IView, ViewContainerLocation, ViewContainer, IViewPaneContainer } from 'vs/workbench/common/views';
|
||||
import { ConsoleLogService } from 'vs/platform/log/common/log';
|
||||
import { IProgressIndicator } from 'vs/platform/progress/common/progress';
|
||||
import { IPaneComposite } from 'vs/workbench/common/panecomposite';
|
||||
@@ -111,6 +111,9 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
});
|
||||
|
||||
const viewsService = new class implements IViewsService {
|
||||
getActiveViewPaneContainerWithId(viewContainerId: string): IViewPaneContainer {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
getViewProgressIndicator(id: string): IProgressIndicator {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { SplitView, Sizing } from 'vs/base/browser/ui/splitview/splitview';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { values } from 'vs/base/common/map';
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
@@ -44,6 +43,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { Iterable } from 'vs/base/common/iterator';
|
||||
|
||||
export const VIEWLET_ID = 'workbench.view.accountpanel';
|
||||
|
||||
@@ -219,7 +219,7 @@ export class AccountDialog extends Modal {
|
||||
this._addAccountButton.label = localize('accountDialog.addConnection', "Add an account");
|
||||
|
||||
this._register(this._addAccountButton.onDidClick(async () => {
|
||||
const vals = values(this._providerViewsMap);
|
||||
const vals = Iterable.consume(this._providerViewsMap.values())[0];
|
||||
|
||||
let pickedValue: string;
|
||||
if (vals.length === 0) {
|
||||
@@ -291,8 +291,8 @@ export class AccountDialog extends Modal {
|
||||
private showSplitView() {
|
||||
this._splitViewContainer.hidden = false;
|
||||
this._noaccountViewContainer.hidden = true;
|
||||
if (values(this._providerViewsMap).length > 0) {
|
||||
const firstView = values(this._providerViewsMap)[0];
|
||||
if (Iterable.consume(this._providerViewsMap.values()).length > 0) {
|
||||
const firstView = this._providerViewsMap.values().next().value;
|
||||
if (firstView instanceof AccountPanel) {
|
||||
firstView.setSelection([0]);
|
||||
firstView.focus();
|
||||
@@ -301,7 +301,7 @@ export class AccountDialog extends Modal {
|
||||
}
|
||||
|
||||
private isEmptyLinkedAccount(): boolean {
|
||||
for (const provider of values(this._providerViewsMap)) {
|
||||
for (const provider of this._providerViewsMap.values()) {
|
||||
const listView = provider.view;
|
||||
if (listView && listView.length > 0) {
|
||||
return false;
|
||||
@@ -312,7 +312,7 @@ export class AccountDialog extends Modal {
|
||||
|
||||
public dispose(): void {
|
||||
super.dispose();
|
||||
for (const provider of values(this._providerViewsMap)) {
|
||||
for (const provider of this._providerViewsMap.values()) {
|
||||
if (provider.addAccountAction) {
|
||||
provider.addAccountAction.dispose();
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { IInstantiationService, _util, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { Trace } from 'vs/platform/instantiation/common/instantiationService';
|
||||
import { values } from 'vs/base/common/map';
|
||||
import { IModuleFactory, IBootstrapParams } from 'sql/workbench/services/bootstrap/common/bootstrapParams';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
@@ -16,7 +15,7 @@ import { ILogService } from 'vs/platform/log/common/log';
|
||||
const selectorCounter = new Map<string, number>();
|
||||
|
||||
export function providerIterator(service: IInstantiationService): Provider[] {
|
||||
return Array.from(values(_util.serviceIds)).map(v => {
|
||||
return Array.from(_util.serviceIds.values()).map(v => {
|
||||
let factory = () => {
|
||||
return (<any>service)._getOrCreateServiceInstance(v, Trace.traceCreation(v));
|
||||
};
|
||||
|
||||
@@ -22,7 +22,6 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { ISingleNotebookEditOperation } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import { uriPrefixes } from 'sql/platform/connection/common/utils';
|
||||
import { keys } from 'vs/base/common/map';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { getErrorMessage } from 'vs/base/common/errors';
|
||||
import { find, firstIndex } from 'vs/base/common/arrays';
|
||||
@@ -213,7 +212,7 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
}
|
||||
|
||||
public standardKernelsDisplayName(): string[] {
|
||||
return Array.from(keys(this._kernelDisplayNameToNotebookProviderIds));
|
||||
return Array.from(this._kernelDisplayNameToNotebookProviderIds.keys());
|
||||
}
|
||||
|
||||
public get inErrorState(): boolean {
|
||||
|
||||
@@ -27,7 +27,6 @@ import { IQueryManagementService } from 'sql/workbench/services/query/common/que
|
||||
import { ICellModel } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
|
||||
import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { SqlNotebookProvider } from 'sql/workbench/services/notebook/browser/sql/sqlNotebookProvider';
|
||||
import { keys } from 'vs/base/common/map';
|
||||
import { IFileService, IFileStatWithMetadata } from 'vs/platform/files/common/files';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
@@ -269,7 +268,7 @@ export class NotebookService extends Disposable implements INotebookService {
|
||||
}
|
||||
|
||||
getSupportedFileExtensions(): string[] {
|
||||
return Array.from(keys(this._fileToProviders));
|
||||
return Array.from(this._fileToProviders.keys());
|
||||
}
|
||||
|
||||
getProvidersForFileType(fileType: string): string[] {
|
||||
|
||||
@@ -102,7 +102,7 @@ export async function getResultsString(provider: IGridDataProvider, selection: S
|
||||
|
||||
let copyString = '';
|
||||
if (includeHeaders) {
|
||||
copyString = [...headers.values()].join('\t').concat(eol);
|
||||
copyString = Array.from(headers.values()).join('\t').concat(eol);
|
||||
}
|
||||
|
||||
const rowKeys = [...headers.keys()];
|
||||
|
||||
@@ -10,7 +10,6 @@ import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import * as azdata from 'azdata';
|
||||
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { keys } from 'vs/base/common/map';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { IAdsTelemetryService, ITelemetryEventProperties } from 'sql/platform/telemetry/common/telemetry';
|
||||
import EditQueryRunner from 'sql/workbench/services/editData/common/editQueryRunner';
|
||||
@@ -175,7 +174,7 @@ export class QueryManagementService implements IQueryManagementService {
|
||||
}
|
||||
|
||||
public getRegisteredProviders(): string[] {
|
||||
return Array.from(keys(this._requestHandlers));
|
||||
return Array.from(this._requestHandlers.keys());
|
||||
}
|
||||
|
||||
private addTelemetry(eventName: string, ownerUri: string, runOptions?: ExecutionPlanOptions): void {
|
||||
|
||||
Reference in New Issue
Block a user