C# Class Microsoft.Languages.Editor.Extensions.TextBufferExtensions

Exibir arquivo Open project: Microsoft/RTVS

Public Methods

Method Description
AddBufferDisposedAction ( this textBuffer, ICoreShell shell, ICoreShell>.Action callback ) : void
CurrentTextView ( this viewBuffer ) : ITextView
GetBufferGraph ( this viewBuffer ) : IBufferGraph

Given view buffer (top-level buffer in the projection tree) returns buffer graph.

GetChangedExtent ( this oldVersion, ITextVersion newVersion, Span &oldSpan, Span &newSpan ) : bool
GetContributingBuffers ( this textBuffer ) : IEnumerable
GetFileName ( this textBuffer ) : string
GetLineColumnFromPosition ( this textBuffer, int position, int &line, int &column ) : bool

Converts stream buffer position to line and column.

GetPositionFromLineColumn ( this textBuffer, int line, int column ) : int?

Converts line and column positions to a stream buffer position.

GetTextDocument ( this textBuffer ) : ITextDocument
IsContributingBuffer ( this buffer, ITextBuffer contributingBuffer ) : bool
IsSignatureHelpBuffer ( this textBuffer ) : bool
MapDown ( this viewBuffer, SnapshotPoint viewPoint, string contentTypeName ) : SnapshotPoint?

Given top-level text buffer (i.e. view buffer) maps location down the buffer graph to the project buffer of the specified content type, if any.

MapUp ( this viewBuffer, SnapshotPoint sourcePoint, string contentTypeName ) : SnapshotPoint?

Given top-level text buffer (i.e. view buffer) and location in the projected buffer maps location up the buffer graph from the buffer of the specified content type to the view buffer.

MapUp ( this viewBuffer, Span sourceSpan, string contentTypeName ) : SnapshotSpan?

Given top-level text buffer (i.e. view buffer) and location in the projected buffer maps location up the buffer graph from the buffer of the specified content type to the view buffer.

Method Details

AddBufferDisposedAction() public static method

public static AddBufferDisposedAction ( this textBuffer, ICoreShell shell, ICoreShell>.Action callback ) : void
textBuffer this
shell ICoreShell
callback ICoreShell>.Action
return void

CurrentTextView() public static method

public static CurrentTextView ( this viewBuffer ) : ITextView
viewBuffer this
return ITextView

GetBufferGraph() public static method

Given view buffer (top-level buffer in the projection tree) returns buffer graph.
public static GetBufferGraph ( this viewBuffer ) : IBufferGraph
viewBuffer this
return IBufferGraph

GetChangedExtent() public static method

public static GetChangedExtent ( this oldVersion, ITextVersion newVersion, Span &oldSpan, Span &newSpan ) : bool
oldVersion this
newVersion ITextVersion
oldSpan Span
newSpan Span
return bool

GetContributingBuffers() public static method

public static GetContributingBuffers ( this textBuffer ) : IEnumerable
textBuffer this
return IEnumerable

GetFileName() public static method

public static GetFileName ( this textBuffer ) : string
textBuffer this
return string

GetLineColumnFromPosition() public static method

Converts stream buffer position to line and column.
public static GetLineColumnFromPosition ( this textBuffer, int position, int &line, int &column ) : bool
textBuffer this
position int
line int
column int
return bool

GetPositionFromLineColumn() public static method

Converts line and column positions to a stream buffer position.
public static GetPositionFromLineColumn ( this textBuffer, int line, int column ) : int?
textBuffer this
line int
column int
return int?

GetTextDocument() public static method

public static GetTextDocument ( this textBuffer ) : ITextDocument
textBuffer this
return ITextDocument

IsContributingBuffer() public static method

public static IsContributingBuffer ( this buffer, ITextBuffer contributingBuffer ) : bool
buffer this
contributingBuffer ITextBuffer
return bool

IsSignatureHelpBuffer() public static method

public static IsSignatureHelpBuffer ( this textBuffer ) : bool
textBuffer this
return bool

MapDown() public static method

Given top-level text buffer (i.e. view buffer) maps location down the buffer graph to the project buffer of the specified content type, if any.
public static MapDown ( this viewBuffer, SnapshotPoint viewPoint, string contentTypeName ) : SnapshotPoint?
viewBuffer this
viewPoint SnapshotPoint
contentTypeName string
return SnapshotPoint?

MapUp() public static method

Given top-level text buffer (i.e. view buffer) and location in the projected buffer maps location up the buffer graph from the buffer of the specified content type to the view buffer.
public static MapUp ( this viewBuffer, SnapshotPoint sourcePoint, string contentTypeName ) : SnapshotPoint?
viewBuffer this
sourcePoint SnapshotPoint
contentTypeName string
return SnapshotPoint?

MapUp() public static method

Given top-level text buffer (i.e. view buffer) and location in the projected buffer maps location up the buffer graph from the buffer of the specified content type to the view buffer.
public static MapUp ( this viewBuffer, Span sourceSpan, string contentTypeName ) : SnapshotSpan?
viewBuffer this
sourceSpan Span
contentTypeName string
return SnapshotSpan?