diff --git a/extensions/mssql/package.json b/extensions/mssql/package.json index e03111c1f5..db6781ca85 100644 --- a/extensions/mssql/package.json +++ b/extensions/mssql/package.json @@ -498,6 +498,11 @@ "command": "mssqlCluster.livy.cmd.submitFileToSparkJob", "when": "nodeType == mssqlCluster:file && nodeSubType =~/:spark:/", "group": "1mssqlCluster@6" + }, + { + "command": "mssql.designTable", + "when": "connectionProvider == MSSQL && nodeType == Table && config.tableDesigner.enableFeature", + "group": "0_query@3" } ], "notebook/toolbar": [ diff --git a/src/sql/workbench/contrib/preferences/browser/sqlSettingsLayout.ts b/src/sql/workbench/contrib/preferences/browser/sqlSettingsLayout.ts index e5ff239191..965957a49c 100644 --- a/src/sql/workbench/contrib/preferences/browser/sqlSettingsLayout.ts +++ b/src/sql/workbench/contrib/preferences/browser/sqlSettingsLayout.ts @@ -41,6 +41,11 @@ let sqlTocItems: ITOCEntry[] = [{ id: 'data/builtinCharts', label: localize('builtinCharts', "Built-in Charts"), settings: ['builtinCharts.*'] + }, + { + id: 'data/tableDesigner', + label: localize('tableDesigner', "Table Designer"), + settings: ['tableDesigner.*'] } ] }]; diff --git a/src/sql/workbench/contrib/tableDesigner/browser/tableDesigner.contribution.ts b/src/sql/workbench/contrib/tableDesigner/browser/tableDesigner.contribution.ts index 6dea80d063..6eebeaca18 100644 --- a/src/sql/workbench/contrib/tableDesigner/browser/tableDesigner.contribution.ts +++ b/src/sql/workbench/contrib/tableDesigner/browser/tableDesigner.contribution.ts @@ -9,6 +9,8 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { Registry } from 'vs/platform/registry/common/platform'; import { EditorDescriptor, IEditorRegistry } from 'vs/workbench/browser/editor'; import { EditorExtensions } from 'vs/workbench/common/editor'; +import { localize } from 'vs/nls'; +import { IConfigurationRegistry, Extensions as ConfigExtensions } from 'vs/platform/configuration/common/configurationRegistry'; const tableDesignerDescriptor = EditorDescriptor.create( TableDesignerEditor, @@ -18,3 +20,16 @@ const tableDesignerDescriptor = EditorDescriptor.create( Registry.as(EditorExtensions.Editors) .registerEditor(tableDesignerDescriptor, [new SyncDescriptor(TableDesignerInput)]); + +Registry.as(ConfigExtensions.Configuration).registerConfiguration({ + id: 'tableDesigner', + title: localize('tableDesigner.configTitle', "Table Designer"), + type: 'object', + properties: { + 'tableDesigner.enableFeature': { + 'type': 'boolean', + 'default': false, + 'description': localize('tableDesigner.featureEnabledDescription', "Controls whether the table designer feature is enabled. Default value is false.") + } + } +});