Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)

This commit is contained in:
Cory Rivera
2021-08-25 16:28:29 -07:00
committed by GitHub
parent ab1112bfb3
commit cb7b7da0a4
1752 changed files with 59525 additions and 33878 deletions

View File

@@ -42,7 +42,7 @@ export class OEAction extends ExecuteCommandAction {
super(id, label, commandService);
}
public override async run(actionContext: any): Promise<boolean> {
public override async run(actionContext: any): Promise<void> {
const treeSelectionHandler = this._instantiationService.createInstance(TreeSelectionHandler);
let profile: IConnectionProfile | undefined = undefined;
@@ -61,9 +61,7 @@ export class OEAction extends ExecuteCommandAction {
if (profile) {
return super.run(profile).then(() => {
treeSelectionHandler.onTreeActionStateChange(false);
return true;
});
}
return false;
}
}

View File

@@ -18,7 +18,6 @@ import * as Utils from 'sql/platform/connection/common/utils';
import { ILogService } from 'vs/platform/log/common/log';
import { entries } from 'sql/base/common/collections';
import { values } from 'vs/base/common/collections';
import { startsWith } from 'vs/base/common/strings';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { ServerTreeActionProvider } from 'sql/workbench/services/objectExplorer/browser/serverTreeActionProvider';
import { ITree } from 'vs/base/parts/tree/browser/tree';
@@ -842,7 +841,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
}
if (currentNode.children) {
// Look at the next node in the path, which is the child object with the longest path where the desired path starts with the child path
let children = currentNode.children.filter(child => startsWith(nodePath, child.nodePath));
let children = currentNode.children.filter(child => nodePath.startsWith(child.nodePath));
if (children.length > 0) {
nextNode = children.reduce((currentMax, candidate) => currentMax.nodePath.length < candidate.nodePath.length ? candidate : currentMax);
}