| FormatCommenterCommentSpan Method |
Namespace: Tvl.VisualStudio.Text.CommenterAssembly: Tvl.VisualStudio.Commenter.Utility.10 (in Tvl.VisualStudio.Commenter.Utility.10.dll) Version: 1.0.0.0
Syntax protected virtual VirtualSnapshotSpan CommentSpan(
VirtualSnapshotSpan span,
ITextEdit edit
)
Protected Overridable Function CommentSpan (
span As VirtualSnapshotSpan,
edit As ITextEdit
) As VirtualSnapshotSpan
protected:
virtual VirtualSnapshotSpan CommentSpan(
VirtualSnapshotSpan span,
ITextEdit^ edit
)
abstract CommentSpan :
span : VirtualSnapshotSpan *
edit : ITextEdit -> VirtualSnapshotSpan
override CommentSpan :
span : VirtualSnapshotSpan *
edit : ITextEdit -> VirtualSnapshotSpan
Parameters
- span
- Type: Microsoft.VisualStudio.TextVirtualSnapshotSpan
The span of text to comment. - edit
- Type: Microsoft.VisualStudio.TextITextEdit
The ITextEdit to apply the changes to.
Return Value
Type:
VirtualSnapshotSpanA
VirtualSnapshotSpan containing the commented code.
Remarks The default implementation uses line comments if UseLineComments is
and one of the following is true.
- There is no selected text.
-
On the line where the selection starts, there is only whitespace up to the selection start point,
and one of the following is true.
- On the line where the selection ends, there is only whitespace up to the selection end point,
or
- There is only whitespace from the selection end point to the end of the line.
The default implementation uses block comments if all of the following are true.
See Also