Browse Source

[Refactoring] Corrected formatting region.

newNRvisualizers
Mike Krüger 13 years ago
parent
commit
810a1e8911
  1. 5
      ICSharpCode.NRefactory.CSharp/Refactoring/DocumentScript.cs

5
ICSharpCode.NRefactory.CSharp/Refactoring/DocumentScript.cs

@ -104,7 +104,10 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
var segment = GetSegment(node); var segment = GetSegment(node);
var formatter = new AstFormattingVisitor(FormattingOptions, currentDocument, Options); var formatter = new AstFormattingVisitor(FormattingOptions, currentDocument, Options);
formatter.FormattingRegion = new ICSharpCode.NRefactory.TypeSystem.DomRegion (node.StartLocation, node.EndLocation); formatter.FormattingRegion = new ICSharpCode.NRefactory.TypeSystem.DomRegion (
currentDocument.GetLocation (segment.Offset),
currentDocument.GetLocation (segment.EndOffset)
);
syntaxTree.AcceptVisitor(formatter); syntaxTree.AcceptVisitor(formatter);
formatter.ApplyChanges(segment.Offset, segment.Length); formatter.ApplyChanges(segment.Offset, segment.Length);
} }

Loading…
Cancel
Save