Browse Source

Don't show fully qualified names

pull/10/head
David Srbecký 15 years ago
parent
commit
19a5b6c151
  1. 20
      ICSharpCode.Decompiler/Ast/AstBuilder.cs

20
ICSharpCode.Decompiler/Ast/AstBuilder.cs

@ -247,14 +247,18 @@ namespace Decompiler @@ -247,14 +247,18 @@ namespace Decompiler
}
name = ICSharpCode.NRefactory.TypeSystem.ReflectionHelper.SplitTypeParameterCountFromReflectionName(name);
if (ns.Length == 0)
return new SimpleType(name);
string[] parts = ns.Split('.');
AstType nsType = new SimpleType(parts[0]);
for (int i = 1; i < parts.Length; i++) {
nsType = new MemberType { Target = nsType, MemberName = parts[i] };
}
return new MemberType { Target = nsType, MemberName = name }.WithAnnotation(type);
// TODO: Until we can simplify type with 'using', use just the name without namesapce
return new SimpleType(name).WithAnnotation(type);
// if (ns.Length == 0)
// return new SimpleType(name).WithAnnotation(type);
// string[] parts = ns.Split('.');
// AstType nsType = new SimpleType(parts[0]);
// for (int i = 1; i < parts.Length; i++) {
// nsType = new MemberType { Target = nsType, MemberName = parts[i] };
// }
// return new MemberType { Target = nsType, MemberName = name }.WithAnnotation(type);
}
}
}

Loading…
Cancel
Save