Source::OnCommand Method (IVsTextView^, VSConstants::VSStd2KCmdID, Char)

 

Handles IntelliSense-oriented commands.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public:
virtual void OnCommand(
	IVsTextView^ textView,
	VSConstants::VSStd2KCmdID command,
	wchar_t ch
)

Parameters

textView
Type: Microsoft.VisualStudio.TextManager.Interop::IVsTextView^

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

command
Type: Microsoft.VisualStudio::VSConstants::VSStd2KCmdID

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

ch
Type: System::Char

The character that was typed.

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

Return to top
Show: