Browse Source

ITextSource.MoveOffsetTo: make AnchorMovementType parameter optional.

newNRvisualizers
Daniel Grunwald 14 years ago
parent
commit
fba2d7c273
  1. 6
      ICSharpCode.NRefactory.CSharp/Refactoring/DocumentScript.cs
  2. 2
      ICSharpCode.NRefactory/Editor/ITextSource.cs

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

@ -91,7 +91,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
public override int GetCurrentOffset(int originalDocumentOffset) public override int GetCurrentOffset(int originalDocumentOffset)
{ {
return originalDocument.Version.MoveOffsetTo(currentDocument.Version, originalDocumentOffset, AnchorMovementType.Default); return originalDocument.Version.MoveOffsetTo(currentDocument.Version, originalDocumentOffset);
} }
public override void FormatText(AstNode node) public override void FormatText(AstNode node)
@ -147,7 +147,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
} }
public int Offset { public int Offset {
get { return originalVersion.MoveOffsetTo(script.currentDocument.Version, originalStart, AnchorMovementType.Default); } get { return originalVersion.MoveOffsetTo(script.currentDocument.Version, originalStart); }
} }
public int Length { public int Length {
@ -155,7 +155,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
} }
public int EndOffset { public int EndOffset {
get { return originalVersion.MoveOffsetTo(script.currentDocument.Version, originalEnd, AnchorMovementType.Default); } get { return originalVersion.MoveOffsetTo(script.currentDocument.Version, originalEnd); }
} }
} }
} }

2
ICSharpCode.NRefactory/Editor/ITextSource.cs

@ -200,6 +200,6 @@ namespace ICSharpCode.NRefactory.Editor
/// Calculates where the offset has moved in the other buffer version. /// Calculates where the offset has moved in the other buffer version.
/// </summary> /// </summary>
/// <exception cref="ArgumentException">Raised if 'other' belongs to a different document than this checkpoint.</exception> /// <exception cref="ArgumentException">Raised if 'other' belongs to a different document than this checkpoint.</exception>
int MoveOffsetTo(ITextSourceVersion other, int oldOffset, AnchorMovementType movement); int MoveOffsetTo(ITextSourceVersion other, int oldOffset, AnchorMovementType movement = AnchorMovementType.Default);
} }
} }

Loading…
Cancel
Save