C# Class Microsoft.Markdown.Editor.ContainedLanguage.MdContainedLanguageHost

Host for contained (embedded) language editors such as R editor inside ``` code ``` blocks in R Markdown.
Inheritance: IContainedLanguageHost
Datei anzeigen Open project: Microsoft/RTVS Class Usage Examples

Public Methods

Method Description
CanFormatLine ( ITextView textView, ITextBuffer containedLanguageBuffer, int lineNumber ) : bool
IsInertRange ( ITextRange range ) : bool

Detemines if particular range should not be treated as contained language and instead should be ignored or 'skipped over'. Used by R parser to ignore 'R' in ```{R ... }

MdContainedLanguageHost ( IEditorDocument document, ITextBuffer textBuffer, ICoreShell coreShell ) : System

Creates contained language host with default settings.

RemoveContainedCommandTarget ( ITextView textView ) : void
SetContainedCommandTarget ( ITextView textView, ICommandTarget containedCommandTarget ) : ICommandTarget

Private Methods

Method Description
GetBaseCommandTarget ( ITextView textView ) : ICommandTarget

Retrieves base command target that is chained to the main controller attached to a given view. This is typically a core editor command target.

OnDocumentClosing ( object sender, EventArgs e ) : void

Method Details

CanFormatLine() public method

public CanFormatLine ( ITextView textView, ITextBuffer containedLanguageBuffer, int lineNumber ) : bool
textView ITextView
containedLanguageBuffer ITextBuffer
lineNumber int
return bool

IsInertRange() public method

Detemines if particular range should not be treated as contained language and instead should be ignored or 'skipped over'. Used by R parser to ignore 'R' in ```{R ... }
public IsInertRange ( ITextRange range ) : bool
range ITextRange
return bool

MdContainedLanguageHost() public method

Creates contained language host with default settings.
public MdContainedLanguageHost ( IEditorDocument document, ITextBuffer textBuffer, ICoreShell coreShell ) : System
document IEditorDocument Markdown editor document
textBuffer ITextBuffer Contained language text buffer
coreShell ICoreShell
return System

RemoveContainedCommandTarget() public method

public RemoveContainedCommandTarget ( ITextView textView ) : void
textView ITextView
return void

SetContainedCommandTarget() public method

public SetContainedCommandTarget ( ITextView textView, ICommandTarget containedCommandTarget ) : ICommandTarget
textView ITextView
containedCommandTarget ICommandTarget
return ICommandTarget