Browse Source

remove isLastLine from interface - use stack instead; fix null reference if resolve of TypeDefinition fails

newNRvisualizers
Siegfried Pammer 15 years ago
parent
commit
3974a801e1
  1. 2
      ICSharpCode.NRefactory/CSharp/OutputVisitor/IOutputFormatter.cs
  2. 4
      ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs
  3. 2
      ICSharpCode.NRefactory/CSharp/OutputVisitor/TextWriterOutputFormatter.cs

2
ICSharpCode.NRefactory/CSharp/OutputVisitor/IOutputFormatter.cs

@ -39,6 +39,6 @@ namespace ICSharpCode.NRefactory.CSharp @@ -39,6 +39,6 @@ namespace ICSharpCode.NRefactory.CSharp
void NewLine();
void WriteComment(CommentType commentType, string content, bool isLastLine = false);
void WriteComment(CommentType commentType, string content);
}
}

4
ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

@ -2147,9 +2147,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -2147,9 +2147,7 @@ namespace ICSharpCode.NRefactory.CSharp
// "1.0 / /*comment*/a", then we need to insert a space in front of the comment.
formatter.Space();
}
bool isContinuing = (comment.NextSibling is Comment && ((Comment)comment.NextSibling).CommentType == comment.CommentType);
formatter.WriteComment(comment.CommentType, comment.Content, !isContinuing);
formatter.WriteComment(comment.CommentType, comment.Content);
lastWritten = LastWritten.Whitespace;
return null;
}

2
ICSharpCode.NRefactory/CSharp/OutputVisitor/TextWriterOutputFormatter.cs

@ -88,7 +88,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -88,7 +88,7 @@ namespace ICSharpCode.NRefactory.CSharp
indentation--;
}
public void WriteComment(CommentType commentType, string content, bool isLastLine = false)
public void WriteComment(CommentType commentType, string content)
{
WriteIndentation();
switch (commentType) {

Loading…
Cancel
Save