generator: Remove redundant class name from method name

If you move a global method to a class, you often end up with something
like Tag.TagExists(). This will now be automatically renamed to
Tag.Exists().
This commit is contained in:
Stephan Sundermann 2013-10-11 17:20:07 +02:00 committed by Bertrand Lorentz
parent 68780a6226
commit 8e307d8eaa

View file

@ -133,6 +133,9 @@ namespace GtkSharp.Generation {
else if (Modifiers == "new " || (dup != null && ((dup.Signature != null && Signature != null && dup.Signature.ToString() == Signature.ToString()) || (dup.Signature == null && Signature == null))))
sw.Write("new ");
if (Name.StartsWith (container_type.Name))
Name = Name.Substring (container_type.Name.Length);
if (is_get || is_set) {
if (retval.IsVoid)
sw.Write (Parameters.AccessorReturnType);