IDifferenceBuffer Interface
A difference buffer constantly computes the differences between two ITextBuffers, providing an IProjectionBuffer, TopLevelBuffer, that contains the differences between the two ITextBuffers in an inline difference.
Namespace: Microsoft.VisualStudio.Data.Tools.Delta
Assembly: Microsoft.VisualStudio.Data.Tools.Delta (in Microsoft.VisualStudio.Data.Tools.Delta.dll)
Syntax
'Declaration
Public Interface IDifferenceBuffer _
Inherits IDisposable, IPropertyOwner
'Usage
Dim instance As IDifferenceBuffer
public interface IDifferenceBuffer : IDisposable,
IPropertyOwner
public interface class IDifferenceBuffer : IDisposable,
IPropertyOwner
type IDifferenceBuffer =
interface
interface IDisposable
interface IPropertyOwner
end
public interface IDifferenceBuffer extends IDisposable, IPropertyOwner
The IDifferenceBuffer type exposes the following members.
Properties
Name | Description | |
---|---|---|
CurrentSnapshotDifference | The currently-used snapshot difference that matches up with the current snapshot of TopLevelBuffer. | |
CurrentTopLevelSnapshot | The snapshot of TopLevelBuffer that corresponds to the state at which CurrentSnapshotDifference is current. | |
DifferenceOptions | Used to get or set the options used in differencing the two buffers. | |
LeftBuffer | The left buffer in the difference. | |
Options | Used to get or set general difference buffer options (DifferenceBufferOptions). | |
Properties | (Inherited from IPropertyOwner.) | |
RightBuffer | The right buffer in the difference. | |
TopLevelBuffer | The top-level buffer, which contains the differences combined. |
Top
Methods
Name | Description | |
---|---|---|
AddCustomIgnoreDifferencePredicate | Add a custom predicate to selectively ignore differences. | |
AddSnapshotLineFilter | Add a custom SnapshotLineFilter, which can modify lines of text before they are compared. | |
ComputeApproximateSourceLinesForPoint | Get the approximate line numbers in the left and right buffers for the given point in the top buffer. | |
ComputeApproximateTopLevelLineForPoint | Get the approximate line number in the top-level buffer for the given point in the left or right buffer. | |
Dispose | (Inherited from IDisposable.) | |
FindLineDifferences(SnapshotPoint) | Find differences around the given point. | |
FindLineDifferences(SnapshotPoint, Boolean) | Find differences around the given point, optionally including "empty" differences. | |
FindNextLineDifference(SnapshotPoint) | Given a point that maps to the difference buffer or either the left or right buffer, find the next Difference or null if there is none to be found. If the given point is inside a line difference, finds the next one. | |
FindNextLineDifference(SnapshotPoint, Predicate< (Of < <' (Difference> ) > > )) | Given a point that maps to the difference buffer or either the left or right buffer, find the next Difference that matches the given predicate, or null if there is none to be found. If the given point is inside a line difference, finds the next one. | |
FindPreviousLineDifference(SnapshotPoint) | Given a point that maps to the difference buffer or either the left or right buffer, find the previous Difference or null if there is none to be found. If the given point is inside a line difference, finds the previous one. | |
FindPreviousLineDifference(SnapshotPoint, Predicate< (Of < <' (Difference> ) > > )) | Given a point that maps to the difference buffer or either the left or right buffer, find the previous Difference that matches the given predicate, or null if there is none to be found. If the given point is inside a line difference, finds the next one. | |
GetLineType | Given a point that maps to the difference buffer or either the left or right buffer, find the type of its containing line. | |
MapToDifferenceBuffer(Difference) | Given a line difference, find the associated SnapshotSpan in the difference buffer. | |
MapToDifferenceBuffer(Match) | Given a line match, find the associated SnapshotSpan in the difference buffer. | |
MapToDifferenceBuffer(SnapshotPoint) | Given a point that maps to either the LeftBuffer or RightBuffer, map that point up to the difference buffer. | |
PerformActionWithLeftBufferWritable | Perform the given edit action on the left buffer. Normally, the left buffer is kept read-only, but this method temporarily removes that protection. | |
RemoveCustomIgnoreDifferencePredicate | Remove a custom predicate previously added with <see cref="M:Microsoft.VisualStudio.Data.Tools.Delta.IDifferenceBuffer.AddCustomIgnoreDifferencePredicate(Microsoft.VisualStudio.Data.Tools.Delta.IgnoreDifferencePredicate)" />. | |
RemoveSnapshotLineFilter | Remove a custom SnapshotLineFilter previously added with <see cref="M:Microsoft.VisualStudio.Data.Tools.Delta.IDifferenceBuffer.AddSnapshotLineFilter(Microsoft.VisualStudio.Data.Tools.Delta.SnapshotLineFilter)" />. |
Top
Events
Name | Description | |
---|---|---|
SnapshotDifferenceChanged | Raised when the CurrentSnapshotDifference and TopLevelBuffer have changed. | |
SnapshotDifferenceChanging | Raised immediately before the CurrentSnapshotDifference and TopLevelBuffer are updated. |
Top