Partilhar via


Source.OnCommand(IVsTextView, VSConstants+VSStd2KCmdID, Char) Method

Definition

Handles IntelliSense-oriented commands.

public:
 virtual void OnCommand(Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ textView, Microsoft::VisualStudio::VSConstants::VSStd2KCmdID command, char ch);
 virtual void OnCommand(Microsoft::VisualStudio::TextManager::Interop::IVsTextView const & textView, Microsoft::VisualStudio::VSConstants::VSStd2KCmdID command, char ch);
public virtual void OnCommand (Microsoft.VisualStudio.TextManager.Interop.IVsTextView textView, Microsoft.VisualStudio.VSConstants.VSStd2KCmdID command, char ch);
abstract member OnCommand : Microsoft.VisualStudio.TextManager.Interop.IVsTextView * Microsoft.VisualStudio.VSConstants.VSStd2KCmdID * char -> unit
override this.OnCommand : Microsoft.VisualStudio.TextManager.Interop.IVsTextView * Microsoft.VisualStudio.VSConstants.VSStd2KCmdID * char -> unit
Public Overridable Sub OnCommand (textView As IVsTextView, command As VSConstants.VSStd2KCmdID, ch As Char)

Parameters

textView
IVsTextView

An IVsTextView object representing the view containing the source where the command was entered.

command
VSConstants.VSStd2KCmdID

A value from the VSConstants.VSStd2KCmdID enumeration specifying the command that was entered.

ch
Char

The character that was typed.

Remarks

This method is called when a command is entered. All this method does is support IntelliSense operations.

By the time this method is called, any character the user has just typed has been added to the source file just before the current caret position.

The base method does nothing if the EnableCodeSense property is false. Otherwise, this method gets the current caret position and then the token at the current caret position. Based on the token triggers and what the command is, the appropriate method that supports the desired IntelliSense operation is called.

Trigger Command Method Called
MemberSelect TYPECHAR Completion
MatchBraces TYPECHAR MatchBraces
MethodTip TYPECHAR MethodTip
ParameterNext parameter separator AdjustCurrentParameter

Applies to