C# Class Microsoft.Languages.Editor.Controller.TextViewConnectionListener

Base text view connection listener. Generates norifications to derived classes when text buffer is created, when secondary buffer is connected or when view gets aggregate focus.
Inheritance: IWpfTextViewCreationListener, IWpfTextViewConnectionListener
ファイルを表示 Open project: Microsoft/RTVS

Private Properties

Property Type Description
CheckForViewlessTextBuffers void
EnsureInitialized void
OnIdle void
OnTerminateApp void

Public Methods

Method Description
GetFirstViewForBuffer ( ITextBuffer textBuffer ) : ITextView
GetTextViewDataForBuffer ( ITextBuffer textBuffer ) : Microsoft.Languages.Editor.Controller.TextViewData
GetViewsForBuffer ( ITextBuffer textBuffer ) : IEnumerable
StaticFlushPendingAction ( ) : void

Can be called from tests when idle doesn't occur

SubjectBuffersConnected ( IWpfTextView textView, ConnectionReason reason, Collection subjectBuffers ) : void
SubjectBuffersDisconnected ( IWpfTextView textView, ConnectionReason reason, Collection subjectBuffers ) : void
TextViewCreated ( IWpfTextView textView ) : void

Protected Methods

Method Description
FlushPendingAction ( ) : void
OnTextBufferCreated ( ITextView textView, ITextBuffer textBuffer ) : void

Called once for every new text buffer.

OnTextBufferDisposing ( ITextBuffer textBuffer ) : void

Called once per buffer, when it detached from its last view

OnTextViewConnected ( ITextView textView, ITextBuffer textBuffer ) : void

Called when text view is connected to the subject buffer

OnTextViewCreated ( ITextView textView ) : void

Called once for every new text view.

OnTextViewDisconnected ( ITextView textView, ITextBuffer textBuffer ) : void

Called when text view is disconnected from the subject buffer

OnTextViewGotAggregateFocus ( ITextView textView, ITextBuffer textBuffer ) : void

Called when view gets aggregate focus. Typically implemented if derived class needs to access native VS adapters, like IVsTextView.

TextViewConnectionListener ( ) : System

Private Methods

Method Description
CheckForViewlessTextBuffers ( ) : void

Called delayed on the main thread to catch text buffers that don't have a view anymore

EnsureInitialized ( ) : void
OnIdle ( object sender, EventArgs e ) : void
OnTerminateApp ( object sender, EventArgs eventArgs ) : void

Method Details

FlushPendingAction() protected method

protected FlushPendingAction ( ) : void
return void

GetFirstViewForBuffer() public static method

public static GetFirstViewForBuffer ( ITextBuffer textBuffer ) : ITextView
textBuffer ITextBuffer
return ITextView

GetTextViewDataForBuffer() public static method

public static GetTextViewDataForBuffer ( ITextBuffer textBuffer ) : Microsoft.Languages.Editor.Controller.TextViewData
textBuffer ITextBuffer
return Microsoft.Languages.Editor.Controller.TextViewData

GetViewsForBuffer() public static method

public static GetViewsForBuffer ( ITextBuffer textBuffer ) : IEnumerable
textBuffer ITextBuffer
return IEnumerable

OnTextBufferCreated() protected method

Called once for every new text buffer.
protected OnTextBufferCreated ( ITextView textView, ITextBuffer textBuffer ) : void
textView ITextView
textBuffer ITextBuffer
return void

OnTextBufferDisposing() protected method

Called once per buffer, when it detached from its last view
protected OnTextBufferDisposing ( ITextBuffer textBuffer ) : void
textBuffer ITextBuffer
return void

OnTextViewConnected() protected method

Called when text view is connected to the subject buffer
protected OnTextViewConnected ( ITextView textView, ITextBuffer textBuffer ) : void
textView ITextView
textBuffer ITextBuffer
return void

OnTextViewCreated() protected method

Called once for every new text view.
protected OnTextViewCreated ( ITextView textView ) : void
textView ITextView
return void

OnTextViewDisconnected() protected method

Called when text view is disconnected from the subject buffer
protected OnTextViewDisconnected ( ITextView textView, ITextBuffer textBuffer ) : void
textView ITextView
textBuffer ITextBuffer
return void

OnTextViewGotAggregateFocus() protected method

Called when view gets aggregate focus. Typically implemented if derived class needs to access native VS adapters, like IVsTextView.
protected OnTextViewGotAggregateFocus ( ITextView textView, ITextBuffer textBuffer ) : void
textView ITextView
textBuffer ITextBuffer
return void

StaticFlushPendingAction() public static method

Can be called from tests when idle doesn't occur
public static StaticFlushPendingAction ( ) : void
return void

SubjectBuffersConnected() public method

public SubjectBuffersConnected ( IWpfTextView textView, ConnectionReason reason, Collection subjectBuffers ) : void
textView IWpfTextView
reason ConnectionReason
subjectBuffers Collection
return void

SubjectBuffersDisconnected() public method

public SubjectBuffersDisconnected ( IWpfTextView textView, ConnectionReason reason, Collection subjectBuffers ) : void
textView IWpfTextView
reason ConnectionReason
subjectBuffers Collection
return void

TextViewConnectionListener() protected method

protected TextViewConnectionListener ( ) : System
return System

TextViewCreated() public method

public TextViewCreated ( IWpfTextView textView ) : void
textView IWpfTextView
return void