Update to Table Designer title (respect Connection Profile Name) (#2254)

* Added new format to tooltip (respect profile name)

* Revert "Added new test framework (test) (#2247)"

This reverts commit b2120269a7.

* Restore Query
This commit is contained in:
Alex Ma
2023-10-10 16:27:42 -07:00
committed by GitHub
parent f0d3a0d546
commit 67ae2192c3

View File

@@ -1846,7 +1846,11 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
{
var td = GetTableDesigner(tableInfo);
tableInfo.Title = td.TableViewModel.FullName;
var tableParent = tableInfo.Server == null ? tableInfo.ProjectFilePath : string.Format("{0} - {1}", tableInfo.Server, tableInfo.Database);
var tooltipName = string.Format("{0} - {1}", tableInfo.Server, tableInfo.Database);
if(!tableInfo.Tooltip.StartsWith(tooltipName)) {
tooltipName = tableInfo.Tooltip.Substring(0, tableInfo.Tooltip.LastIndexOf('-') - 1);
}
var tableParent = tableInfo.Server == null ? tableInfo.ProjectFilePath : tooltipName;
tableInfo.Tooltip = string.Format("{0} - {1}", tableParent, tableInfo.Title);
}