Browse Source

fix output of Inherits/Implements clauses

pull/254/head
Siegfried Pammer 14 years ago
parent
commit
d5672db69b
  1. 18
      NRefactory/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs

18
NRefactory/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs

@ -238,13 +238,24 @@ namespace ICSharpCode.NRefactory.VB
WriteModifiers(typeDeclaration.ModifierTokens); WriteModifiers(typeDeclaration.ModifierTokens);
WriteClassTypeKeyword(typeDeclaration); WriteClassTypeKeyword(typeDeclaration);
WriteIdentifier(typeDeclaration.Name.Name); WriteIdentifier(typeDeclaration.Name.Name);
MarkFoldStart();
NewLine();
if (!typeDeclaration.InheritsType.IsNull) { if (!typeDeclaration.InheritsType.IsNull) {
Space(); Indent();
WriteKeyword("Inherits"); WriteKeyword("Inherits");
typeDeclaration.InheritsType.AcceptVisitor(this, data); typeDeclaration.InheritsType.AcceptVisitor(this, data);
Unindent();
NewLine();
} }
WriteImplementsClause(typeDeclaration.ImplementsTypes); if (typeDeclaration.ImplementsTypes.Any()) {
MarkFoldStart(); Indent();
WriteImplementsClause(typeDeclaration.ImplementsTypes);
Unindent();
NewLine();
}
if (!typeDeclaration.InheritsType.IsNull || typeDeclaration.ImplementsTypes.Any())
NewLine(); NewLine();
WriteMembers(typeDeclaration.Members); WriteMembers(typeDeclaration.Members);
@ -1196,7 +1207,6 @@ namespace ICSharpCode.NRefactory.VB
void WriteImplementsClause(AstNodeCollection<AstType> implementsClause) void WriteImplementsClause(AstNodeCollection<AstType> implementsClause)
{ {
if (implementsClause.Any()) { if (implementsClause.Any()) {
Space();
WriteKeyword("Implements"); WriteKeyword("Implements");
WriteCommaSeparatedList(implementsClause); WriteCommaSeparatedList(implementsClause);
} }

Loading…
Cancel
Save