From d5672db69b1577976a6e019bb1c2b5bb1ade75fa Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 16 Jul 2011 08:24:33 +0200 Subject: [PATCH] fix output of Inherits/Implements clauses --- .../OutputVisitor/OutputVisitor.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/NRefactory/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs b/NRefactory/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs index d6164785d..ac58945a3 100644 --- a/NRefactory/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs +++ b/NRefactory/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs @@ -238,13 +238,24 @@ namespace ICSharpCode.NRefactory.VB WriteModifiers(typeDeclaration.ModifierTokens); WriteClassTypeKeyword(typeDeclaration); WriteIdentifier(typeDeclaration.Name.Name); + MarkFoldStart(); + NewLine(); + if (!typeDeclaration.InheritsType.IsNull) { - Space(); + Indent(); WriteKeyword("Inherits"); typeDeclaration.InheritsType.AcceptVisitor(this, data); + Unindent(); + NewLine(); } - WriteImplementsClause(typeDeclaration.ImplementsTypes); - MarkFoldStart(); + if (typeDeclaration.ImplementsTypes.Any()) { + Indent(); + WriteImplementsClause(typeDeclaration.ImplementsTypes); + Unindent(); + NewLine(); + } + + if (!typeDeclaration.InheritsType.IsNull || typeDeclaration.ImplementsTypes.Any()) NewLine(); WriteMembers(typeDeclaration.Members); @@ -1196,7 +1207,6 @@ namespace ICSharpCode.NRefactory.VB void WriteImplementsClause(AstNodeCollection implementsClause) { if (implementsClause.Any()) { - Space(); WriteKeyword("Implements"); WriteCommaSeparatedList(implementsClause); }