From 16f24d8c6a9ac7fcd05c570f28e8460097f599fd Mon Sep 17 00:00:00 2001 From: Alan Ren Date: Thu, 16 Jul 2020 10:22:47 -0700 Subject: [PATCH] fix the issue with explorer widget context menu (#11373) --- .../contrib/dashboard/browser/widgets/explorer/explorerTable.ts | 2 +- .../contrib/scripting/browser/scripting.contribution.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable.ts b/src/sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable.ts index 0ef1eeca84..34674257ac 100644 --- a/src/sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable.ts +++ b/src/sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable.ts @@ -117,7 +117,7 @@ export class ExplorerTable extends Disposable { }; } else { context = { - profile: dataContext, + profile: dataContext.toIConnectionProfile(), uri: this.bootStrapService.getUnderlyingUri() }; } diff --git a/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts b/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts index c04dd781c9..dc1d453336 100644 --- a/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts +++ b/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts @@ -296,6 +296,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerWidgetContext, { id: commands.ExplorerScriptCreateAction.ID, title: commands.ExplorerScriptCreateAction.LABEL }, + when: ItemContextKey.ItemType.notEqualsTo('database'), order: 2 }); //#endregion