Removed advanced options from table designer title (#2025)

* Removed advanced options from table designer title

* Revert "Removed advanced options from table designer title"

This reverts commit 70246a605608df67d6aa7293d9e5b3726523187f.

* added null check for advancedOps
This commit is contained in:
Alex Ma
2023-04-25 17:08:54 -07:00
committed by GitHub
parent 3e0135b907
commit 55335b4615

View File

@@ -1831,10 +1831,13 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
{
var td = GetTableDesigner(tableInfo);
var advancedOpsIndex = tableInfo.Tooltip.LastIndexOf('[');
var advancedOps = tableInfo.Tooltip.Substring(advancedOpsIndex);
var advancedOps = "";
if(advancedOpsIndex > -1){
advancedOps = " " + tableInfo.Tooltip.Substring(advancedOpsIndex);
}
tableInfo.Title = td.TableViewModel.FullName;
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}{2}", tableParent, tableInfo.Title, advancedOps);
}
private Dictionary<string, string> GetMetadata(TableInfo tableInfo)