support rename for login, user and a few other types (#22331)

* rename object

* add comment

* use URN property

* vbump STS

* revert loc string change

* fix name check

* pr comments
This commit is contained in:
Alan Ren
2023-03-16 15:00:07 -07:00
committed by GitHub
parent f5628ed8e3
commit 20cf2489a2
12 changed files with 164 additions and 10 deletions

View File

@@ -44,6 +44,7 @@ export class MssqlNodeContext extends Disposable {
static IsWindows = new RawContextKey<boolean>('isWindows', isWindows);
static IsCloud = new RawContextKey<boolean>('isCloud', false);
static NodeType = new RawContextKey<string>('nodeType', undefined);
static NodePath = new RawContextKey<string>('nodePath', undefined);
static ObjectType = new RawContextKey<string>('objectType', undefined);
static NodeLabel = new RawContextKey<string>('nodeLabel', undefined);
static EngineEdition = new RawContextKey<number>('engineEdition', DatabaseEngineEdition.Unknown);
@@ -60,6 +61,7 @@ export class MssqlNodeContext extends Disposable {
private nodeProviderKey!: IContextKey<string>;
private isCloudKey!: IContextKey<boolean>;
private nodeTypeKey!: IContextKey<string>;
private nodePathKey!: IContextKey<string>;
private objectTypeKey!: IContextKey<string>;
private nodeLabelKey!: IContextKey<string>;
private isDatabaseOrServerKey!: IContextKey<boolean>;
@@ -99,6 +101,9 @@ export class MssqlNodeContext extends Disposable {
this.setScriptingContextKeys();
this.nodeTypeKey.set(node.contextValue);
}
if (node.nodeInfo?.nodePath) {
this.nodePathKey.set(node.nodeInfo.nodePath);
}
this.setQueryEnabledKey();
}
if (node.label) {
@@ -112,6 +117,7 @@ export class MssqlNodeContext extends Disposable {
this.isCloudKey = MssqlNodeContext.IsCloud.bindTo(this.contextKeyService);
this.engineEditionKey = MssqlNodeContext.EngineEdition.bindTo(this.contextKeyService);
this.nodeTypeKey = MssqlNodeContext.NodeType.bindTo(this.contextKeyService);
this.nodePathKey = MssqlNodeContext.NodePath.bindTo(this.contextKeyService);
this.objectTypeKey = MssqlNodeContext.ObjectType.bindTo(this.contextKeyService);
this.nodeLabelKey = MssqlNodeContext.NodeLabel.bindTo(this.contextKeyService);
this.isDatabaseOrServerKey = MssqlNodeContext.IsDatabaseOrServer.bindTo(this.contextKeyService);