mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 18:46:36 -05:00
Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 (#15681)
* Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 * Fixes and cleanup * Distro * Fix hygiene yarn * delete no yarn lock changes file * Fix hygiene * Fix layer check * Fix CI * Skip lib checks * Remove tests deleted in vs code * Fix tests * Distro * Fix tests and add removed extension point * Skip failing notebook tests for now * Disable broken tests and cleanup build folder * Update yarn.lock and fix smoke tests * Bump sqlite * fix contributed actions and file spacing * Fix user data path * Update yarn.locks Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
@@ -22,13 +22,13 @@ import { ServerTreeRenderer } from 'sql/workbench/services/objectExplorer/browse
|
||||
import { TreeUpdateUtils } from 'sql/workbench/services/objectExplorer/browser/treeUpdateUtils';
|
||||
import { TreeNode } from 'sql/workbench/services/objectExplorer/common/treeNode';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { ActionBar, IActionViewItemProvider } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { status } from 'vs/base/browser/ui/aria/aria';
|
||||
import { IIdentityProvider, IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
|
||||
import { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar';
|
||||
import { IAsyncDataSource, ITreeNode, ITreeRenderer } from 'vs/base/browser/ui/tree/tree';
|
||||
import { IAction, IActionViewItemProvider } from 'vs/base/common/actions';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { debounce } from 'vs/base/common/decorators';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { Iterable } from 'vs/base/common/iterator';
|
||||
@@ -42,7 +42,7 @@ import { createAndFillInContextMenuActions, MenuEntryActionViewItem } from 'vs/p
|
||||
import { IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { FileKind } from 'vs/platform/files/common/files';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -602,9 +602,9 @@ class ConnectionBrowseTreeMenuProvider {
|
||||
return [];
|
||||
}
|
||||
|
||||
const contextKeyService = this.contextKeyService.createScoped();
|
||||
const contextKey = new ContextKey(contextKeyService);
|
||||
contextKey.set(context);
|
||||
const contextKeyService = context instanceof ConnectionDialogTreeProviderElement ?
|
||||
this.contextKeyService.createOverlay([['treeId', context.id]]) :
|
||||
this.contextKeyService.createOverlay([['contextValue', context.contextValue]]);
|
||||
const menu = this.menuService.createMenu(MenuId.ConnectionDialogBrowseTreeContext, contextKeyService);
|
||||
const primary: IAction[] = [];
|
||||
const secondary: IAction[] = [];
|
||||
@@ -725,37 +725,3 @@ class TreeItemRenderer extends Disposable implements ITreeRenderer<ITreeItemFrom
|
||||
templateData.elementDisposable.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
type ContextValueType = ITreeItem | ConnectionDialogTreeProviderElement;
|
||||
|
||||
class ContextKey extends Disposable implements IContextKey<ContextValueType> {
|
||||
static readonly ContextValue = new RawContextKey<string | undefined>('contextValue', undefined);
|
||||
static readonly TreeId = new RawContextKey<string | undefined>('treeId', undefined);
|
||||
private _contextValueKey: IContextKey<string | undefined>;
|
||||
private _treeIdKey: IContextKey<string | undefined>;
|
||||
private _item: ContextValueType;
|
||||
|
||||
constructor(
|
||||
@IContextKeyService contextKeyService: IContextKeyService
|
||||
) {
|
||||
super();
|
||||
this._contextValueKey = ContextKey.ContextValue.bindTo(contextKeyService);
|
||||
this._treeIdKey = ContextKey.TreeId.bindTo(contextKeyService);
|
||||
}
|
||||
set(value: ContextValueType): void {
|
||||
this.reset();
|
||||
this._item = value;
|
||||
if (value instanceof ConnectionDialogTreeProviderElement) {
|
||||
this._treeIdKey.set(value.id);
|
||||
} else {
|
||||
this._contextValueKey.set(value.contextValue);
|
||||
}
|
||||
}
|
||||
reset(): void {
|
||||
this._contextValueKey.reset();
|
||||
this._treeIdKey.reset();
|
||||
}
|
||||
get(): ContextValueType {
|
||||
return this._item;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user