mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 17:22:51 -05:00
This reverts commit 22a427f934.
This commit is contained in:
@@ -15,8 +15,6 @@ import {
|
||||
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
|
||||
import { UpdateAccountListEventParams } from 'sql/platform/accounts/common/eventTypes';
|
||||
import { values } from 'vs/base/common/collections';
|
||||
import { firstIndex } from 'vs/base/common/arrays';
|
||||
|
||||
@extHostNamedCustomer(SqlMainContext.MainThreadAccountManagement)
|
||||
export class MainThreadAccountManagement extends Disposable implements MainThreadAccountManagementShape {
|
||||
@@ -38,7 +36,7 @@ export class MainThreadAccountManagement extends Disposable implements MainThrea
|
||||
return;
|
||||
}
|
||||
|
||||
const providerMetadataIndex = firstIndex(values(this._providerMetadata), (providerMetadata: azdata.AccountProviderMetadata) => providerMetadata.id === e.providerId);
|
||||
const providerMetadataIndex = Object.values(this._providerMetadata).findIndex((providerMetadata: azdata.AccountProviderMetadata) => providerMetadata.id === e.providerId);
|
||||
if (providerMetadataIndex === -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import { MainThreadDashboardWebviewShape, SqlMainContext, ExtHostDashboardWebvie
|
||||
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
|
||||
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { IDashboardViewService, IDashboardWebview } from 'sql/platform/dashboard/browser/dashboardViewService';
|
||||
import { find } from 'vs/base/common/arrays';
|
||||
|
||||
@extHostNamedCustomer(SqlMainContext.MainThreadDashboardWebview)
|
||||
export class MainThreadDashboardWebview implements MainThreadDashboardWebviewShape {
|
||||
@@ -24,7 +23,7 @@ export class MainThreadDashboardWebview implements MainThreadDashboardWebviewSha
|
||||
) {
|
||||
this._proxy = context.getProxy(SqlExtHostContext.ExtHostDashboardWebviews);
|
||||
viewService.onRegisteredWebview(e => {
|
||||
if (find(this.knownWidgets, x => x === e.id)) {
|
||||
if (this.knownWidgets.includes(e.id)) {
|
||||
let handle = MainThreadDashboardWebview._handlePool++;
|
||||
this._dialogs.set(handle, e);
|
||||
this._proxy.$registerWidget(handle, e.id, e.connection, e.serverInfo);
|
||||
|
||||
@@ -25,7 +25,6 @@ import { ISerializationService } from 'sql/platform/serialization/common/seriali
|
||||
import { IFileBrowserService } from 'sql/platform/fileBrowser/common/interfaces';
|
||||
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
|
||||
/**
|
||||
* Main thread class for handling data protocol management registration.
|
||||
@@ -522,7 +521,7 @@ export class MainThreadDataProtocol extends Disposable implements MainThreadData
|
||||
}
|
||||
|
||||
public $onObjectExplorerNodeExpanded(providerId: string, expandResponse: azdata.ObjectExplorerExpandInfo): void {
|
||||
let expandInfo: NodeExpandInfoWithProviderId = assign({ providerId: providerId }, expandResponse);
|
||||
let expandInfo: NodeExpandInfoWithProviderId = Object.assign({ providerId: providerId }, expandResponse);
|
||||
this._objectExplorerService.onNodeExpanded(expandInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { IModelViewService } from 'sql/platform/modelComponents/browser/modelViewService';
|
||||
import { IItemConfig, IComponentShape } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { IModelView } from 'sql/platform/model/browser/modelViewService';
|
||||
import { find } from 'vs/base/common/arrays';
|
||||
|
||||
|
||||
@extHostNamedCustomer(SqlMainContext.MainThreadModelView)
|
||||
@@ -30,7 +29,7 @@ export class MainThreadModelView extends Disposable implements MainThreadModelVi
|
||||
super();
|
||||
this._proxy = _context.getProxy(SqlExtHostContext.ExtHostModelView);
|
||||
viewService.onRegisteredModelView(view => {
|
||||
if (find(this.knownWidgets, x => x === view.id)) {
|
||||
if (this.knownWidgets.includes(view.id)) {
|
||||
let handle = MainThreadModelView._handlePool++;
|
||||
this._dialogs.set(handle, view);
|
||||
this._proxy.$registerWidget(handle, view.id, view.connection, view.serverInfo);
|
||||
|
||||
@@ -33,7 +33,6 @@ import { viewColumnToEditorGroup } from 'vs/workbench/api/common/shared/editor';
|
||||
import { notebookModeId } from 'sql/workbench/browser/customInputConverter';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { find } from 'vs/base/common/arrays';
|
||||
|
||||
class MainThreadNotebookEditor extends Disposable {
|
||||
private _contentChangedEmitter = new Emitter<NotebookContentChange>();
|
||||
@@ -373,7 +372,7 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
||||
let cell: ICellModel;
|
||||
if (cellUri) {
|
||||
let uriString = URI.revive(cellUri).toString();
|
||||
cell = find(editor.cells, c => c.cellUri.toString() === uriString);
|
||||
cell = editor.cells.find(c => c.cellUri.toString() === uriString);
|
||||
// If it's markdown what should we do? Show notification??
|
||||
} else {
|
||||
// Use the active cell in this case, or 1st cell if there's none active
|
||||
@@ -395,11 +394,11 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
||||
let endCell: ICellModel;
|
||||
if (startCellUri) {
|
||||
let uriString = URI.revive(startCellUri).toString();
|
||||
startCell = find(editor.cells, c => c.cellUri.toString() === uriString);
|
||||
startCell = editor.cells.find(c => c.cellUri.toString() === uriString);
|
||||
}
|
||||
if (endCellUri) {
|
||||
let uriString = URI.revive(endCellUri).toString();
|
||||
endCell = find(editor.cells, c => c.cellUri.toString() === uriString);
|
||||
endCell = editor.cells.find(c => c.cellUri.toString() === uriString);
|
||||
}
|
||||
return editor.runAllCells(startCell, endCell);
|
||||
}
|
||||
@@ -413,7 +412,7 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
||||
let cell: ICellModel;
|
||||
if (cellUri) {
|
||||
let uriString = URI.revive(cellUri).toString();
|
||||
cell = find(editor.cells, c => c.cellUri.toString() === uriString);
|
||||
cell = editor.cells.find(c => c.cellUri.toString() === uriString);
|
||||
// If it's markdown what should we do? Show notification??
|
||||
} else {
|
||||
// Use the active cell in this case, or 1st cell if there's none active
|
||||
|
||||
Reference in New Issue
Block a user