ViewFilter.CommentSelection Method

Definition

Handles the COMMENT_BLOCK command to comment out the current selection in the view.

public:
 virtual void CommentSelection();
public:
 virtual void CommentSelection();
 virtual void CommentSelection();
public virtual void CommentSelection ();
abstract member CommentSelection : unit -> unit
override this.CommentSelection : unit -> unit
Public Overridable Sub CommentSelection ()

Remarks

This method obtains the current selection from the view and calls the Source object to comment out the selection.

The base method obtains the current selection by calling the GetSelection method, then calls the CommentSpan method on the Source object, and finally calls the SetSelection method on the IVsTextView object passed to the ViewFilter class constructor to select the newly commented block.

In the default managed package framework implementation of the language service classes, this method is called from the HandlePreExec method.

Applies to