static void AddAsCompletionData (CompletionDataCollector col, IType type)
{
if (type == null)
return;
string netName = CSharpAmbience.NetToCSharpTypeName (type.FullName);
if (!string.IsNullOrEmpty (netName) && netName != type.FullName)
col.Add (netName);
if (!String.IsNullOrEmpty (type.Namespace) && !col.IsNamespaceInScope (type.Namespace)) {
string[] ns = type.Namespace.Split ('.');
for (int i = 0; i < ns.Length; i++) {
col.Add (new Namespace (ns[i]));
if (!col.IsNamespaceInScope (ns[i]))
return;
}
}
col.Add (type);
}