Removed advanced options from Table Designer tooltip (#2145)

* Removed advanced options from tooltip

* cleanup for table designer
This commit is contained in:
Alex Ma
2023-07-17 15:14:50 -07:00
committed by GitHub
parent 1d05cdb131
commit 1000886ac3

View File

@@ -1845,14 +1845,9 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
private void UpdateTableTitleInfo(TableInfo tableInfo) private void UpdateTableTitleInfo(TableInfo tableInfo)
{ {
var td = GetTableDesigner(tableInfo); var td = GetTableDesigner(tableInfo);
var advancedOpsIndex = tableInfo.Tooltip.LastIndexOf('[');
var advancedOps = "";
if(advancedOpsIndex > -1){
advancedOps = " " + tableInfo.Tooltip.Substring(advancedOpsIndex);
}
tableInfo.Title = td.TableViewModel.FullName; tableInfo.Title = td.TableViewModel.FullName;
var tableParent = tableInfo.Server == null ? tableInfo.ProjectFilePath : string.Format("{0} - {1}", tableInfo.Server, tableInfo.Database); var tableParent = tableInfo.Server == null ? tableInfo.ProjectFilePath : string.Format("{0} - {1}", tableInfo.Server, tableInfo.Database);
tableInfo.Tooltip = string.Format("{0} - {1}{2}", tableParent, tableInfo.Title, advancedOps); tableInfo.Tooltip = string.Format("{0} - {1}", tableParent, tableInfo.Title);
} }
private Dictionary<string, string> GetMetadata(TableInfo tableInfo) private Dictionary<string, string> GetMetadata(TableInfo tableInfo)