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

Provides functionality for comment/uncomment lines in R editor document
Afficher le fichier Open project: Microsoft/RTVS Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
CommentLine ( ITextSnapshotLine line ) : bool
UncommentLine ( ITextSnapshotLine line ) : bool

Method Details

CommentBlock() public static méthode

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
Résultat void

DoActionOnLines() public static méthode

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
Résultat void

UncommentBlock() public static méthode

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
Résultat void