Fixed the issue with nodeType set to null for many sql objects in object explorer (#323)

* Fixed the issue with nodeType set to null for sql objects
This commit is contained in:
Leila Lali
2017-04-19 15:49:00 -07:00
committed by GitHub
parent 850cf8c3e4
commit 3fd4129488
7 changed files with 201 additions and 106 deletions

View File

@@ -179,6 +179,12 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
WriteLine(" var child = new SmoTreeNode();");
WriteLine(" child.IsAlwaysLeaf = true;");
if (type.EndsWith("s"))
{
var typeName = type.Substring(0, type.Length - 1);
WriteLine(string.Format(" child.NodeType = \"{0}\";", typeName));
}
}
else
{