C# Class Microsoft.R.Editor.Comments.RCommenter

Provides functionality for comment/uncomment lines in R editor document
ファイルを表示 Open project: Microsoft/RTVS Class Usage Examples

Public Methods

Method Description
CommentBlock ( ITextView textView, ITextBuffer textBuffer, ITextRange range, IEditorShell editorShell ) : void

Comments selected lines or current line if range has zero length. Continues adding commentcharacter even if line is already commented. # -> ## -> ### and so on. Matches C# behavior.

DoActionOnLines ( ITextView textView, ITextBuffer textBuffer, ITextRange range, IEditorShell editorShell, bool>.Func action, string actionName ) : void
UncommentBlock ( ITextView textView, ITextBuffer textBuffer, ITextRange range, IEditorShell editorShell ) : void

Uncomments selected lines or current line if range has zero length. Only removes single comment. ### -> ## -> # and so on. Matches C# behavior.

Private Methods

Method Description
CommentLine ( ITextSnapshotLine line ) : bool
UncommentLine ( ITextSnapshotLine line ) : bool

Method Details

CommentBlock() public static method

Comments selected lines or current line if range has zero length. Continues adding commentcharacter even if line is already commented. # -> ## -> ### and so on. Matches C# behavior.
public static CommentBlock ( ITextView textView, ITextBuffer textBuffer, ITextRange range, IEditorShell editorShell ) : void
textView ITextView
textBuffer ITextBuffer
range ITextRange
editorShell IEditorShell
return void

DoActionOnLines() public static method

public static DoActionOnLines ( ITextView textView, ITextBuffer textBuffer, ITextRange range, IEditorShell editorShell, bool>.Func action, string actionName ) : void
textView ITextView
textBuffer ITextBuffer
range ITextRange
editorShell IEditorShell
action bool>.Func
actionName string
return void

UncommentBlock() public static method

Uncomments selected lines or current line if range has zero length. Only removes single comment. ### -> ## -> # and so on. Matches C# behavior.
public static UncommentBlock ( ITextView textView, ITextBuffer textBuffer, ITextRange range, IEditorShell editorShell ) : void
textView ITextView
textBuffer ITextBuffer
range ITextRange
editorShell IEditorShell
return void